Package org.vast.data

Class DataBlockTuple

All Implemented Interfaces:
Serializable, DataBlock

public class DataBlockTuple extends AbstractDataBlock

Uses the composite pattern to carry a fixed size array of mixed types DataBlocks. If dynamic size is needed, use DataBlockList. Children datablocks will be read in parallel. Designed specifically for DataGroups. (slightly more performant than DataBlockParallel for the case of a group of scalars of different data types)

See Also:
  • Field Details

  • Constructor Details

    • DataBlockTuple

      public DataBlockTuple()
    • DataBlockTuple

      public DataBlockTuple(int numBlocks)
  • Method Details

    • copy

      public DataBlockTuple copy()
      Description copied from class: AbstractDataBlock
      Shallow copy of datablock structure The underlying object is shared
      Specified by:
      copy in interface DataBlock
      Specified by:
      copy in class AbstractDataBlock
    • renew

      public DataBlockTuple renew()
      Description copied from class: AbstractDataBlock
      Regenerate an identical datablock of same size with a new underlying object
      Specified by:
      renew in interface DataBlock
      Specified by:
      renew in class AbstractDataBlock
      Returns:
      new data block
    • clone

      public DataBlockTuple clone()
      Description copied from class: AbstractDataBlock
      Full copy of datablock structure and values A new underlying object is created with the same values
      Specified by:
      clone in interface DataBlock
      Specified by:
      clone in class AbstractDataBlock
    • getUnderlyingObject

      public AbstractDataBlock[] getUnderlyingObject()
      Description copied from class: AbstractDataBlock
      Allow direct access to underlying object carrying the data (usually a primitive array or composite)
      Specified by:
      getUnderlyingObject in interface DataBlock
      Specified by:
      getUnderlyingObject in class AbstractDataBlock
      Returns:
      underlying object
    • setUnderlyingObject

      public void setUnderlyingObject(AbstractDataBlock[] blockArray)
    • setUnderlyingObject

      public void setUnderlyingObject(Object obj)
      Description copied from class: AbstractDataBlock
      Allows to set the underlying object directly
      Specified by:
      setUnderlyingObject in interface DataBlock
      Specified by:
      setUnderlyingObject in class AbstractDataBlock
    • getDataType

      public DataType getDataType()
    • getDataType

      public DataType getDataType(int index)
    • resize

      public void resize(int size)
    • toString

      public String toString()
      Overrides:
      toString in class AbstractDataBlock
    • getBooleanValue

      public boolean getBooleanValue(int index)
    • getByteValue

      public byte getByteValue(int index)
    • getShortValue

      public short getShortValue(int index)
    • getIntValue

      public int getIntValue(int index)
    • getLongValue

      public long getLongValue(int index)
    • getFloatValue

      public float getFloatValue(int index)
    • getDoubleValue

      public double getDoubleValue(int index)
    • getStringValue

      public String getStringValue(int index)
    • getBooleanValue

      public boolean getBooleanValue()
    • getByteValue

      public byte getByteValue()
    • getShortValue

      public short getShortValue()
    • getIntValue

      public int getIntValue()
    • getLongValue

      public long getLongValue()
    • getFloatValue

      public float getFloatValue()
    • getDoubleValue

      public double getDoubleValue()
    • getStringValue

      public String getStringValue()
    • setBooleanValue

      public void setBooleanValue(int index, boolean value)
    • setByteValue

      public void setByteValue(int index, byte value)
    • setShortValue

      public void setShortValue(int index, short value)
    • setIntValue

      public void setIntValue(int index, int value)
    • setLongValue

      public void setLongValue(int index, long value)
    • setFloatValue

      public void setFloatValue(int index, float value)
    • setDoubleValue

      public void setDoubleValue(int index, double value)
    • setStringValue

      public void setStringValue(int index, String value)
    • setBooleanValue

      public void setBooleanValue(boolean value)
    • setByteValue

      public void setByteValue(byte value)
    • setShortValue

      public void setShortValue(short value)
    • setIntValue

      public void setIntValue(int value)
    • setLongValue

      public void setLongValue(long value)
    • setFloatValue

      public void setFloatValue(float value)
    • setDoubleValue

      public void setDoubleValue(double value)
    • setStringValue

      public void setStringValue(String value)