Package org.vast.data
Class DataBlockList
java.lang.Object
org.vast.data.AbstractDataBlock
org.vast.data.DataBlockList
- All Implemented Interfaces:
 Serializable,DataBlock
Uses the composite pattern to hold a list of child DataBlocks. This class also implements the DataBlock interface.
- See Also:
 
- 
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intprotected intprotected booleanprotected intFields inherited from class org.vast.data.AbstractDataBlock
atomCount, startIndex - 
Constructor Summary
ConstructorsConstructorDescriptionDataBlockList(boolean equalItemSize) DataBlockList(int listSize, boolean equalItemSize) DataBlockList(int listSize, boolean useArrayList, boolean equalItemSize)  - 
Method Summary
Modifier and TypeMethodDescriptionvoidadd(int blockIndex, AbstractDataBlock block) voidclone()Full copy of datablock structure and values A new underlying object is created with the same valuescopy()Shallow copy of datablock structure The underlying object is sharedget(int blockIndex) booleanbooleangetBooleanValue(int index) bytebytegetByteValue(int index) getDataType(int index) doubledoublegetDoubleValue(int index) floatfloatgetFloatValue(int index) intintgetIntValue(int index) intlonglonggetLongValue(int index) shortshortgetShortValue(int index) getStringValue(int index) Allow direct access to underlying object carrying the data (usually a primitive array or composite)voidremove(int blockIndex) voidremove(AbstractDataBlock block) renew()Regenerate an identical datablock of same size with a new underlying objectvoidresize(int size) protected final voidselectBlock(int index) voidvoidsetBooleanValue(boolean value) voidsetBooleanValue(int index, boolean value) voidsetByteValue(byte value) voidsetByteValue(int index, byte value) voidsetDoubleValue(double value) voidsetDoubleValue(int index, double value) voidsetFloatValue(float value) voidsetFloatValue(int index, float value) voidsetIntValue(int value) voidsetIntValue(int index, int value) voidsetLongValue(int index, long value) voidsetLongValue(long value) voidsetShortValue(int index, short value) voidsetShortValue(short value) voidsetStringValue(int index, String value) voidsetStringValue(String value) voidAllows to set the underlying object directlytoString()voidRecompute atom count after new child blocks have been addedMethods inherited from class org.vast.data.AbstractDataBlock
getAtomCount 
- 
Field Details
- 
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
Description copied from class:AbstractDataBlockShallow copy of datablock structure The underlying object is shared- Specified by:
 copyin interfaceDataBlock- Specified by:
 copyin classAbstractDataBlock
 - 
renew
Description copied from class:AbstractDataBlockRegenerate an identical datablock of same size with a new underlying object- Specified by:
 renewin interfaceDataBlock- Specified by:
 renewin classAbstractDataBlock- Returns:
 - new data block
 
 - 
clone
Description copied from class:AbstractDataBlockFull copy of datablock structure and values A new underlying object is created with the same values- Specified by:
 clonein interfaceDataBlock- Specified by:
 clonein classAbstractDataBlock
 - 
getUnderlyingObject
Description copied from class:AbstractDataBlockAllow direct access to underlying object carrying the data (usually a primitive array or composite)- Specified by:
 getUnderlyingObjectin interfaceDataBlock- Specified by:
 getUnderlyingObjectin classAbstractDataBlock- Returns:
 - underlying object
 
 - 
setUnderlyingObject
Description copied from class:AbstractDataBlockAllows to set the underlying object directly- Specified by:
 setUnderlyingObjectin interfaceDataBlock- Specified by:
 setUnderlyingObjectin classAbstractDataBlock
 - 
getDataType
 - 
getDataType
 - 
resize
public void resize(int size)  - 
updateAtomCount
public void updateAtomCount()Description copied from class:AbstractDataBlockRecompute atom count after new child blocks have been added- Specified by:
 updateAtomCountin interfaceDataBlock- Overrides:
 updateAtomCountin classAbstractDataBlock
 - 
selectBlock
protected final void selectBlock(int index)  - 
blockIterator
 - 
getListSize
public int getListSize() - 
add
 - 
add
 - 
set
 - 
get
 - 
remove
 - 
remove
public void remove(int blockIndex)  - 
toString
- Overrides:
 toStringin classAbstractDataBlock
 - 
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
 - 
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
 - 
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
 - 
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
 
 -