Java Code Examples for org.apache.commons.math3.exception.util.LocalizedFormats#OUT_OF_RANGE_SIMPLE

The following examples show how to use org.apache.commons.math3.exception.util.LocalizedFormats#OUT_OF_RANGE_SIMPLE . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: StableRandomGenerator.java    From astor with GNU General Public License v2.0 6 votes vote down vote up
/**
 * Create a new generator.
 *
 * @param generator underlying random generator to use
 * @param alpha Stability parameter. Must be in range (0, 2]
 * @param beta Skewness parameter. Must be in range [-1, 1]
 */
public StableRandomGenerator(final RandomGenerator generator, double alpha,
        double beta) {
    if (generator == null) {
        throw new NullArgumentException();
    }

    if (!(alpha > 0d && alpha <= 2d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_LEFT,
                alpha, 0, 2);
    }

    if (!(beta >= -1d && beta <= 1d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                beta, -1, 1);
    }

    this.generator = generator;
    this.alpha = alpha;
    this.beta = beta;
    if (alpha < 2d && beta != 0d) {
        zeta = beta * FastMath.tan(FastMath.PI * alpha / 2);
    } else {
        zeta = 0d;
    }
}
 
Example 2
Source File: RandomKey.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void checkValidity(final List<Double> chromosomeRepresentation)
    throws InvalidRepresentationException {

    for (double val : chromosomeRepresentation) {
        if (val < 0 || val > 1) {
            throw new InvalidRepresentationException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                                                     val, 0, 1);
        }
    }
}
 
Example 3
Source File: RandomKey.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void checkValidity(final List<Double> chromosomeRepresentation)
    throws InvalidRepresentationException {

    for (double val : chromosomeRepresentation) {
        if (val < 0 || val > 1) {
            throw new InvalidRepresentationException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                                                     val, 0, 1);
        }
    }
}
 
Example 4
Source File: StableRandomGenerator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new generator.
 *
 * @param generator underlying random generator to use
 * @param alpha Stability parameter. Must be in range (0, 2]
 * @param beta Skewness parameter. Must be in range [-1, 1]
 * @throws NullArgumentException if generator is null
 * @throws OutOfRangeException if {@code alpha <= 0} or {@code alpha > 2}
 * or {@code beta < -1} or {@code beta > 1}
 */
public StableRandomGenerator(final RandomGenerator generator,
                             final double alpha, final double beta)
    throws NullArgumentException, OutOfRangeException {
    if (generator == null) {
        throw new NullArgumentException();
    }

    if (!(alpha > 0d && alpha <= 2d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_LEFT,
                alpha, 0, 2);
    }

    if (!(beta >= -1d && beta <= 1d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                beta, -1, 1);
    }

    this.generator = generator;
    this.alpha = alpha;
    this.beta = beta;
    if (alpha < 2d && beta != 0d) {
        zeta = beta * FastMath.tan(FastMath.PI * alpha / 2);
    } else {
        zeta = 0d;
    }
}
 
Example 5
Source File: RandomKey.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void checkValidity(final List<Double> chromosomeRepresentation)
    throws InvalidRepresentationException {

    for (double val : chromosomeRepresentation) {
        if (val < 0 || val > 1) {
            throw new InvalidRepresentationException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                                                     val, 0, 1);
        }
    }
}
 
Example 6
Source File: StableRandomGenerator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new generator.
 *
 * @param generator underlying random generator to use
 * @param alpha Stability parameter. Must be in range (0, 2]
 * @param beta Skewness parameter. Must be in range [-1, 1]
 * @throws NullArgumentException if generator is null
 * @throws OutOfRangeException if {@code alpha <= 0} or {@code alpha > 2}
 * or {@code beta < -1} or {@code beta > 1}
 */
