|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectfiftyone.mobile.detection.entities.stream.BaseList<T>
fiftyone.mobile.detection.entities.stream.StreamVariableList<T>
public class StreamVariableList<T extends BaseEntity>
A readonly list of variable length entity types held on persistent storage rather than in memory.
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 offset of the first byte of the entities data in the underlying data structure in the accessor. As such the list isn't being used as a traditional list because items are not retrieved by their index in the list, but by there offset in the underlying data structure.
The constructor will read the header information about the underlying data structure. The data for each entity is only loaded when requested via the accessor. A cache is used to avoid creating duplicate objects when requested multiple times.
Data sources which don't support seeking can not be used. Specifically compressed data structures can not be used with these lists.
Should not be referenced directly.
| Field Summary |
|---|
| Fields inherited from class fiftyone.mobile.detection.entities.stream.BaseList |
|---|
cache, dataSet, entityFactory, header, pool |
| Constructor Summary | |
|---|---|
StreamVariableList(Dataset dataSet,
BinaryReader reader,
Source source,
BaseEntityFactory<T> entityFactory)
Constructs a new instance of VariableList |
|
| Method Summary | |
|---|---|
protected T |
createEntity(int offset,
BinaryReader reader)
Creates a new entity of type T. |
Iterator<T> |
iterator()
|
| Methods inherited from class fiftyone.mobile.detection.entities.stream.BaseList |
|---|
dispose, get, getCount, getPercentageMisses, size |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StreamVariableList(Dataset dataSet,
BinaryReader reader,
Source source,
BaseEntityFactory<T> entityFactory)
dataSet - The DetectorDataSet being createdreader - Reader connected to the source data structure and
positioned to start readingentityFactory - Factory to build entities of type Tsource - Reference to the underlying data structure| Method Detail |
|---|
protected T createEntity(int offset,
BinaryReader reader)
throws IOException
createEntity in class BaseList<T extends BaseEntity>offset - The offset of the entity being createdreader - Reader connected to the source data structure and
positioned to start reading
IOExceptionpublic Iterator<T> iterator()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||