Package org.luwrain.controls
Class ListUtils.DefaultEditableModel<E>
java.lang.Object
java.util.AbstractCollection<E>
java.util.AbstractList<E>
java.util.ArrayList<E>
org.luwrain.controls.ListUtils.DefaultEditableModel<E>
- All Implemented Interfaces:
Serializable
,Cloneable
,Iterable<E>
,Collection<E>
,List<E>
,RandomAccess
,EditableListArea.Model<E>
,ListArea.Model<E>
- Enclosing class:
ListUtils
public static class ListUtils.DefaultEditableModel<E>
extends ArrayList<E>
implements EditableListArea.Model<E>
- See Also:
-
Field Summary
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
ConstructorDescriptionDefaultEditableModel
(Class<E> itemClass) DefaultEditableModel
(Class<E> itemClass, E[] items) DefaultEditableModel
(Class<E> itemClass, List<E> items) -
Method Summary
Modifier and TypeMethodDescriptionboolean
addToModel
(int pos, Supplier<Object> supplier) protected E
getItem
(int index) int
Object[]
getItems()
void
refresh()
boolean
removeFromModel
(int fromIndex, int toIndex) void
Methods inherited from class java.util.ArrayList
add, add, addAll, addAll, clear, clone, contains, ensureCapacity, equals, forEach, get, hashCode, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, remove, remove, removeAll, removeIf, removeRange, replaceAll, retainAll, set, size, sort, spliterator, subList, toArray, toArray, trimToSize
Methods inherited from class java.util.AbstractCollection
containsAll, toString
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, stream, toArray
Methods inherited from interface java.util.List
containsAll
-
Field Details
-
itemClass
-
-
Constructor Details
-
DefaultEditableModel
-
DefaultEditableModel
-
DefaultEditableModel
-
-
Method Details
-
setItems
-
getItems
-
addToModel
- Specified by:
addToModel
in interfaceEditableListArea.Model<E>
-
removeFromModel
public boolean removeFromModel(int fromIndex, int toIndex) - Specified by:
removeFromModel
in interfaceEditableListArea.Model<E>
-
getItemCount
public int getItemCount()- Specified by:
getItemCount
in interfaceListArea.Model<E>
-
getItem
- Specified by:
getItem
in interfaceListArea.Model<E>
-
refresh
public void refresh()- Specified by:
refresh
in interfaceListArea.Model<E>
-
adjust
-