public StableRandomGenerator(final RandomGenerator generator,
                             final double alpha, final double beta)
    throws NullArgumentException, OutOfRangeException {
    if (generator == null) {
        throw new NullArgumentException();
    }

    if (!(alpha > 0d && alpha <= 2d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_LEFT,
                alpha, 0, 2);
    }

    if (!(beta >= -1d && beta <= 1d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                beta, -1, 1);
    }

    this.generator = generator;
    this.alpha = alpha;
    this.beta = beta;
    if (alpha < 2d && beta != 0d) {
        zeta = beta * FastMath.tan(FastMath.PI * alpha / 2);
    } else {
        zeta = 0d;
    }
}
 
Example 7
Source File: StableRandomGenerator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new generator.
 *
 * @param generator underlying random generator to use
 * @param alpha Stability parameter. Must be in range (0, 2]
 * @param beta Skewness parameter. Must be in range [-1, 1]
 * @throws NullArgumentException if generator is null
 * @throws OutOfRangeException if {@code alpha <= 0} or {@code alpha > 2}
 * or {@code beta < -1} or {@code beta > 1}
 */
public StableRandomGenerator(final RandomGenerator generator,
                             final double alpha, final double beta)
    throws NullArgumentException, OutOfRangeException {
    if (generator == null) {
        throw new NullArgumentException();
    }

    if (!(alpha > 0d && alpha <= 2d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_LEFT,
                alpha, 0, 2);
    }

    if (!(beta >= -1d && beta <= 1d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                beta, -1, 1);
    }

    this.generator = generator;
    this.alpha = alpha;
    this.beta = beta;
    if (alpha < 2d && beta != 0d) {
        zeta = beta * FastMath.tan(FastMath.PI * alpha / 2);
    } else {
        zeta = 0d;
    }
}
 
Example 8
Source File: RandomKey.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void checkValidity(final List<Double> chromosomeRepresentation)
    throws InvalidRepresentationException {

    for (double val : chromosomeRepresentation) {
        if (val < 0 || val > 1) {
            throw new InvalidRepresentationException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                                                     val, 0, 1);
        }
    }
}
 
Example 9
Source File: RandomKey.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void checkValidity(final List<Double> chromosomeRepresentation)
    throws InvalidRepresentationException {

    for (double val : chromosomeRepresentation) {
        if (val < 0 || val > 1) {
            throw new InvalidRepresentationException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                                                     val, 0, 1);
        }
    }
}
 
Example 10
Source File: RandomKey.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void checkValidity(final List<Double> chromosomeRepresentation)
    throws InvalidRepresentationException {

    for (double val : chromosomeRepresentation) {
        if (val < 0 || val > 1) {
            throw new InvalidRepresentationException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                                                     val, 0, 1);
        }
    }
}
 
Example 11
Source File: StableRandomGenerator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new generator.
 *
 * @param generator underlying random generator to use
 * @param alpha Stability parameter. Must be in range (0, 2]
 * @param beta Skewness parameter. Must be in range [-1, 1]
 * @throws NullArgumentException if generator is null
 * @throws OutOfRangeException if {@code alpha <= 0} or {@code alpha > 2} 
 * or {@code beta < -1} or {@code beta > 1} 
 */
public StableRandomGenerator(final RandomGenerator generator,
                             final double alpha, final double beta)
    throws NullArgumentException, OutOfRangeException {
    if (generator == null) {
        throw new NullArgumentException();
    }

    if (!(alpha > 0d && alpha <= 2d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_LEFT,
                alpha, 0, 2);
    }

    if (!(beta >= -1d && beta <= 1d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                beta, -1, 1);
    }

    this.generator = generator;
    this.alpha = alpha;
    this.beta = beta;
    if (alpha < 2d && beta != 0d) {
        zeta = beta * FastMath.tan(FastMath.PI * alpha / 2);
    } else {
        zeta = 0d;
    }
}
 
Example 12
Source File: RandomKey.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@Override
protected void checkValidity(final List<Double> chromosomeRepresentation)
    throws InvalidRepresentationException {

    for (double val : chromosomeRepresentation) {
        if (val < 0 || val > 1) {
            throw new InvalidRepresentationException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                                                     val, 0, 1);
        }
    }
}
 
