Interface RecordVisitor<T>
-
- Type Parameters:
T
- the returned type by the visitor if it owns a state.
- All Superinterfaces:
BiFunction<T,T,T>
,BinaryOperator<T>
,Supplier<T>
public interface RecordVisitor<T> extends Supplier<T>, BinaryOperator<T>
Visitor enabling to browse a record. All methods are adapters - implementing a no-op by default.
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default T
apply(T t1, T t2)
Enables to combine two visitors returned value (get()
).default T
get()
This is called to get the value extracted from this visitor.default void
onBoolean(Schema.Entry entry, Optional<Boolean> optionalBoolean)
default void
onBooleanArray(Schema.Entry entry, Optional<Collection<Boolean>> array)
default void
onBytes(Schema.Entry entry, Optional<byte[]> bytes)
default void
onBytesArray(Schema.Entry entry, Optional<Collection<byte[]>> array)
default void
onDatetime(Schema.Entry entry, Optional<ZonedDateTime> dateTime)
default void
onDatetimeArray(Schema.Entry entry, Optional<Collection<ZonedDateTime>> array)
default void
onDecimal(Schema.Entry entry, Optional<BigDecimal> decimal)
default void
onDecimalArray(Schema.Entry entry, Optional<Collection<BigDecimal>> array)
default void
onDouble(Schema.Entry entry, OptionalDouble optionalDouble)
default void
onDoubleArray(Schema.Entry entry, Optional<Collection<Double>> array)
default void
onFloat(Schema.Entry entry, OptionalDouble optionalFloat)
default void
onFloatArray(Schema.Entry entry, Optional<Collection<Float>> array)
default void
onInt(Schema.Entry entry, OptionalInt optionalInt)
default void
onIntArray(Schema.Entry entry, Optional<Collection<Integer>> array)
default void
onLong(Schema.Entry entry, OptionalLong optionalLong)
default void
onLongArray(Schema.Entry entry, Optional<Collection<Long>> array)
default RecordVisitor<T>
onRecord(Schema.Entry entry, Optional<Record> record)
default RecordVisitor<T>
onRecordArray(Schema.Entry entry, Optional<Collection<Record>> array)
default void
onString(Schema.Entry entry, Optional<String> string)
default void
onStringArray(Schema.Entry entry, Optional<Collection<String>> array)
-
Methods inherited from interface java.util.function.BiFunction
andThen
-
-
-
-
Method Detail
-
get
default T get()
This is called to get the value extracted from this visitor. It is also an exit callback for a record instance.
-
apply
default T apply(T t1, T t2)
Enables to combine two visitors returned value (get()
).- Specified by:
apply
in interfaceBiFunction<T,T,T>
- Parameters:
t1
- previous value, can be null.t2
- current value- Returns:
- the merged value of t1 and t2. By default it returns t1.
-
onInt
default void onInt(Schema.Entry entry, OptionalInt optionalInt)
-
onLong
default void onLong(Schema.Entry entry, OptionalLong optionalLong)
-
onFloat
default void onFloat(Schema.Entry entry, OptionalDouble optionalFloat)
-
onDouble
default void onDouble(Schema.Entry entry, OptionalDouble optionalDouble)
-
onBoolean
default void onBoolean(Schema.Entry entry, Optional<Boolean> optionalBoolean)
-
onString
default void onString(Schema.Entry entry, Optional<String> string)
-
onDatetime
default void onDatetime(Schema.Entry entry, Optional<ZonedDateTime> dateTime)
-
onDecimal
default void onDecimal(Schema.Entry entry, Optional<BigDecimal> decimal)
-
onBytes
default void onBytes(Schema.Entry entry, Optional<byte[]> bytes)
-
onRecord
default RecordVisitor<T> onRecord(Schema.Entry entry, Optional<Record> record)
-
onIntArray
default void onIntArray(Schema.Entry entry, Optional<Collection<Integer>> array)
-
onLongArray
default void onLongArray(Schema.Entry entry, Optional<Collection<Long>> array)
-
onFloatArray
default void onFloatArray(Schema.Entry entry, Optional<Collection<Float>> array)
-
onDoubleArray
default void onDoubleArray(Schema.Entry entry, Optional<Collection<Double>> array)
-
onBooleanArray
default void onBooleanArray(Schema.Entry entry, Optional<Collection<Boolean>> array)
-
onStringArray
default void onStringArray(Schema.Entry entry, Optional<Collection<String>> array)
-
onDatetimeArray
default void onDatetimeArray(Schema.Entry entry, Optional<Collection<ZonedDateTime>> array)
-
onDecimalArray
default void onDecimalArray(Schema.Entry entry, Optional<Collection<BigDecimal>> array)
-
onBytesArray
default void onBytesArray(Schema.Entry entry, Optional<Collection<byte[]>> array)
-
onRecordArray
default RecordVisitor<T> onRecordArray(Schema.Entry entry, Optional<Collection<Record>> array)
-
-