E
- Element to hold in list.public final class SingleElementList<E> extends AbstractList<E>
List
holding a single element. Intended to simplify code dealing with a
List that in some cases may hold only one element and in others multiple elements.modCount
Constructor and Description |
---|
SingleElementList(E element)
Constructs a
List holding one and only one element. |
Modifier and Type | Method and Description |
---|---|
E |
get(int index) |
int |
size() |
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
addAll, contains, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
addAll, contains, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
parallelStream, removeIf, stream
Copyright © GigaSpaces.