|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectCollection<K>
it.unimi.dsi.fastutil.objects.AbstractObjectList<K>
it.unimi.dsi.fastutil.objects.ObjectLists.Singleton<K>
public static class ObjectLists.Singleton<K>
An immutable class representing a type-specific singleton list.
This class may be useful to implement your own in case you subclass a type-specific list.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectList |
|---|
AbstractObjectList.ObjectSubList<K> |
| Method Summary | |
|---|---|
boolean |
addAll(java.util.Collection<? extends K> c)
Delegates to a more generic method. |
boolean |
addAll(int i,
java.util.Collection<? extends K> c)
|
void |
clear()
|
java.lang.Object |
clone()
|
boolean |
contains(java.lang.Object k)
|
K |
get(int i)
|
ObjectListIterator<K> |
iterator()
Returns a type-specific iterator on the elements of this collection. |
ObjectListIterator<K> |
listIterator()
Returns a type-specific list iterator on the list. |
ObjectListIterator<K> |
listIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
K |
remove(int i)
|
boolean |
remove(java.lang.Object k)
|
boolean |
removeAll(java.util.Collection<?> c)
Remove from this collection all elements in the given collection. |
boolean |
retainAll(java.util.Collection<?> c)
Retains in this collection only elements from the given collection. |
int |
size()
|
void |
size(int size)
Sets the size of this list. |
ObjectList<K> |
subList(int from,
int to)
Returns a type-specific view of the portion of this list from the index from, inclusive, to the index to, exclusive. |
java.lang.Object[] |
toArray()
|
| Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectList |
|---|
add, add, addElements, addElements, compareTo, equals, getElements, hashCode, indexOf, lastIndexOf, objectListIterator, objectListIterator, objectSubList, peek, pop, push, removeElements, set, top, toString |
| Methods inherited from class it.unimi.dsi.fastutil.objects.AbstractObjectCollection |
|---|
containsAll, isEmpty, objectIterator, toArray |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
|---|
containsAll, isEmpty, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.objects.ObjectCollection |
|---|
objectIterator, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
|---|
isEmpty |
| Method Detail |
|---|
public K get(int i)
get in interface java.util.List<K>public K remove(int i)
remove in interface java.util.List<K>remove in class AbstractObjectList<K>public boolean contains(java.lang.Object k)
contains in interface java.util.Collection<K>contains in interface java.util.List<K>contains in class AbstractObjectList<K>public boolean addAll(java.util.Collection<? extends K> c)
AbstractObjectList
addAll in interface java.util.Collection<K>addAll in interface java.util.List<K>addAll in class AbstractObjectList<K>c - a collection.
true if this collection changed as a result of the call.
public boolean addAll(int i,
java.util.Collection<? extends K> c)
addAll in interface java.util.List<K>addAll in class AbstractObjectList<K>public boolean removeAll(java.util.Collection<?> c)
AbstractObjectCollection
removeAll in interface java.util.Collection<K>removeAll in interface java.util.List<K>removeAll in class AbstractObjectCollection<K>c - a collection.
true if this collection changed as a result of the call.public boolean retainAll(java.util.Collection<?> c)
AbstractObjectCollection
retainAll in interface java.util.Collection<K>retainAll in interface java.util.List<K>retainAll in class AbstractObjectCollection<K>c - a collection.
true if this collection changed as a result of the call.public java.lang.Object[] toArray()
toArray in interface java.util.Collection<K>toArray in interface java.util.List<K>toArray in class AbstractObjectCollection<K>public ObjectListIterator<K> listIterator()
ObjectList
listIterator in interface ObjectList<K>listIterator in interface java.util.List<K>listIterator in class AbstractObjectList<K>List.listIterator()public ObjectListIterator<K> iterator()
ObjectCollectionNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
iterator in interface ObjectCollection<K>iterator in interface ObjectIterable<K>iterator in interface ObjectList<K>iterator in interface java.lang.Iterable<K>iterator in interface java.util.Collection<K>iterator in interface java.util.List<K>iterator in class AbstractObjectList<K>public ObjectListIterator<K> listIterator(int i)
ObjectList
listIterator in interface ObjectList<K>listIterator in interface java.util.List<K>listIterator in class AbstractObjectList<K>List.listIterator(int)
public ObjectList<K> subList(int from,
int to)
ObjectListfrom, inclusive, to the index to, exclusive.
Note that this specification strengthens the one given in List.subList(int,int).
subList in interface ObjectList<K>subList in interface java.util.List<K>subList in class AbstractObjectList<K>List.subList(int,int)public int size()
size in interface java.util.Collection<K>size in interface java.util.List<K>size in class java.util.AbstractCollection<K>public void size(int size)
ObjectListIf the specified size is smaller than the current size, the last elements are
discarded. Otherwise, they are filled with 0/null/false.
size in interface ObjectList<K>size in class AbstractObjectList<K>size - the new size.public void clear()
clear in interface java.util.Collection<K>clear in interface java.util.List<K>clear in class java.util.AbstractCollection<K>public java.lang.Object clone()
clone in class java.lang.Objectpublic boolean remove(java.lang.Object k)
remove in interface java.util.Collection<K>remove in interface java.util.List<K>remove in class java.util.AbstractCollection<K>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||