Example 13
Source File: StableRandomGenerator.java    From astor with GNU General Public License v2.0 5 votes vote down vote up
/**
 * Create a new generator.
 *
 * @param generator underlying random generator to use
 * @param alpha Stability parameter. Must be in range (0, 2]
 * @param beta Skewness parameter. Must be in range [-1, 1]
 * @throws NullArgumentException if generator is null
 * @throws OutOfRangeException if {@code alpha <= 0} or {@code alpha > 2}
 * or {@code beta < -1} or {@code beta > 1}
 */
public StableRandomGenerator(final RandomGenerator generator,
                             final double alpha, final double beta)
    throws NullArgumentException, OutOfRangeException {
    if (generator == null) {
        throw new NullArgumentException();
    }

    if (!(alpha > 0d && alpha <= 2d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_LEFT,
                alpha, 0, 2);
    }

    if (!(beta >= -1d && beta <= 1d)) {
        throw new OutOfRangeException(LocalizedFormats.OUT_OF_RANGE_SIMPLE,
                beta, -1, 1);
    }

    this.generator = generator;
    this.alpha = alpha;
    this.beta = beta;
    if (alpha < 2d && beta != 0d) {
        zeta = beta * FastMath.tan(FastMath.PI * alpha / 2);
    } else {
        zeta = 0d;
    }
}
 
Example 14
Source File: BinomialTest.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the <i>observed significance level</i>, or
 * <a href="http://www.cas.lancs.ac.uk/glossary_v1.1/hyptest.html#pvalue">p-value</a>,
 * associated with a <a href="http://en.wikipedia.org/wiki/Binomial_test"> Binomial test</a>.
 * <p>
 * The number returned is the smallest significance level at which one can reject the null hypothesis.
 * The form of the hypothesis depends on {@code alternativeHypothesis}.</p>
 * <p>
 * The p-Value represents the likelihood of getting a result at least as extreme as the sample,
 * given the provided {@code probability} of success on a single trial. For single-sided tests,
 * this value can be directly derived from the Binomial distribution. For the two-sided test,
 * the implementation works as follows: we start by looking at the most extreme cases
 * (0 success and n success where n is the number of trials from the sample) and determine their likelihood.
 * The lower value is added to the p-Value (if both values are equal, both are added). Then we continue with
 * the next extreme value, until we added the value for the actual observed sample.</p>
 * <p>
 * <strong>Preconditions</strong>:
 * <ul>
 * <li>Number of trials must be &ge; 0.</li>
 * <li>Number of successes must be &ge; 0.</li>
 * <li>Number of successes must be &le; number of trials.</li>
 * <li>Probability must be &ge; 0 and &le; 1.</li>
 * </ul></p>
 *
 * @param numberOfTrials number of trials performed
 * @param numberOfSuccesses number of successes observed
 * @param probability assumed probability of a single trial under the null hypothesis
 * @param alternativeHypothesis type of hypothesis being evaluated (one- or two-sided)
 * @return p-value
 * @throws NotPositiveException if {@code numberOfTrials} or {@code numberOfSuccesses} is negative
 * @throws OutOfRangeException if {@code probability} is not between 0 and 1
 * @throws MathIllegalArgumentException if {@code numberOfTrials} &lt; {@code numberOfSuccesses} or
 * if {@code alternateHypothesis} is null.
 * @see AlternativeHypothesis
 */
