Class BigDecimalNode
java.lang.Object
cool.scx.object.node.BigDecimalNode
- All Implemented Interfaces:
Node,NumberNode,ValueNode
BigDecimalNode
- Version:
- 0.0.1
- Author:
- scx567888
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription转换为 BigDecimal转换为 BigInteger (不保证精度, 可能会发生截断)boolean转换为 booleandoubleasDouble()转换为 double (不保证精度, 可能会发生截断)floatasFloat()转换为 float (不保证精度, 可能会发生截断)intasInt()转换为 int (不保证精度, 可能会发生截断)longasLong()转换为 long (不保证精度, 可能会发生截断)asText()转换为 StringdeepCopy()值类型不可变 返回 this 即可booleaninthashCode()toString()value()
-
Constructor Details
-
BigDecimalNode
-
-
Method Details
-
value
-
asInt
public int asInt()Description copied from interface:ValueNode转换为 int (不保证精度, 可能会发生截断)- Specified by:
asIntin interfaceNumberNode- Specified by:
asIntin interfaceValueNode- Returns:
- int
-
asLong
public long asLong()Description copied from interface:ValueNode转换为 long (不保证精度, 可能会发生截断)- Specified by:
asLongin interfaceNumberNode- Specified by:
asLongin interfaceValueNode- Returns:
- long
-
asFloat
public float asFloat()Description copied from interface:ValueNode转换为 float (不保证精度, 可能会发生截断)- Specified by:
asFloatin interfaceNumberNode- Specified by:
asFloatin interfaceValueNode- Returns:
- float
-
asDouble
public double asDouble()Description copied from interface:ValueNode转换为 double (不保证精度, 可能会发生截断)- Specified by:
asDoublein interfaceNumberNode- Specified by:
asDoublein interfaceValueNode- Returns:
- double
-
asBigInteger
Description copied from interface:ValueNode转换为 BigInteger (不保证精度, 可能会发生截断)- Specified by:
asBigIntegerin interfaceNumberNode- Specified by:
asBigIntegerin interfaceValueNode- Returns:
- BigInteger
-
asBigDecimal
Description copied from interface:ValueNode转换为 BigDecimal- Specified by:
asBigDecimalin interfaceNumberNode- Specified by:
asBigDecimalin interfaceValueNode- Returns:
- BigDecimal
-
asText
-
asBoolean
public boolean asBoolean()Description copied from interface:ValueNode转换为 boolean
对于 数值类型 value != 0 对于 文本类型 "true".equalsIgnoreCase(s)
- Specified by:
asBooleanin interfaceNumberNode- Specified by:
asBooleanin interfaceValueNode- Returns:
- boolean
-
deepCopy
值类型不可变 返回 this 即可 -
equals
-
hashCode
-
toString
-