@Immutable public interface Value extends Comparable<Value>
Document or Array. Note that compareTo(io.debezium.document.Value, io.debezium.document.Value) might perform literal comparisons;
to perform semantic comparisons, use comparable() to obtain a wrapped value with semantic comparison capability.| Modifier and Type | Interface and Description |
|---|---|
static interface |
Value.NullHandler |
static class |
Value.Type |
| 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() |
Object |
asObject()
Get the raw value.
|
String |
asString() |
Value |
clone()
Obtain a clone of this value.
|
default Value |
comparable()
Get a Value representation that will allow semantic comparison of values, rather than the literal comparison normally
performed by
compareTo(io.debezium.document.Value, io.debezium.document.Value). |
static int |
compareTo(Value value1,
Value value2)
Compare two
Value objects, which may or may not be null. |
Value |
convert()
Get a Value representation that will convert attempt to convert values.
|
static Value |
create(Array value) |
static Value |
create(BigDecimal value) |
static Value |
create(BigInteger value) |
static Value |
create(boolean value) |
static Value |
create(byte[] value) |
static Value |
create(Document value) |
static Value |
create(double value) |
static Value |
create(Double value) |
static Value |
create(float value) |
static Value |
create(Float value) |
static Value |
create(int value) |
static Value |
create(Integer value) |
static Value |
create(long value) |
static Value |
create(Long value) |
static Value |
create(Object value) |
static Value |
create(String value) |
default Value.Type |
getType() |
default boolean |
ifArray(Consumer<Array> consumer)
If a value is an array, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifBigDecimal(Consumer<BigDecimal> consumer)
If a value is a variable-sized decimal, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifBigInteger(Consumer<BigInteger> consumer)
If a value is a variable-sized integer, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifBinary(Consumer<byte[]> consumer)
If a value is a byte array, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifBoolean(Consumer<Boolean> consumer)
If a value is a boolean value, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifDocument(Consumer<Document> consumer)
If a value is a document, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifDouble(DoubleConsumer consumer)
If a value is a double, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifFloat(DoubleConsumer consumer)
If a value is a float, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifInteger(IntConsumer consumer)
If a value is an integer, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifLong(LongConsumer consumer)
If a value is a long, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifNull(Value.NullHandler consumer)
If a value is a variable-sized integer, invoke the specified consumer with the value, otherwise do nothing.
|
default boolean |
ifString(Consumer<String> consumer)
If a value is a string, invoke the specified consumer with the value, otherwise do nothing.
|
boolean |
isArray() |
boolean |
isBigDecimal() |
boolean |
isBigInteger() |
boolean |
isBinary() |
boolean |
isBoolean() |
boolean |
isDocument() |
boolean |
isDouble() |
boolean |
isFloat() |
boolean |
isInteger() |
boolean |
isLong() |
default boolean |
isNotNull() |
boolean |
isNull() |
static boolean |
isNull(Value value) |
boolean |
isNumber() |
boolean |
isString() |
static boolean |
isValid(Object value) |
static boolean |
notNull(Value value) |
static Value |
nullValue() |
compareTostatic boolean isNull(Value value)
static boolean notNull(Value value)
static boolean isValid(Object value)
static int compareTo(Value value1, Value value2)
Value objects, which may or may not be null.value1 - the first value object, may be nullvalue2 - the second value object, which may be nullstatic Value create(boolean value)
static Value create(int value)
static Value create(long value)
static Value create(float value)
static Value create(double value)
static Value create(BigInteger value)
static Value create(BigDecimal value)
static Value create(byte[] value)
static Value nullValue()
default Value.Type getType()
Object asObject()
String asString()
Integer asInteger()
Long asLong()
Boolean asBoolean()
Number asNumber()
BigInteger asBigInteger()
BigDecimal asBigDecimal()
Float asFloat()
Double asDouble()
Document asDocument()
Array asArray()
byte[] asBytes()
boolean isNull()
default boolean isNotNull()
boolean isString()
boolean isInteger()
boolean isLong()
boolean isBoolean()
boolean isNumber()
boolean isBigInteger()
boolean isBigDecimal()
boolean isFloat()
boolean isDouble()
boolean isDocument()
boolean isArray()
boolean isBinary()
Value convert()
default Value comparable()
compareTo(io.debezium.document.Value, io.debezium.document.Value).Value clone()
default boolean ifDocument(Consumer<Document> consumer)
consumer - block to be executed if the value is a documentdefault boolean ifArray(Consumer<Array> consumer)
consumer - block to be executed if the value is an arraydefault boolean ifString(Consumer<String> consumer)
consumer - block to be executed if the value is a stringdefault boolean ifBoolean(Consumer<Boolean> consumer)
consumer - block to be executed if the value is a booleandefault boolean ifBinary(Consumer<byte[]> consumer)
consumer - block to be executed if the value is a byte arraydefault boolean ifInteger(IntConsumer consumer)
consumer - block to be executed if the value is an integerdefault boolean ifLong(LongConsumer consumer)
consumer - block to be executed if the value is a longdefault boolean ifFloat(DoubleConsumer consumer)
consumer - block to be executed if the value is a floatdefault boolean ifDouble(DoubleConsumer consumer)
consumer - block to be executed if the value is a doubledefault boolean ifBigInteger(Consumer<BigInteger> consumer)
consumer - block to be executed if the value is a big integerdefault boolean ifBigDecimal(Consumer<BigDecimal> consumer)
consumer - block to be executed if the value is a big decimaldefault boolean ifNull(Value.NullHandler consumer)
consumer - block to be executed if the value is a big integerCopyright © 2021 JBoss by Red Hat. All rights reserved.