Package net.anwiba.commons.model
Class AbstractObjectListModel<T>
- java.lang.Object
-
- net.anwiba.commons.model.AbstractListChangedNotifier<T>
-
- net.anwiba.commons.model.AbstractObjectListModel<T>
-
- All Implemented Interfaces:
java.lang.Iterable<T>,IMutableObjectList<T>,IObjectCollection<T>,IObjectCollectionReceiver<T>,IObjectIterable<T>,IObjectList<T>,IObjectListProvider<T>,IObjectListReceiver<T>,IListChangedNotifier<T>,IObjectListDistributor<T>,IObjectListModel<T>
- Direct Known Subclasses:
ObjectListModel,ObjectModelListModel
public abstract class AbstractObjectListModel<T> extends AbstractListChangedNotifier<T> implements IObjectListModel<T>
-
-
Constructor Summary
Constructors Constructor Description AbstractObjectListModel(java.util.List<T> objects)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidadd(java.lang.Iterable<T> objects)voidadd(T... objects)Tget(int index)java.util.Collection<T>get(int... indices)int[]indices(java.lang.Iterable<T> objects)booleanisEmpty()IObjectIterator<T>iterator()voidremove(int... indices)voidremove(java.lang.Iterable<T> objects)voidremove(T... objects)voidremoveAll()Tset(int index, T object)voidset(java.lang.Iterable<T> objects)voidset(T... objects)intsize()java.util.Collection<T>toCollection()java.util.List<T>toList()IObjectIterable<T>values()-
Methods inherited from class net.anwiba.commons.model.AbstractListChangedNotifier
addListModelListener, fireObjectsAdded, fireObjectsChanged, fireObjectsChanged, fireObjectsRemoved, fireObjectsUpdated, removeListModelListener, removeListModelListeners
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface net.anwiba.commons.model.IListChangedNotifier
addListModelListener, removeListModelListener, removeListModelListeners
-
Methods inherited from interface net.anwiba.commons.lang.collection.IObjectIterable
foreach
-
Methods inherited from interface net.anwiba.commons.lang.collection.IObjectList
stream
-
-
-
-
Constructor Detail
-
AbstractObjectListModel
public AbstractObjectListModel(java.util.List<T> objects)
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfaceIObjectCollection<T>- Specified by:
sizein interfaceIObjectListProvider<T>
-
set
public void set(T... objects)
- Specified by:
setin interfaceIObjectCollectionReceiver<T>
-
set
public void set(java.lang.Iterable<T> objects)
- Specified by:
setin interfaceIObjectCollectionReceiver<T>
-
set
public T set(int index, T object)
- Specified by:
setin interfaceIObjectListReceiver<T>
-
add
@SafeVarargs public final void add(T... objects)
- Specified by:
addin interfaceIObjectCollectionReceiver<T>
-
add
public void add(java.lang.Iterable<T> objects)
- Specified by:
addin interfaceIObjectCollectionReceiver<T>
-
indices
public int[] indices(java.lang.Iterable<T> objects)
- Specified by:
indicesin interfaceIObjectListProvider<T>
-
remove
@SafeVarargs public final void remove(T... objects)
- Specified by:
removein interfaceIMutableObjectList<T>- Specified by:
removein interfaceIObjectListModel<T>
-
remove
public void remove(java.lang.Iterable<T> objects)
- Specified by:
removein interfaceIMutableObjectList<T>- Specified by:
removein interfaceIObjectListModel<T>
-
remove
public void remove(int... indices)
- Specified by:
removein interfaceIMutableObjectList<T>- Specified by:
removein interfaceIObjectListModel<T>
-
removeAll
public void removeAll()
- Specified by:
removeAllin interfaceIMutableObjectList<T>- Specified by:
removeAllin interfaceIObjectListModel<T>
-
values
public final IObjectIterable<T> values()
- Specified by:
valuesin interfaceIObjectCollection<T>- Specified by:
valuesin interfaceIObjectListProvider<T>
-
isEmpty
public final boolean isEmpty()
- Specified by:
isEmptyin interfaceIObjectCollection<T>- Specified by:
isEmptyin interfaceIObjectListProvider<T>
-
get
public final java.util.Collection<T> get(int... indices)
- Specified by:
getin interfaceIObjectListProvider<T>
-
get
public final T get(int index)
- Specified by:
getin interfaceIObjectListProvider<T>
-
toCollection
public java.util.Collection<T> toCollection()
- Specified by:
toCollectionin interfaceIObjectCollection<T>
-
toList
public java.util.List<T> toList()
- Specified by:
toListin interfaceIObjectCollection<T>
-
iterator
public IObjectIterator<T> iterator()
- Specified by:
iteratorin interfaceIObjectIterable<T>- Specified by:
iteratorin interfacejava.lang.Iterable<T>
-
-