|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfiftyone.mobile.detection.entities.memory.BaseList<T>
T - The type the list will contain.public abstract class BaseList<T extends BaseEntity>
Lists can be stored as a set of related objects entirely within memory, or the relevant objects loaded as required from a file or other permanent store as required.
This class provides base functions for lists implemented in memory using arrays of type T.
Interfaces 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.
The data is held in the private variable array.
Should not be referenced directly.
| Field Summary | |
|---|---|
protected List<T> |
array
Array of items contained in the list. |
protected Dataset |
dataSet
The dataset which contains the list. |
protected BaseEntityFactory<T> |
entityFactory
Interface used to create a new instance of an item in the list. |
Header |
header
Information about the data structure the list is associated with. |
| Constructor Summary | |
|---|---|
BaseList(Dataset dataSet,
BinaryReader reader,
BaseEntityFactory<T> entityFactory)
Constructs a new instance of |
|
| Method Summary | |
|---|---|
void |
dispose()
Dispose of any items the list holds open. |
Iterator<T> |
iterator()
|
int |
size()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface fiftyone.mobile.detection.ReadonlyList |
|---|
get |
| Field Detail |
|---|
public final Header header
protected final Dataset dataSet
protected final BaseEntityFactory<T extends BaseEntity> entityFactory
protected final List<T extends BaseEntity> array
| Constructor Detail |
|---|
BaseList(Dataset dataSet,
BinaryReader reader,
BaseEntityFactory<T> entityFactory)
dataSet - Dataset being createdreader - Reader used to initialise the headerentityFactory - Interface used to create new entities of type T from
the read method| Method Detail |
|---|
public void dispose()
dispose in interface Disposablepublic Iterator<T> iterator()
iterator in interface Iterable<T extends BaseEntity>public int size()
size in interface ReadonlyList<T extends BaseEntity>
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||