public class NonMonotonicSequenceException extends MathIllegalNumberException
| Modifier and Type | Field and Description |
|---|---|
private MathArrays.OrderDirection |
direction
Direction (positive for increasing, negative for decreasing).
|
private int |
index
Index of the wrong value.
|
private java.lang.Number |
previous
Previous value.
|
private static long |
serialVersionUID
Serializable version Id.
|
private boolean |
strict
Whether the sequence must be strictly increasing or decreasing.
|
INTEGER_ZERO| Constructor and Description |
|---|
NonMonotonicSequenceException(java.lang.Number wrong,
java.lang.Number previous,
int index)
Construct the exception.
|
NonMonotonicSequenceException(java.lang.Number wrong,
java.lang.Number previous,
int index,
MathArrays.OrderDirection direction,
boolean strict)
Construct the exception.
|
| Modifier and Type | Method and Description |
|---|---|
MathArrays.OrderDirection |
getDirection() |
int |
getIndex()
Get the index of the wrong value.
|
java.lang.Number |
getPrevious() |
boolean |
getStrict() |
getArgumentgetContext, getLocalizedMessage, getMessageprivate static final long serialVersionUID
private final MathArrays.OrderDirection direction
private final boolean strict
private final int index
private final java.lang.Number previous
public NonMonotonicSequenceException(java.lang.Number wrong,
java.lang.Number previous,
int index)
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.public NonMonotonicSequenceException(java.lang.Number wrong,
java.lang.Number previous,
int index,
MathArrays.OrderDirection direction,
boolean strict)
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.public MathArrays.OrderDirection getDirection()
public boolean getStrict()
true is the sequence should be strictly monotonic.public int getIndex()
public java.lang.Number getPrevious()
Copyright (c) 2003-2015 Apache Software Foundation