V
- type of the accessed objectspublic interface Data<V>
Modifier and Type | Method and Description |
---|---|
RandomDataInput |
bytes() |
static boolean |
bytesEquivalent(Data<?> d1,
Data<?> d2) |
default boolean |
equivalent(RandomDataInput source,
long sourceOffset) |
V |
get()
Returns "cached" object, generally not eligible for using outside some context, or a block,
synchronized with locks, or lambda, etc.
|
V |
getUsing(V usingInstance)
Reads the object from the value's bytes, trying to reuse the given object
(might be
null ). |
default long |
hash(LongHashFunction f) |
long |
offset()
Returns the offset to the value's bytes.
|
long |
size()
Returns the size of the value's bytes.
|
default void |
writeTo(RandomDataOutput target,
long targetOffset) |
RandomDataInput bytes()
long offset()
long size()
default long hash(LongHashFunction f)
default boolean equivalent(RandomDataInput source, long sourceOffset)
default void writeTo(RandomDataOutput target, long targetOffset)
V get()
If the Data
is object wrapper -- this method just returns this object.
V getUsing(@Nullable V usingInstance)
null
).Copyright © 2015. All rights reserved.