public double binomialTest(int numberOfTrials, int numberOfSuccesses, double probability,
                           AlternativeHypothesis alternativeHypothesis) {
    if (numberOfTrials < 0) {
        throw new NotPositiveException(numberOfTrials);
    }
    if (numberOfSuccesses < 0) {
        throw new NotPositiveException(numberOfSuccesses);
    }
    if (probability < 0 || probability > 1) {
        throw new OutOfRangeException(probability, 0, 1);
    }
    if (numberOfTrials < numberOfSuccesses) {
        throw new MathIllegalArgumentException(
            LocalizedFormats.BINOMIAL_INVALID_PARAMETERS_ORDER,
            numberOfTrials, numberOfSuccesses);
    }
    if (alternativeHypothesis == null) {
        throw new NullArgumentException();
    }

    // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
    final BinomialDistribution distribution = new BinomialDistribution(null, numberOfTrials, probability);
    switch (alternativeHypothesis) {
    case GREATER_THAN:
        return 1 - distribution.cumulativeProbability(numberOfSuccesses - 1);
    case LESS_THAN:
        return distribution.cumulativeProbability(numberOfSuccesses);
    case TWO_SIDED:
        int criticalValueLow = 0;
        int criticalValueHigh = numberOfTrials;
        double pTotal = 0;

        while (true) {
            double pLow = distribution.probability(criticalValueLow);
            double pHigh = distribution.probability(criticalValueHigh);

            if (pLow == pHigh) {
                pTotal += 2 * pLow;
                criticalValueLow++;
                criticalValueHigh--;
            } else if (pLow < pHigh) {
                pTotal += pLow;
                criticalValueLow++;
            } else {
                pTotal += pHigh;
                criticalValueHigh--;
            }

            if (criticalValueLow > numberOfSuccesses || criticalValueHigh < numberOfSuccesses) {
                break;
            }
        }
        return pTotal;
    default:
        throw new MathInternalError(LocalizedFormats. OUT_OF_RANGE_SIMPLE, alternativeHypothesis,
                  AlternativeHypothesis.TWO_SIDED, AlternativeHypothesis.LESS_THAN);
    }
}
 
Example 15
Source File: BinomialTest.java    From systemsgenetics with GNU General Public License v3.0 4 votes vote down vote up
/**
 * Returns the <i>observed significance level</i>, or
 * <a
 * href="http://www.cas.lancs.ac.uk/glossary_v1.1/hyptest.html#pvalue">p-value</a>,
 * associated with a <a href="http://en.wikipedia.org/wiki/Binomial_test">
 * Binomial test</a>.
 * <p>
 * The number returned is the smallest significance level at which one can
 * reject the null hypothesis. The form of the hypothesis depends on
 * {@code alternativeHypothesis}.</p>
 * <p>
 * The p-Value represents the likelihood of getting a result at least as
 * extreme as the sample, given the provided {@code probability} of success
 * on a single trial. For single-sided tests, this value can be directly
 * derived from the Binomial distribution. For the two-sided test, the
 * implementation works as follows: we start by looking at the most extreme
 * cases (0 success and n success where n is the number of trials from the
 * sample) and determine their likelihood. The lower value is added to the
 * p-Value (if both values are equal, both are added). Then we continue with
 * the next extreme value, until we added the value for the actual observed
 * sample.</p>
 * <p>
 * <strong>Preconditions</strong>:
 * <ul>
 * <li>Number of trials must be &ge; 0.</li>
 * <li>Number of successes must be &ge; 0.</li>
 * <li>Number of successes must be &le; number of trials.</li>
 * <li>Probability must be &ge; 0 and &le; 1.</li>
 * </ul></p>
 *
 * @param numberOfTrials number of trials performed
 * @param numberOfSuccesses number of successes observed
 * @param probability assumed probability of a single trial under the null
 * hypothesis
 * @param alternativeHypothesis type of hypothesis being evaluated (one- or
 * two-sided)
 * @return p-value
 * @throws NotPositiveException if {@code numberOfTrials} or
 * {@code numberOfSuccesses} is negative
 * @throws OutOfRangeException if {@code probability} is not between 0 and 1
 * @throws MathIllegalArgumentException if {@code numberOfTrials} &lt;
 * {@code numberOfSuccesses} or if {@code alternateHypothesis} is null.
 * @see AlternativeHypothesis
 */
