Package org.vast.data

Class DataBlockList

All Implemented Interfaces:
Serializable, DataBlock

public class DataBlockList extends AbstractDataBlock

Uses the composite pattern to hold a list of child DataBlocks. This class also implements the DataBlock interface.

See Also:
  • Field Details

    • blockList

      protected List<DataBlock> blockList
    • blockAtomCount

      protected int blockAtomCount
    • blockIndex

      protected int blockIndex
    • localIndex

      protected int localIndex
    • equalBlockSize

      protected boolean equalBlockSize
  • Constructor Details

    • DataBlockList

      public DataBlockList(boolean equalItemSize)
    • DataBlockList

      public DataBlockList(int listSize, boolean equalItemSize)
    • DataBlockList

      public DataBlockList(int listSize, boolean useArrayList, boolean equalItemSize)
  • Method Details

    • copy

      public DataBlockList 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 DataBlockList 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 DataBlockList 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 List<DataBlock> 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(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)
    • 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
    • selectBlock

      protected final void selectBlock(int index)
    • blockIterator

      public ListIterator<DataBlock> blockIterator()
    • getListSize

      public int getListSize()
    • add

      public void add(DataBlock block)
    • add

      public void add(int blockIndex, AbstractDataBlock block)
    • set

      public void set(int blockIndex, DataBlock block)
    • get

      public DataBlock get(int blockIndex)
    • remove

      public void remove(AbstractDataBlock block)
    • remove

      public void remove(int blockIndex)
    • 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)