Class NonMonotonicSequenceException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- java.lang.RuntimeException
-
- org.hipparchus.exception.MathRuntimeException
-
- org.hipparchus.exception.MathIllegalArgumentException
-
- org.hipparchus.migration.exception.MathIllegalNumberException
-
- org.hipparchus.migration.exception.NonMonotonicSequenceException
-
- All Implemented Interfaces:
Serializable
,LocalizedException
@Deprecated public class NonMonotonicSequenceException extends MathIllegalNumberException
Deprecated.as of 1.0, this exception is replaced byMathIllegalArgumentException
Exception to be thrown when the a sequence of values is not monotonically increasing or decreasing.- See Also:
- Serialized Form
-
-
Field Summary
-
Fields inherited from class org.hipparchus.migration.exception.MathIllegalNumberException
INTEGER_ZERO
-
-
Constructor Summary
Constructors Constructor Description NonMonotonicSequenceException(Number wrong, Number previous, int index)
Deprecated.Construct the exception.NonMonotonicSequenceException(Number wrong, Number previous, int index, MathArrays.OrderDirection direction, boolean strict)
Deprecated.Construct the exception.
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description MathArrays.OrderDirection
getDirection()
Deprecated.Get order direction.int
getIndex()
Deprecated.Get the index of the wrong value.Number
getPrevious()
Deprecated.Get previous value.boolean
getStrict()
Deprecated.Check if sequence should be strictly monotonic.-
Methods inherited from class org.hipparchus.migration.exception.MathIllegalNumberException
getArgument
-
Methods inherited from class org.hipparchus.exception.MathRuntimeException
createInternalError, createInternalError, getLocalizedMessage, getMessage, getMessage, getParts, getSpecifier
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getCause, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString
-
-
-
-
Constructor Detail
-
NonMonotonicSequenceException
public NonMonotonicSequenceException(Number wrong, Number previous, int index)
Deprecated.Construct the exception. This constructor uses default values assuming that the sequence should have been strictly increasing.- Parameters:
wrong
- Value that did not match the requirements.previous
- Previous value in the sequence.index
- Index of the value that did not match the requirements.
-
NonMonotonicSequenceException
public NonMonotonicSequenceException(Number wrong, Number previous, int index, MathArrays.OrderDirection direction, boolean strict)
Deprecated.Construct the exception.- Parameters:
wrong
- Value that did not match the requirements.previous
- Previous value in the sequence.index
- Index of the value that did not match the requirements.direction
- Strictly positive for a sequence required to be increasing, negative (or zero) for a decreasing sequence.strict
- Whether the sequence must be strictly increasing or decreasing.
-
-
Method Detail
-
getDirection
public MathArrays.OrderDirection getDirection()
Deprecated.Get order direction.- Returns:
- the order direction
-
getStrict
public boolean getStrict()
Deprecated.Check if sequence should be strictly monotonic.- Returns:
true
is the sequence should be strictly monotonic
-
getIndex
public int getIndex()
Deprecated.Get the index of the wrong value.- Returns:
- the current index.
-
getPrevious
public Number getPrevious()
Deprecated.Get previous value.- Returns:
- the previous value.
-
-