Package org.vast.data

Class DataBlockMixed

All Implemented Interfaces:
Serializable, DataBlock

public class DataBlockMixed 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 sequentially.

See Also:
  • Field Details

    • blockArray

      protected AbstractDataBlock[] blockArray
    • blockIndex

      protected int blockIndex
    • localIndex

      protected int localIndex
  • Constructor Details

    • DataBlockMixed

      public DataBlockMixed()
    • DataBlockMixed

      public DataBlockMixed(int numBlocks)
    • DataBlockMixed

      public DataBlockMixed(int numBlocks, int atomCount)
    • DataBlockMixed

      public DataBlockMixed(AbstractDataBlock... childBlocks)
  • Method Details

    • copy

      public DataBlockMixed 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 DataBlockMixed 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 DataBlockMixed 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)
    • updateAtomCount

      public void updateAtomCount()
      Description copied from class: AbstractDataBlock
      Recompute atom count after new child blocks have been added
      Specified by:
      updateAtomCount in interface DataBlock
      Overrides:
      updateAtomCount in class AbstractDataBlock
    • 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)
    • selectBlock

      protected void selectBlock(int index)
    • 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()
    • setBlock

      public void setBlock(int blockIndex, AbstractDataBlock dataBlock)
    • 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)