public class SingletonList<E> extends AbstractFixedSizeList<E> implements RandomAccess, Serializable
| Constructor and Description |
|---|
SingletonList(E element) |
| Modifier and Type | Method and Description |
|---|---|
E |
get(int index) |
boolean |
isEmpty() |
E |
set(int index,
E element) |
int |
size() |
List<E> |
subList(int fromIndex,
int toIndex) |
add, addAll, indexOf, iterator, lastIndexOf, listIterator, listIterator, removeadd, addAll, clear, contains, containsAll, remove, removeAll, retainAll, toArray, toArray, toStringclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitadd, addAll, clear, contains, containsAll, equals, hashCode, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArrayparallelStream, removeIf, streampublic SingletonList(E element)
public int size()
size in interface Collection<E>size in interface List<E>size in class AbstractCollection<E>public boolean isEmpty()
isEmpty in interface Collection<E>isEmpty in interface List<E>isEmpty in class AbstractCollection<E>Copyright © 2024. All rights reserved.