- java.lang.Object
-
- java.util.AbstractCollection<E>
-
-
- All Implemented Interfaces:
- java.lang.Iterable, java.util.Collection, java.util.List
public class SingletonList
extends java.util.AbstractList
A list containing exactly one object, immutable.
- Author:
- Ondrej Lhotak
-
-
Field Summary
-
Fields inherited from class java.util.AbstractList
modCount
-
Constructor Summary
Constructors
| Constructor and Description |
SingletonList(java.lang.Object o) |
-
Method Summary
-
Methods inherited from class java.util.AbstractList
add, add, addAll, clear, equals, hashCode, indexOf, iterator, lastIndexOf, listIterator, listIterator, remove, removeRange, set, subList
-
Methods inherited from class java.util.AbstractCollection
addAll, containsAll, isEmpty, remove, removeAll, retainAll, toArray, toArray, toString
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.List
addAll, containsAll, isEmpty, remove, removeAll, replaceAll, retainAll, sort, spliterator, toArray, toArray
-
Methods inherited from interface java.util.Collection
parallelStream, removeIf, stream
-
Methods inherited from interface java.lang.Iterable
forEach
-
-
Method Detail
-
size
public int size()
- Specified by:
size in interface java.util.Collection
- Specified by:
size in interface java.util.List
- Specified by:
size in class java.util.AbstractCollection
Copyright © 2012-2019 RoboVM AB. All Rights Reserved.