public double binomialTest(int numberOfTrials, int numberOfSuccesses, double probability,
		AlternativeHypothesis alternativeHypothesis) {
	if (numberOfTrials < 0) {
		throw new NotPositiveException(numberOfTrials);
	}
	if (numberOfSuccesses < 0) {
		throw new NotPositiveException(numberOfSuccesses);
	}
	if (probability < 0 || probability > 1) {
		throw new OutOfRangeException(probability, 0, 1);
	}
	if (numberOfTrials < numberOfSuccesses) {
		throw new MathIllegalArgumentException(
				LocalizedFormats.BINOMIAL_INVALID_PARAMETERS_ORDER,
				numberOfTrials, numberOfSuccesses);
	}
	if (alternativeHypothesis == null) {
		throw new NullArgumentException();
	}

	final BinomialDistribution distribution = new BinomialDistribution(numberOfTrials, probability);
	switch (alternativeHypothesis) {
		case GREATER_THAN:
			return 1 - distribution.cumulativeProbability(numberOfSuccesses - 1);
		case LESS_THAN:
			return distribution.cumulativeProbability(numberOfSuccesses);
		case TWO_SIDED:
			int criticalValueLow = 0;
			int criticalValueHigh = numberOfTrials;
			double pTotal = 0;

			while (true) {
				double pLow = distribution.probability(criticalValueLow);
				double pHigh = distribution.probability(criticalValueHigh);

				if (pLow == pHigh) {
					pTotal += 2 * pLow;
					criticalValueLow++;
					criticalValueHigh--;
				} else if (pLow < pHigh) {
					pTotal += pLow;
					criticalValueLow++;
				} else {
					pTotal += pHigh;
					criticalValueHigh--;
				}

				if (criticalValueLow > numberOfSuccesses || criticalValueHigh < numberOfSuccesses) {
					break;
				}
			}
			return pTotal;
		default:
			throw new MathInternalError(LocalizedFormats.OUT_OF_RANGE_SIMPLE, alternativeHypothesis,
					AlternativeHypothesis.TWO_SIDED, AlternativeHypothesis.LESS_THAN);
	}
}
 
Example 16
Source File: BinomialTest.java    From astor with GNU General Public License v2.0 4 votes vote down vote up
/**
 * Returns the <i>observed significance level</i>, or
 * <a href="http://www.cas.lancs.ac.uk/glossary_v1.1/hyptest.html#pvalue">p-value</a>,
 * associated with a <a href="http://en.wikipedia.org/wiki/Binomial_test"> Binomial test</a>.
 * <p>
 * The number returned is the smallest significance level at which one can reject the null hypothesis.
 * The form of the hypothesis depends on {@code alternativeHypothesis}.</p>
 * <p>
 * The p-Value represents the likelihood of getting a result at least as extreme as the sample,
 * given the provided {@code probability} of success on a single trial. For single-sided tests,
 * this value can be directly derived from the Binomial distribution. For the two-sided test,
 * the implementation works as follows: we start by looking at the most extreme cases
 * (0 success and n success where n is the number of trials from the sample) and determine their likelihood.
 * The lower value is added to the p-Value (if both values are equal, both are added). Then we continue with
 * the next extreme value, until we added the value for the actual observed sample.</p>
 * <p>
 * <strong>Preconditions</strong>:
 * <ul>
 * <li>Number of trials must be &ge; 0.</li>
 * <li>Number of successes must be &ge; 0.</li>
 * <li>Number of successes must be &le; number of trials.</li>
 * <li>Probability must be &ge; 0 and &le; 1.</li>
 * </ul></p>
 *
 * @param numberOfTrials number of trials performed
 * @param numberOfSuccesses number of successes observed
 * @param probability assumed probability of a single trial under the null hypothesis
 * @param alternativeHypothesis type of hypothesis being evaluated (one- or two-sided)
 * @return p-value
 * @throws NotPositiveException if {@code numberOfTrials} or {@code numberOfSuccesses} is negative
 * @throws OutOfRangeException if {@code probability} is not between 0 and 1
 * @throws MathIllegalArgumentException if {@code numberOfTrials} &lt; {@code numberOfSuccesses} or
 * if {@code alternateHypothesis} is null.
 * @see AlternativeHypothesis
 */
