T - The type of BaseEntity the list will contain.public class StreamFixedList<T extends BaseEntity> extends StreamBaseList<T> implements IFixedList<T>
Delegate methods are used to create new instances of items to add to the list in order to avoid creating many inherited list classes for each type.
Objects of this class should not be created directly as they are part of the internal logic.
dataSet, header| Constructor and Description |
|---|
StreamFixedList(Dataset dataSet,
BinaryReader reader,
BaseEntityFactory<T> entityFactory)
Constructs a new instance of StreamBaseList{T} ready to
read entities from the source.
|
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Not implemented.
|
protected T |
createEntity(int index,
BinaryReader reader)
Creates a new entity of type T.
|
StreamFixedListRangeIterator<T> |
getRange(int index,
int count)
An enumerator for the list between the range provided.
|
Iterator<T> |
iterator() |
int |
size()
Returns The number of items in the list.
|
getclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetforEach, spliteratorpublic StreamFixedList(Dataset dataSet, BinaryReader reader, BaseEntityFactory<T> entityFactory)
dataSet - Dataset being created.reader - Reader used to initialise the header only.entityFactory - Used to create new instances of the entity.public StreamFixedListRangeIterator<T> getRange(int index, int count) throws IOException
getRange in interface IFixedList<T extends BaseEntity>index - read from.count - how many entries.IOException - if there was a problem accessing data file.public int size()
StreamBaseListsize in interface IReadonlyList<T extends BaseEntity>size in class StreamBaseList<T extends BaseEntity>public void close()
close in interface Closeableclose in interface AutoCloseableprotected T createEntity(int index, BinaryReader reader) throws IOException
createEntity in class StreamBaseList<T extends BaseEntity>index - The index of the entity being created.reader - Reader connected to the source data structure and
positioned to start reading.IOException - if there was a problem accessing data file.Copyright © 2015 51Degrees. All rights reserved.