public class DataBlockList extends AbstractDataBlock
Uses the composite pattern to hold a list of child DataBlocks. This class also implements the DataBlock interface.
Modifier and Type | Field and Description |
---|---|
protected int |
blockAtomCount |
protected int |
blockIndex |
protected List<DataBlock> |
blockList |
protected boolean |
equalBlockSize |
protected int |
localIndex |
atomCount, startIndex
Constructor and Description |
---|
DataBlockList() |
DataBlockList(int listSize) |
DataBlockList(int listSize,
boolean useArrayList) |
Modifier and Type | Method and Description |
---|---|
void |
add(DataBlock block) |
void |
add(int blockIndex,
AbstractDataBlock block) |
ListIterator<DataBlock> |
blockIterator() |
DataBlockList |
clone()
Full copy of datablock structure and values
A new underlying object is created with the same values
|
DataBlockList |
copy()
Shallow copy of datablock structure
The underlying object is shared
|
DataBlock |
get(int blockIndex) |
boolean |
getBooleanValue() |
boolean |
getBooleanValue(int index) |
byte |
getByteValue() |
byte |
getByteValue(int index) |
DataType |
getDataType() |
DataType |
getDataType(int index) |
double |
getDoubleValue() |
double |
getDoubleValue(int index) |
float |
getFloatValue() |
float |
getFloatValue(int index) |
int |
getIntValue() |
int |
getIntValue(int index) |
int |
getListSize() |
long |
getLongValue() |
long |
getLongValue(int index) |
short |
getShortValue() |
short |
getShortValue(int index) |
String |
getStringValue() |
String |
getStringValue(int index) |
List<DataBlock> |
getUnderlyingObject()
Allow direct access to underlying object carrying
the data (usually a primitive array or composite)
|
void |
remove(AbstractDataBlock block) |
void |
remove(int blockIndex) |
DataBlockList |
renew()
Regenerate an identical datablock of same
size with a new underlying object
|
void |
resize(int size) |
protected void |
selectBlock(int index) |
void |
set(int blockIndex,
DataBlock block) |
void |
setBooleanValue(boolean value) |
void |
setBooleanValue(int index,
boolean value) |
void |
setByteValue(byte value) |
void |
setByteValue(int index,
byte value) |
void |
setDoubleValue(double value) |
void |
setDoubleValue(int index,
double value) |
void |
setFloatValue(float value) |
void |
setFloatValue(int index,
float value) |
void |
setIntValue(int value) |
void |
setIntValue(int index,
int value) |
void |
setLongValue(int index,
long value) |
void |
setLongValue(long value) |
void |
setShortValue(int index,
short value) |
void |
setShortValue(short value) |
void |
setStringValue(int index,
String value) |
void |
setStringValue(String value) |
void |
setUnderlyingObject(List<DataBlock> blockList) |
void |
setUnderlyingObject(Object obj)
Allows to set the underlying object directly
|
String |
toString() |
getAtomCount
protected int blockAtomCount
protected int blockIndex
protected int localIndex
protected boolean equalBlockSize
public DataBlockList()
public DataBlockList(int listSize)
public DataBlockList(int listSize, boolean useArrayList)
public DataBlockList copy()
AbstractDataBlock
copy
in interface DataBlock
copy
in class AbstractDataBlock
public DataBlockList renew()
AbstractDataBlock
renew
in interface DataBlock
renew
in class AbstractDataBlock
public DataBlockList clone()
AbstractDataBlock
clone
in interface DataBlock
clone
in class AbstractDataBlock
public List<DataBlock> getUnderlyingObject()
AbstractDataBlock
getUnderlyingObject
in interface DataBlock
getUnderlyingObject
in class AbstractDataBlock
public void setUnderlyingObject(Object obj)
AbstractDataBlock
setUnderlyingObject
in interface DataBlock
setUnderlyingObject
in class AbstractDataBlock
public DataType getDataType()
public DataType getDataType(int index)
public void resize(int size)
protected final void selectBlock(int index)
public ListIterator<DataBlock> blockIterator()
public int getListSize()
public void add(DataBlock block)
public void add(int blockIndex, AbstractDataBlock block)
public void set(int blockIndex, DataBlock block)
public DataBlock get(int blockIndex)
public void remove(AbstractDataBlock block)
public void remove(int blockIndex)
public String toString()
toString
in class AbstractDataBlock
public boolean getBooleanValue(int index)
public byte getByteValue(int index)
public short getShortValue(int index)
public int getIntValue(int index)
public long getLongValue(int index)
public float getFloatValue(int index)
public double getDoubleValue(int index)
public String getStringValue(int index)
public boolean getBooleanValue()
public byte getByteValue()
public short getShortValue()
public int getIntValue()
public long getLongValue()
public float getFloatValue()
public double getDoubleValue()
public String getStringValue()
public void setBooleanValue(int index, boolean value)
public void setByteValue(int index, byte value)
public void setShortValue(int index, short value)
public void setIntValue(int index, int value)
public void setLongValue(int index, long value)
public void setFloatValue(int index, float value)
public void setDoubleValue(int index, double value)
public void setStringValue(int index, String value)
public void setBooleanValue(boolean value)
public void setByteValue(byte value)
public void setShortValue(short value)
public void setIntValue(int value)
public void setLongValue(long value)
public void setFloatValue(float value)
public void setDoubleValue(double value)
public void setStringValue(String value)
Copyright © 2016 Sensia Software LLC. All rights reserved.