cz.cuni.amis.utils.collections
Class TranslatedObservableCollection<T,U>
java.lang.Object
cz.cuni.amis.utils.collections.ObservableCollection<E>
cz.cuni.amis.utils.collections.ObservableList<T>
cz.cuni.amis.utils.collections.TranslatedObservableCollection<T,U>
- All Implemented Interfaces:
- Iterable<T>, Collection<T>, List<T>
public abstract class TranslatedObservableCollection<T,U>
- extends ObservableList<T>
Translates one observable collection into another
- Author:
- ik
Fields inherited from class cz.cuni.amis.utils.collections.ObservableList |
l |
Methods inherited from class cz.cuni.amis.utils.collections.ObservableList |
add, addAll, addAll, clear, get, getList, indexOf, lastIndexOf, listIterator, listIterator, remove, set, subList |
Methods inherited from class cz.cuni.amis.utils.collections.ObservableCollection |
add, addCollectionListener, contains, containsAll, isEmpty, iterator, notifyPostAdd, notifyPostRemove, notifyPreAdd, notifyPreRemove, remove, removeAll, removeCollectionListener, retainAll, size, toArray, toArray |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface java.util.List |
add, contains, containsAll, equals, hashCode, isEmpty, iterator, remove, removeAll, retainAll, size, toArray, toArray |
TranslatedObservableCollection
public TranslatedObservableCollection(ObservableCollection<U> col)
insert
protected void insert(U elem)
getKeyForObj
protected Object getKeyForObj(U elem)
translate
protected abstract T translate(U obj)
- Translates object from wrapped collection into this collection.
- Parameters:
obj
- object to be translated
- Returns:
- the translated object, null if the object shouldn't be added to the collection
Copyright © 2013 AMIS research group, Faculty of Mathematics and Physics, Charles University in Prague, Czech Republic. All Rights Reserved.