public class WrappedSentenceDataList extends de.ims.icarus.ui.events.ChangeSource implements SentenceDataList
Constructor and Description |
---|
WrappedSentenceDataList(de.ims.icarus.util.data.ContentType contentType) |
WrappedSentenceDataList(de.ims.icarus.util.data.ContentType contentType,
int capacity) |
Modifier and Type | Method and Description |
---|---|
void |
add(java.util.Collection<? extends SentenceData> items) |
void |
add(SentenceData item) |
void |
add(SentenceDataList list) |
void |
clear() |
protected void |
clearUnnoticed() |
SentenceData |
get(int index) |
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. |
de.ims.icarus.util.data.ContentType |
getContentType() |
int |
size() |
boolean |
supportsType(DataType type) |
addChangeListener, fireStateChanged, removeChangeListener
public WrappedSentenceDataList(de.ims.icarus.util.data.ContentType contentType)
public WrappedSentenceDataList(de.ims.icarus.util.data.ContentType contentType, int capacity)
public void add(SentenceData item)
public void add(java.util.Collection<? extends SentenceData> items)
protected void clearUnnoticed()
public void clear()
public void add(SentenceDataList list)
public int size()
size
in interface de.ims.icarus.util.data.DataList<SentenceData>
DataList.size()
public SentenceData get(int index)
get
in interface de.ims.icarus.util.data.DataList<SentenceData>
DataList.get(int)
public de.ims.icarus.util.data.ContentType getContentType()
getContentType
in interface de.ims.icarus.util.data.DataContainer
getContentType
in interface de.ims.icarus.util.data.DataList<SentenceData>
DataList.getContentType()
public boolean supportsType(DataType type)
supportsType
in interface SentenceDataList
SentenceDataList.supportsType(de.ims.icarus.language.DataType)
public SentenceData get(int index, DataType type)
SentenceDataList
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.get
in interface SentenceDataList
index
- the index of interestSentenceData
object at position index
within this list
SentenceDataList.get(int, de.ims.icarus.language.DataType)
public SentenceData get(int index, DataType type, AvailabilityObserver observer)
SentenceDataList
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.
get
in interface SentenceDataList
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 finishedSentenceDataList.get(int, de.ims.icarus.language.DataType, de.ims.icarus.language.AvailabilityObserver)