public class Value
extends java.lang.Object
Constructor and Description |
---|
Value(java.lang.String v)
Constructs a value.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object o) |
int |
hashCode() |
java.math.BigInteger |
toBigInt()
Gets a value parsed as a decimal integer.
|
java.math.BigInteger |
toBigInt(int radix)
Gets a value parsed as either "true" or "false".
|
boolean |
toBoolean()
Gets a value parsed as either "true" or "false".
|
java.math.BigDecimal |
toDecimal()
Gets a value parsed as a decimal floating point number.
|
Duration |
toDuration()
Gets a value parsed as a time duration.
|
float |
toFloat()
Gets a value parsed as a decimal floating point number.
|
int |
toInt()
Gets a value parsed as a decimal integer.
|
int |
toInt(int radix)
Gets a value parsed as either "true" or "false".
|
ListValue |
toList()
Gets a value parsed as lists of values.
|
MemorySize |
toMemorySize()
Gets a value parsed as an amount of memory.
|
java.lang.String |
toString() |
DimensionedValue |
withUnit()
Gets a value parsed as a value with its unit.
|
public Value(java.lang.String v)
v
- must not be nullpublic java.lang.String toString()
toString
in class java.lang.Object
public boolean toBoolean()
public int toInt()
public int toInt(int radix)
radix
- the number base requiredpublic java.math.BigInteger toBigInt()
public java.math.BigInteger toBigInt(int radix)
radix
- the number base requiredpublic float toFloat()
public java.math.BigDecimal toDecimal()
public DimensionedValue withUnit()
public Duration toDuration()
public MemorySize toMemorySize()
public ListValue toList()
public final boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public final int hashCode()
hashCode
in class java.lang.Object