private static class RecordMeta.DynamicInitializer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
private java.util.BitSet |
properties
A bit set of the indices of the properties to which the initial value should be applied.
|
private java.util.function.Supplier<java.lang.Object> |
supplier
Supplier function which provides the initial value.
|
| Constructor and Description |
|---|
DynamicInitializer(java.util.function.Supplier<java.lang.Object> supplier,
int propSize)
Constructor.
|
| Modifier and Type | Method and Description |
|---|---|
(package private) void |
apply(java.lang.Object[] data)
Invoke the supplier function and store its result in the record's data array for all registered
properties.
|
(package private) void |
registerProperty(int index)
Register a property to receive the supplier's result as its initial data value.
|
private final java.util.function.Supplier<java.lang.Object> supplier
private final java.util.BitSet properties
DynamicInitializer(java.util.function.Supplier<java.lang.Object> supplier,
int propSize)
supplier - Supplier function which provides the initial value.propSize - The length of the record's data array.void registerProperty(int index)
index - 0-based index of the property in the record's data array.void apply(java.lang.Object[] data)
data - Record's data array.