public interface SentenceDataList extends de.ims.icarus.util.data.DataList<SentenceData>
Modifier and Type | Method and Description |
---|---|
SentenceData |
get(int index,
DataType type)
Synchronously fetches the
SentenceData object
for the specified index. |
SentenceData |
get(int index,
DataType type,
AvailabilityObserver observer)
Asynchronously fetches the
SentenceData object
for the specified index. |
boolean |
supportsType(DataType type) |
boolean supportsType(DataType type)
SentenceData get(int index, DataType type)
SentenceData
object
for the specified index. If this list
supports
asynchronous loading of elements then this method may
return null
if the desired index
is not
available.index
- the index of interestSentenceData
object at position index
within this list
SentenceData get(int index, DataType type, AvailabilityObserver observer)
SentenceData
object
for the specified index.
This method might return null
and use the optional
AvailabilityObserver
to notify about a successful loading
of the desired data later. Implementations should only
store a weak reference to the provided observer
since
the calling code might decide to release the AvailabilityObserver
object and its associated resources while the loading is
still in progress. Therefore exclusive ownership of this object
should be left to the original code that created it.
index
- the index of interesttype
- the type to fetch an entry forobserver
- the AvailabilityObserver
to be notified
when the asynchronous loading of the desired SentenceData
is finished