本文整理汇总了Java中org.apache.commons.math3.exception.util.LocalizedFormats.UNSUPPORTED_EXPANSION_MODE属性的典型用法代码示例。如果您正苦于以下问题:Java LocalizedFormats.UNSUPPORTED_EXPANSION_MODE属性的具体用法?Java LocalizedFormats.UNSUPPORTED_EXPANSION_MODE怎么用?Java LocalizedFormats.UNSUPPORTED_EXPANSION_MODE使用的例子?那么, 这里精选的属性代码示例或许可以为您提供帮助。您也可以进一步了解该属性所在类org.apache.commons.math3.exception.util.LocalizedFormats
的用法示例。
在下文中一共展示了LocalizedFormats.UNSUPPORTED_EXPANSION_MODE属性的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: setExpansionMode
/**
* Sets the <code>expansionMode</code>. The specified value must be one of
* ADDITIVE_MODE, MULTIPLICATIVE_MODE.
*
* @param expansionMode The expansionMode to set.
* @throws MathIllegalArgumentException if the specified mode value is not valid.
* @deprecated As of 3.1. Please use {@link #setExpansionMode(ExpansionMode)} instead.
*/
@Deprecated
public void setExpansionMode(int expansionMode)
throws MathIllegalArgumentException {
if (expansionMode != MULTIPLICATIVE_MODE &&
expansionMode != ADDITIVE_MODE) {
throw new MathIllegalArgumentException(LocalizedFormats.UNSUPPORTED_EXPANSION_MODE, expansionMode,
MULTIPLICATIVE_MODE, "MULTIPLICATIVE_MODE",
ADDITIVE_MODE, "ADDITIVE_MODE");
}
synchronized(this) {
if (expansionMode == MULTIPLICATIVE_MODE) {
setExpansionMode(ExpansionMode.MULTIPLICATIVE);
} else if (expansionMode == ADDITIVE_MODE) {
setExpansionMode(ExpansionMode.ADDITIVE);
}
}
}
示例2: setExpansionMode
/**
* Sets the <code>expansionMode</code>. The specified value must be one of
* ADDITIVE_MODE, MULTIPLICATIVE_MODE.
*
* @param expansionMode The expansionMode to set.
* @throws IllegalArgumentException if the specified mode value is not valid
*/
public void setExpansionMode(int expansionMode) {
if (expansionMode != MULTIPLICATIVE_MODE &&
expansionMode != ADDITIVE_MODE) {
throw new MathIllegalArgumentException(
LocalizedFormats.UNSUPPORTED_EXPANSION_MODE,
expansionMode, MULTIPLICATIVE_MODE, "MULTIPLICATIVE_MODE",
ADDITIVE_MODE, "ADDITIVE_MODE");
}
synchronized(this) {
this.expansionMode = expansionMode;
}
}