public double binomialTest(int numberOfTrials, int numberOfSuccesses, double probability,
                           AlternativeHypothesis alternativeHypothesis) {
    if (numberOfTrials < 0) {
        throw new NotPositiveException(numberOfTrials);
    }
    if (numberOfSuccesses < 0) {
        throw new NotPositiveException(numberOfSuccesses);
    }
    if (probability < 0 || probability > 1) {
        throw new OutOfRangeException(probability, 0, 1);
    }
    if (numberOfTrials < numberOfSuccesses) {
        throw new MathIllegalArgumentException(
            LocalizedFormats.BINOMIAL_INVALID_PARAMETERS_ORDER,
            numberOfTrials, numberOfSuccesses);
    }
    if (alternativeHypothesis == null) {
        throw new NullArgumentException();
    }

    // pass a null rng to avoid unneeded overhead as we will not sample from this distribution
    final BinomialDistribution distribution = new BinomialDistribution(null, numberOfTrials, probability);
    switch (alternativeHypothesis) {
    case GREATER_THAN:
        return 1 - distribution.cumulativeProbability(numberOfSuccesses - 1);
    case LESS_THAN:
        return distribution.cumulativeProbability(numberOfSuccesses);
    case TWO_SIDED:
        int criticalValueLow = 0;
        int criticalValueHigh = numberOfTrials;
        double pTotal = 0;

        while (true) {
            double pLow = distribution.probability(criticalValueLow);
            double pHigh = distribution.probability(criticalValueHigh);

            if (pLow == pHigh) {
                pTotal += 2 * pLow;
                criticalValueLow++;
                criticalValueHigh--;
            } else if (pLow < pHigh) {
                pTotal += pLow;
                criticalValueLow++;
            } else {
                pTotal += pHigh;
                criticalValueHigh--;
            }

            if (criticalValueLow > numberOfSuccesses || criticalValueHigh < numberOfSuccesses) {
                break;
            }
        }
        return pTotal;
    default:
        throw new MathInternalError(LocalizedFormats. OUT_OF_RANGE_SIMPLE, alternativeHypothesis,
                  AlternativeHypothesis.TWO_SIDED, AlternativeHypothesis.LESS_THAN);
    }
}
 
Example 17
Source File: OutOfRangeException.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Construct an exception from the mismatched dimensions.
 *
 * @param wrong Requested value.
 * @param lo Lower bound.
 * @param hi Higher bound.
 */
public OutOfRangeException(Number wrong,
                           Number lo,
                           Number hi) {
    this(LocalizedFormats.OUT_OF_RANGE_SIMPLE, wrong, lo, hi);
}
 
Example 18
Source File: OutOfRangeException.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Construct an exception from the mismatched dimensions.
 *
 * @param wrong Requested value.
 * @param lo Lower bound.
 * @param hi Higher bound.
 */
public OutOfRangeException(Number wrong,
                           Number lo,
                           Number hi) {
    this(LocalizedFormats.OUT_OF_RANGE_SIMPLE, wrong, lo, hi);
}
 
Example 19
Source File: OutOfRangeException.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Construct an exception from the mismatched dimensions.
 *
 * @param wrong Requested value.
 * @param lo Lower bound.
 * @param hi Higher bound.
 */
public OutOfRangeException(Number wrong,
                           Number lo,
                           Number hi) {
    this(LocalizedFormats.OUT_OF_RANGE_SIMPLE, wrong, lo, hi);
}
 
Example 20
Source File: OutOfRangeException.java    From astor with GNU General Public License v2.0 2 votes vote down vote up
/**
 * Construct an exception from the mismatched dimensions.
 *
 * @param wrong Requested value.
 * @param lo Lower bound.
 * @param hi Higher bound.
 */
public OutOfRangeException(Number wrong,
                           Number lo,
                           Number hi) {
    this(LocalizedFormats.OUT_OF_RANGE_SIMPLE, wrong, lo, hi);
}