|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Throwable
java.lang.Exception
java.lang.RuntimeException
java.lang.IllegalArgumentException
org.apache.commons.math.exception.MathIllegalArgumentException
org.apache.commons.math.exception.MathIllegalNumberException
org.apache.commons.math.exception.NonMonotonousSequenceException
public class NonMonotonousSequenceException
Exception to be thrown when the a sequence of values is not monotonously increasing or decreasing.
| Field Summary | |
|---|---|
private MathUtils.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. |
| Constructor Summary | |
|---|---|
NonMonotonousSequenceException(java.lang.Number wrong,
java.lang.Number previous,
int index)
Construct the exception. |
|
NonMonotonousSequenceException(java.lang.Number wrong,
java.lang.Number previous,
int index,
MathUtils.OrderDirection direction,
boolean strict)
Construct the exception. |
|
| Method Summary | |
|---|---|
MathUtils.OrderDirection |
getDirection()
|
int |
getIndex()
Get the index of the wrong value. |
java.lang.Number |
getPrevious()
|
boolean |
getStrict()
|
| Methods inherited from class org.apache.commons.math.exception.MathIllegalNumberException |
|---|
getArgument |
| Methods inherited from class org.apache.commons.math.exception.MathIllegalArgumentException |
|---|
getArguments, getGeneralPattern, getLocalizedMessage, getMessage, getMessage, getSpecificPattern |
| Methods inherited from class java.lang.Throwable |
|---|
fillInStackTrace, getCause, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
private static final long serialVersionUID
private final MathUtils.OrderDirection direction
private final boolean strict
private final int index
private final java.lang.Number previous
| Constructor Detail |
|---|
public NonMonotonousSequenceException(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 NonMonotonousSequenceException(java.lang.Number wrong,
java.lang.Number previous,
int index,
MathUtils.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.| Method Detail |
|---|
public MathUtils.OrderDirection getDirection()
public boolean getStrict()
true is the sequence should be strictly monotonous.public int getIndex()
public java.lang.Number getPrevious()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||