public class MemoryFixedList<T extends BaseEntity> extends BaseList<T>
Entities in the underlying data structure are either fixed length where the data that represents them always contains the same number of bytes, or variable length where the number of bytes to represent the entity varies.
This class uses the index of the entity in the accessor. The list is typically used by entities that need to be found quickly using a divide and conquer algorithm.
The constructor will read the header information about the underlying data structure and the entities are added to the list when the Read method is called.
The constructor will read the header information about the underlying data structure and the entities are added to the list when the Read method is called.
The class supports source stream that do not support seeking.
Should not be referenced directly.
array, dataSet, entityFactory, header| Constructor and Description |
|---|
MemoryFixedList(Dataset dataSet,
BinaryReader reader,
BaseEntityFactory<T> entityFactory)
Constructs a new instance of FixedList
|
| Modifier and Type | Method and Description |
|---|---|
T |
get(int i)
Accessor for the fixed list
|
void |
read(BinaryReader reader)
Reads the list into memory
|
dispose, iterator, sizeclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitforEach, spliteratorpublic MemoryFixedList(Dataset dataSet, BinaryReader reader, BaseEntityFactory<T> entityFactory)
dataSet - The DetectorDataSet being createdreader - Reader connected to the source data structure and
positioned to start readingentityFactory - Interface implementation used to create new entities
of type Tpublic void read(BinaryReader reader) throws IOException
reader - Reader connected to the source data structure and
positioned to start readingIOExceptionpublic T get(int i)
i - The index of the entity to be returned from the list