本文整理汇总了Java中org.apache.commons.math3.exception.util.LocalizedFormats.NOT_STRICTLY_INCREASING_SEQUENCE属性的典型用法代码示例。如果您正苦于以下问题:Java LocalizedFormats.NOT_STRICTLY_INCREASING_SEQUENCE属性的具体用法?Java LocalizedFormats.NOT_STRICTLY_INCREASING_SEQUENCE怎么用?Java LocalizedFormats.NOT_STRICTLY_INCREASING_SEQUENCE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.math3.exception.util.LocalizedFormats
的用法示例。
在下文中一共展示了LocalizedFormats.NOT_STRICTLY_INCREASING_SEQUENCE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: NonMonotonicSequenceException
/**
* Construct the exception.
*
* @param wrong Value that did not match the requirements.
* @param previous Previous value in the sequence.
* @param index Index of the value that did not match the requirements.
* @param direction Strictly positive for a sequence required to be
* increasing, negative (or zero) for a decreasing sequence.
* @param strict Whether the sequence must be strictly increasing or
* decreasing.
*/
public NonMonotonicSequenceException(Number wrong,
Number previous,
int index,
MathArrays.OrderDirection direction,
boolean strict) {
super(direction == MathArrays.OrderDirection.INCREASING ?
(strict ?
LocalizedFormats.NOT_STRICTLY_INCREASING_SEQUENCE :
LocalizedFormats.NOT_INCREASING_SEQUENCE) :
(strict ?
LocalizedFormats.NOT_STRICTLY_DECREASING_SEQUENCE :
LocalizedFormats.NOT_DECREASING_SEQUENCE),
wrong, previous, Integer.valueOf(index), Integer.valueOf(index - 1));
this.direction = direction;
this.strict = strict;
this.index = index;
this.previous = previous;
}
示例2: NonMonotonicSequenceException
/**
* Construct the exception.
*
* @param wrong Value that did not match the requirements.
* @param previous Previous value in the sequence.
* @param index Index of the value that did not match the requirements.
* @param direction Strictly positive for a sequence required to be
* increasing, negative (or zero) for a decreasing sequence.
* @param strict Whether the sequence must be strictly increasing or
* decreasing.
*/
public NonMonotonicSequenceException(Number wrong,
Number previous,
int index,
MathArrays.OrderDirection direction,
boolean strict) {
super(direction == MathArrays.OrderDirection.INCREASING ?
(strict ?
LocalizedFormats.NOT_STRICTLY_INCREASING_SEQUENCE :
LocalizedFormats.NOT_INCREASING_SEQUENCE) :
(strict ?
LocalizedFormats.NOT_STRICTLY_DECREASING_SEQUENCE :
LocalizedFormats.NOT_DECREASING_SEQUENCE),
wrong, previous, index, index - 1);
this.direction = direction;
this.strict = strict;
this.index = index;
this.previous = previous;
}