-
- Type Parameters:
R- value type returned by the visitor
public interface DataStorageVisitor<R>Visit the backing storage ofDataBufferinstances.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description Rfallback()Fallback method called if the visitor implementation does not support the type of backing storage for a givenDataBufferdefault Rvisit(boolean[] array, int offset, int length)Visit the boolean array backing a given instance of aDataBufferdefault Rvisit(long address, long length, long scale)Visit the raw memory segment of a given instance of aDataBufferdefault Rvisit(Object[] array, int offset, int length)Visit the object array backing a given instance of aDataBufferdefault Rvisit(ByteBuffer buffer)Visit theByteBufferbacking a given instance of aDataBufferdefault Rvisit(DoubleBuffer buffer)Visit theDoubleBufferbacking a given instance of aDataBufferdefault Rvisit(FloatBuffer buffer)Visit theFloatBufferbacking a given instance of aDataBufferdefault Rvisit(IntBuffer buffer)Visit theIntBufferbacking a given instance of aDataBufferdefault Rvisit(LongBuffer buffer)Visit theLongBufferbacking a given instance of aDataBufferdefault Rvisit(ShortBuffer buffer)Visit theShortBufferbacking a given instance of aDataBufferdefault Rvisit(BitSet bitSet, int offset, long numBits)Visit the bit set backing a given instance of aDataBuffer
-
-
-
Method Detail
-
visit
default R visit(ByteBuffer buffer)
Visit theByteBufferbacking a given instance of aDataBuffer- Parameters:
buffer- underlying buffer- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(ShortBuffer buffer)
Visit theShortBufferbacking a given instance of aDataBuffer- Parameters:
buffer- underlying buffer- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(IntBuffer buffer)
Visit theIntBufferbacking a given instance of aDataBuffer- Parameters:
buffer- underlying buffer- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(LongBuffer buffer)
Visit theLongBufferbacking a given instance of aDataBuffer- Parameters:
buffer- underlying buffer- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(FloatBuffer buffer)
Visit theFloatBufferbacking a given instance of aDataBuffer- Parameters:
buffer- underlying buffer- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(DoubleBuffer buffer)
Visit theDoubleBufferbacking a given instance of aDataBuffer- Parameters:
buffer- underlying buffer- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(boolean[] array, int offset, int length)
Visit the boolean array backing a given instance of aDataBuffer- Parameters:
array- underlying arrayoffset- offset of the buffer within the arraylength- length of the buffer within the array- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(BitSet bitSet, int offset, long numBits)
Visit the bit set backing a given instance of aDataBuffer- Parameters:
bitSet- underlying bit setoffset- offset of the buffer within the bit setnumBits- number of bits used to represent the buffer within the bit set- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(Object[] array, int offset, int length)
Visit the object array backing a given instance of aDataBuffer- Parameters:
array- underlying arrayoffset- offset of the buffer within the arraylength- length of the buffer within the array- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
visit
default R visit(long address, long length, long scale)
Visit the raw memory segment of a given instance of aDataBuffer- Parameters:
address- native address of the bufferlength- length of the bufferscale- number of bytes required to store a single value of this buffer- Returns:
- any value
- See Also:
DataBuffer.accept(DataStorageVisitor)
-
fallback
R fallback()
Fallback method called if the visitor implementation does not support the type of backing storage for a givenDataBufferThe implementor of this interface must override the
visitmethods for type of storage it supports. IfDataBuffer.accept(DataStorageVisitor)is called on a buffer using a different type of storage, the invocation will fallback to this method.- Returns:
- any value
-
-