Package heronarts.lx.utils
Class ObservableList<T>
java.lang.Object
heronarts.lx.utils.ObservableList<T>
- All Implemented Interfaces:
Iterable<T>
,Collection<T>
,List<T>
,SequencedCollection<T>
-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new observable list which has an ArrayList as its inner listObservableList
(List<T> list) Create a new observable list using a given List for its inner list. -
Method Summary
Modifier and TypeMethodDescriptionvoid
boolean
boolean
addAll
(int index, Collection<? extends T> c) boolean
addAll
(Collection<? extends T> c) addListener
(ObservableList.Listener<T> listener) Get an unmodifiable version of this listvoid
clear()
boolean
boolean
containsAll
(Collection<?> c) get
(int index) int
boolean
isEmpty()
iterator()
int
listIterator
(int index) remove
(int index) boolean
boolean
removeAll
(Collection<?> c) removeListener
(ObservableList.Listener<T> listener) boolean
retainAll
(Collection<?> c) int
size()
subList
(int fromIndex, int toIndex) Object[]
toArray()
<T1> T1[]
toArray
(T1[] a) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArray
Methods inherited from interface java.util.List
addFirst, addLast, equals, getFirst, getLast, hashCode, removeFirst, removeLast, replaceAll, reversed, sort, spliterator
-
Constructor Details
-
ObservableList
public ObservableList()Create a new observable list which has an ArrayList as its inner list -
ObservableList
Create a new observable list using a given List for its inner list. Allows custom inner list types.- Parameters:
list
- List to use as the inner list
-
-
Method Details
-
asUnmodifiableList
Get an unmodifiable version of this list -
addListener
-
removeListener
-
size
public int size() -
isEmpty
public boolean isEmpty() -
contains
-
iterator
-
toArray
-
toArray
public <T1> T1[] toArray(T1[] a) -
add
-
remove
-
containsAll
- Specified by:
containsAll
in interfaceCollection<T>
- Specified by:
containsAll
in interfaceList<T>
-
addAll
-
addAll
-
removeAll
-
retainAll
-
clear
public void clear() -
get
-
set
-
add
-
remove
-
indexOf
-
lastIndexOf
- Specified by:
lastIndexOf
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
listIterator
- Specified by:
listIterator
in interfaceList<T>
-
subList
-