@Immutable final class ComparableValue extends Object implements Value
Value.NullHandler, Value.Type| Modifier and Type | Field and Description |
|---|---|
private static Map<Class<?>,Value.Type> |
TYPES_BY_CLASS |
private Comparable<?> |
value |
| Constructor and Description |
|---|
ComparableValue(Comparable<?> value) |
| Modifier and Type | Method and Description |
|---|---|
Array |
asArray() |
BigDecimal |
asBigDecimal() |
BigInteger |
asBigInteger() |
Boolean |
asBoolean() |
byte[] |
asBytes() |
Document |
asDocument() |
Double |
asDouble() |
Float |
asFloat() |
Integer |
asInteger() |
Long |
asLong() |
Number |
asNumber() |
Comparable<?> |
asObject()
Get the raw value.
|
String |
asString() |
Value |
clone()
Obtain a clone of this value.
|
int |
compareTo(Value that) |
Value |
convert()
Get a Value representation that will convert attempt to convert values.
|
boolean |
equals(Object obj) |
Value.Type |
getType() |
int |
hashCode() |
boolean |
isArray() |
boolean |
isBigDecimal() |
boolean |
isBigInteger() |
boolean |
isBinary() |
boolean |
isBoolean() |
boolean |
isDocument() |
boolean |
isDouble() |
boolean |
isFloat() |
boolean |
isInteger() |
boolean |
isLong() |
boolean |
isNull() |
boolean |
isNumber() |
boolean |
isString() |
private static boolean |
isValidFloat(double value) |
private static boolean |
isValidInteger(long value) |
String |
toString() |
(package private) static Value.Type |
typeForValue(Value value) |
finalize, getClass, notify, notifyAll, wait, wait, waitcomparable, compareTo, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, ifArray, ifBigDecimal, ifBigInteger, ifBinary, ifBoolean, ifDocument, ifDouble, ifFloat, ifInteger, ifLong, ifNull, ifString, isNotNull, isNull, isValid, notNull, nullValueprivate static final Map<Class<?>,Value.Type> TYPES_BY_CLASS
private final Comparable<?> value
ComparableValue(Comparable<?> value)
static Value.Type typeForValue(Value value)
public int compareTo(Value that)
compareTo in interface Comparable<Value>public Value.Type getType()
public Comparable<?> asObject()
Valueprivate static boolean isValidInteger(long value)
private static boolean isValidFloat(double value)
public BigInteger asBigInteger()
asBigInteger in interface Valuepublic BigDecimal asBigDecimal()
asBigDecimal in interface Valuepublic Document asDocument()
asDocument in interface Valuepublic boolean isBigInteger()
isBigInteger in interface Valuepublic boolean isBigDecimal()
isBigDecimal in interface Valuepublic boolean isDocument()
isDocument in interface Valuepublic Value convert()
ValueCopyright © 2021 JBoss by Red Hat. All rights reserved.