本文整理了Java中java.math.MathContext.checkValid()
方法的一些代码示例,展示了MathContext.checkValid()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。MathContext.checkValid()
方法的具体详情如下:
包路径:java.math.MathContext
类名称:MathContext
方法名:checkValid
暂无
代码示例来源:origin: robovm/robovm
/**
* Constructs a new {@code MathContext} with the specified precision and
* with the specified rounding mode. If the precision passed is zero, then
* this implies that the computations have to be performed exact, the
* rounding mode in this case is irrelevant.
*
* @param precision
* the precision for the new {@code MathContext}.
* @param roundingMode
* the rounding mode for the new {@code MathContext}.
* @throws IllegalArgumentException
* if {@code precision < 0}.
* @throws NullPointerException
* if {@code roundingMode} is {@code null}.
*/
public MathContext(int precision, RoundingMode roundingMode) {
this.precision = precision;
this.roundingMode = roundingMode;
checkValid();
}
代码示例来源:origin: robovm/robovm
/**
* Makes checks upon deserialization of a {@code MathContext} instance.
* Checks whether {@code precision >= 0} and {@code roundingMode != null}
*
* @throws StreamCorruptedException
* if {@code precision < 0}
* @throws StreamCorruptedException
* if {@code roundingMode == null}
*/
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
try {
checkValid();
} catch (Exception ex) {
throw new StreamCorruptedException(ex.getMessage());
}
}
}
代码示例来源:origin: robovm/robovm
this.roundingMode = RoundingMode.valueOf(s.substring(roundingModeStart));
checkValid();
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Constructs a new {@code MathContext} with the specified precision and
* with the specified rounding mode. If the precision passed is zero, then
* this implies that the computations have to be performed exact, the
* rounding mode in this case is irrelevant.
*
* @param precision
* the precision for the new {@code MathContext}.
* @param roundingMode
* the rounding mode for the new {@code MathContext}.
* @throws IllegalArgumentException
* if {@code precision < 0}.
* @throws NullPointerException
* if {@code roundingMode} is {@code null}.
*/
public MathContext(int precision, RoundingMode roundingMode) {
this.precision = precision;
this.roundingMode = roundingMode;
checkValid();
}
代码示例来源:origin: MobiVM/robovm
/**
* Constructs a new {@code MathContext} with the specified precision and
* with the specified rounding mode. If the precision passed is zero, then
* this implies that the computations have to be performed exact, the
* rounding mode in this case is irrelevant.
*
* @param precision
* the precision for the new {@code MathContext}.
* @param roundingMode
* the rounding mode for the new {@code MathContext}.
* @throws IllegalArgumentException
* if {@code precision < 0}.
* @throws NullPointerException
* if {@code roundingMode} is {@code null}.
*/
public MathContext(int precision, RoundingMode roundingMode) {
this.precision = precision;
this.roundingMode = roundingMode;
checkValid();
}
代码示例来源:origin: ibinti/bugvm
/**
* Constructs a new {@code MathContext} with the specified precision and
* with the specified rounding mode. If the precision passed is zero, then
* this implies that the computations have to be performed exact, the
* rounding mode in this case is irrelevant.
*
* @param precision
* the precision for the new {@code MathContext}.
* @param roundingMode
* the rounding mode for the new {@code MathContext}.
* @throws IllegalArgumentException
* if {@code precision < 0}.
* @throws NullPointerException
* if {@code roundingMode} is {@code null}.
*/
public MathContext(int precision, RoundingMode roundingMode) {
this.precision = precision;
this.roundingMode = roundingMode;
checkValid();
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Constructs a new {@code MathContext} with the specified precision and
* with the specified rounding mode. If the precision passed is zero, then
* this implies that the computations have to be performed exact, the
* rounding mode in this case is irrelevant.
*
* @param precision
* the precision for the new {@code MathContext}.
* @param roundingMode
* the rounding mode for the new {@code MathContext}.
* @throws IllegalArgumentException
* if {@code precision < 0}.
* @throws NullPointerException
* if {@code roundingMode} is {@code null}.
*/
public MathContext(int precision, RoundingMode roundingMode) {
this.precision = precision;
this.roundingMode = roundingMode;
checkValid();
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Constructs a new {@code MathContext} with the specified precision and
* with the specified rounding mode. If the precision passed is zero, then
* this implies that the computations have to be performed exact, the
* rounding mode in this case is irrelevant.
*
* @param precision
* the precision for the new {@code MathContext}.
* @param roundingMode
* the rounding mode for the new {@code MathContext}.
* @throws IllegalArgumentException
* if {@code precision < 0}.
* @throws NullPointerException
* if {@code roundingMode} is {@code null}.
*/
public MathContext(int precision, RoundingMode roundingMode) {
this.precision = precision;
this.roundingMode = roundingMode;
checkValid();
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Constructs a new {@code MathContext} with the specified precision and
* with the specified rounding mode. If the precision passed is zero, then
* this implies that the computations have to be performed exact, the
* rounding mode in this case is irrelevant.
*
* @param precision
* the precision for the new {@code MathContext}.
* @param roundingMode
* the rounding mode for the new {@code MathContext}.
* @throws IllegalArgumentException
* if {@code precision < 0}.
* @throws NullPointerException
* if {@code roundingMode} is {@code null}.
*/
public MathContext(int precision, RoundingMode roundingMode) {
this.precision = precision;
this.roundingMode = roundingMode;
checkValid();
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Constructs a new {@code MathContext} with the specified precision and
* with the specified rounding mode. If the precision passed is zero, then
* this implies that the computations have to be performed exact, the
* rounding mode in this case is irrelevant.
*
* @param precision
* the precision for the new {@code MathContext}.
* @param roundingMode
* the rounding mode for the new {@code MathContext}.
* @throws IllegalArgumentException
* if {@code precision < 0}.
* @throws NullPointerException
* if {@code roundingMode} is {@code null}.
*/
public MathContext(int precision, RoundingMode roundingMode) {
this.precision = precision;
this.roundingMode = roundingMode;
checkValid();
}
代码示例来源:origin: com.jtransc/jtransc-rt
/**
* Makes checks upon deserialization of a {@code MathContext} instance.
* Checks whether {@code precision >= 0} and {@code roundingMode != null}
*
* @throws StreamCorruptedException
* if {@code precision < 0}
* @throws StreamCorruptedException
* if {@code roundingMode == null}
*/
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
try {
checkValid();
} catch (Exception ex) {
throw new StreamCorruptedException(ex.getMessage());
}
}
}
代码示例来源:origin: MobiVM/robovm
/**
* Makes checks upon deserialization of a {@code MathContext} instance.
* Checks whether {@code precision >= 0} and {@code roundingMode != null}
*
* @throws StreamCorruptedException
* if {@code precision < 0}
* @throws StreamCorruptedException
* if {@code roundingMode == null}
*/
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
try {
checkValid();
} catch (Exception ex) {
throw new StreamCorruptedException(ex.getMessage());
}
}
}
代码示例来源:origin: ibinti/bugvm
/**
* Makes checks upon deserialization of a {@code MathContext} instance.
* Checks whether {@code precision >= 0} and {@code roundingMode != null}
*
* @throws StreamCorruptedException
* if {@code precision < 0}
* @throws StreamCorruptedException
* if {@code roundingMode == null}
*/
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
try {
checkValid();
} catch (Exception ex) {
throw new StreamCorruptedException(ex.getMessage());
}
}
}
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
/**
* Makes checks upon deserialization of a {@code MathContext} instance.
* Checks whether {@code precision >= 0} and {@code roundingMode != null}
*
* @throws StreamCorruptedException
* if {@code precision < 0}
* @throws StreamCorruptedException
* if {@code roundingMode == null}
*/
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
try {
checkValid();
} catch (Exception ex) {
throw new StreamCorruptedException(ex.getMessage());
}
}
}
代码示例来源:origin: com.bugvm/bugvm-rt
/**
* Makes checks upon deserialization of a {@code MathContext} instance.
* Checks whether {@code precision >= 0} and {@code roundingMode != null}
*
* @throws StreamCorruptedException
* if {@code precision < 0}
* @throws StreamCorruptedException
* if {@code roundingMode == null}
*/
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
try {
checkValid();
} catch (Exception ex) {
throw new StreamCorruptedException(ex.getMessage());
}
}
}
代码示例来源:origin: com.gluonhq/robovm-rt
/**
* Makes checks upon deserialization of a {@code MathContext} instance.
* Checks whether {@code precision >= 0} and {@code roundingMode != null}
*
* @throws StreamCorruptedException
* if {@code precision < 0}
* @throws StreamCorruptedException
* if {@code roundingMode == null}
*/
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
try {
checkValid();
} catch (Exception ex) {
throw new StreamCorruptedException(ex.getMessage());
}
}
}
代码示例来源:origin: FlexoVM/flexovm
/**
* Makes checks upon deserialization of a {@code MathContext} instance.
* Checks whether {@code precision >= 0} and {@code roundingMode != null}
*
* @throws StreamCorruptedException
* if {@code precision < 0}
* @throws StreamCorruptedException
* if {@code roundingMode == null}
*/
private void readObject(ObjectInputStream s) throws IOException, ClassNotFoundException {
s.defaultReadObject();
try {
checkValid();
} catch (Exception ex) {
throw new StreamCorruptedException(ex.getMessage());
}
}
}
代码示例来源:origin: ibinti/bugvm
this.roundingMode = RoundingMode.valueOf(s.substring(roundingModeStart));
checkValid();
代码示例来源:origin: com.mobidevelop.robovm/robovm-rt
this.roundingMode = RoundingMode.valueOf(s.substring(roundingModeStart));
checkValid();
代码示例来源:origin: MobiVM/robovm
this.roundingMode = RoundingMode.valueOf(s.substring(roundingModeStart));
checkValid();
内容来源于网络,如有侵权,请联系作者删除!