DataStorageVisitor

public interface DataStorageVisitor

Visit the backing storage of DataBuffer instances.

Public Methods

abstract R
fallback()
Fallback method called if the visitor implementation does not support the type of backing storage for a given DataBuffer

The implementor of this interface must override the visit methods for type of storage it supports.

abstract R
visit(ByteBuffer buffer)
Visit the ByteBuffer backing a given instance of a DataBuffer
abstract R
visit(DoubleBuffer buffer)
Visit the DoubleBuffer backing a given instance of a DataBuffer
abstract R
visit(LongBuffer buffer)
Visit the LongBuffer backing a given instance of a DataBuffer
abstract R
visit(boolean[] array, int offset, int length)
Visit the boolean array backing a given instance of a DataBuffer
abstract R
visit(FloatBuffer buffer)
Visit the FloatBuffer backing a given instance of a DataBuffer
abstract R
visit(Object[] array, int offset, int length)
Visit the object array backing a given instance of a DataBuffer
abstract R
visit(ShortBuffer buffer)
Visit the ShortBuffer backing a given instance of a DataBuffer
abstract R
visit(long address, long length, long scale)
Visit the raw memory segment of a given instance of a DataBuffer
abstract R
visit(IntBuffer buffer)
Visit the IntBuffer backing a given instance of a DataBuffer
abstract R
visit(BitSet bitSet, int offset, long numBits)
Visit the bit set backing a given instance of a DataBuffer

Public Methods

public abstract R fallback ()

Fallback method called if the visitor implementation does not support the type of backing storage for a given DataBuffer

The implementor of this interface must override the visit methods for type of storage it supports. If accept(DataStorageVisitor) is called on a buffer using a different type of storage, the invocation will fallback to this method.

Returns
  • any value

public abstract R visit (ByteBuffer buffer)

Visit the ByteBuffer backing a given instance of a DataBuffer

Parameters
buffer underlying buffer
Returns
  • any value

public abstract R visit (DoubleBuffer buffer)

Visit the DoubleBuffer backing a given instance of a DataBuffer

Parameters
buffer underlying buffer
Returns
  • any value

public abstract R visit (LongBuffer buffer)

Visit the LongBuffer backing a given instance of a DataBuffer

Parameters
buffer underlying buffer
Returns
  • any value

public abstract R visit (boolean[] array, int offset, int length)

Visit the boolean array backing a given instance of a DataBuffer

Parameters
array underlying array
offset offset of the buffer within the array
length length of the buffer within the array
Returns
  • any value

public abstract R visit (FloatBuffer buffer)

Visit the FloatBuffer backing a given instance of a DataBuffer

Parameters
buffer underlying buffer
Returns
  • any value

public abstract R visit (Object[] array, int offset, int length)

Visit the object array backing a given instance of a DataBuffer

Parameters
array underlying array
offset offset of the buffer within the array
length length of the buffer within the array
Returns
  • any value

public abstract R visit (ShortBuffer buffer)

Visit the ShortBuffer backing a given instance of a DataBuffer

Parameters
buffer underlying buffer
Returns
  • any value

public abstract R visit (long address, long length, long scale)

Visit the raw memory segment of a given instance of a DataBuffer

Parameters
address native address of the buffer
length length of the buffer
scale number of bytes required to store a single value of this buffer
Returns
  • any value

public abstract R visit (IntBuffer buffer)

Visit the IntBuffer backing a given instance of a DataBuffer

Parameters
buffer underlying buffer
Returns
  • any value

public abstract R visit (BitSet bitSet, int offset, long numBits)

Visit the bit set backing a given instance of a DataBuffer

Parameters
bitSet underlying bit set
offset offset of the buffer within the bit set
numBits number of bits used to represent the buffer within the bit set
Returns
  • any value