Package io.debezium.document
Class ComparableValue
java.lang.Object
io.debezium.document.ComparableValue
- All Implemented Interfaces:
Value,Comparable<Value>
- Author:
- Randall Hauch
-
Nested Class Summary
Nested classes/interfaces inherited from interface io.debezium.document.Value
Value.NullHandler, Value.Type -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Map<Class<?>,Value.Type> private final Comparable<?> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionasArray()byte[]asBytes()asDouble()asFloat()asLong()asNumber()Comparable<?>asObject()Get the raw value.asString()clone()Obtain a clone of this value.intconvert()Get a Value representation that will convert attempt to convert values.booleangetType()inthashCode()booleanisArray()booleanbooleanbooleanisBinary()booleanbooleanbooleanisDouble()booleanisFloat()booleanbooleanisLong()booleanisNull()booleanisNumber()booleanisString()private static booleanisValidFloat(double value) private static booleanisValidInteger(long value) toString()(package private) static Value.TypetypeForValue(Value value) Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface io.debezium.document.Value
comparable, ifArray, ifBigDecimal, ifBigInteger, ifBinary, ifBoolean, ifDocument, ifDouble, ifFloat, ifInteger, ifLong, ifNull, ifString, isNotNull
-
Field Details
-
TYPES_BY_CLASS
-
value
-
-
Constructor Details
-
ComparableValue
ComparableValue(Comparable<?> value)
-
-
Method Details
-
typeForValue
-
hashCode
public int hashCode() -
equals
-
toString
-
compareTo
- Specified by:
compareToin interfaceComparable<Value>
-
getType
-
asObject
Description copied from interface:ValueGet the raw value. -
asString
-
asInteger
-
isValidInteger
private static boolean isValidInteger(long value) -
isValidFloat
private static boolean isValidFloat(double value) -
asLong
-
asBoolean
-
asNumber
-
asBigInteger
- Specified by:
asBigIntegerin interfaceValue
-
asBigDecimal
- Specified by:
asBigDecimalin interfaceValue
-
asFloat
-
asDouble
-
asDocument
- Specified by:
asDocumentin interfaceValue
-
asArray
-
isNull
public boolean isNull() -
isString
public boolean isString() -
isBoolean
public boolean isBoolean() -
isInteger
public boolean isInteger() -
isLong
public boolean isLong() -
isFloat
public boolean isFloat() -
isDouble
public boolean isDouble() -
isNumber
public boolean isNumber() -
isBigInteger
public boolean isBigInteger()- Specified by:
isBigIntegerin interfaceValue
-
isBigDecimal
public boolean isBigDecimal()- Specified by:
isBigDecimalin interfaceValue
-
isDocument
public boolean isDocument()- Specified by:
isDocumentin interfaceValue
-
isArray
public boolean isArray() -
isBinary
public boolean isBinary() -
asBytes
public byte[] asBytes() -
convert
Description copied from interface:ValueGet a Value representation that will convert attempt to convert values. -
clone
Description copied from interface:ValueObtain a clone of this value.
-