|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectit.unimi.dsi.fastutil.ints.AbstractIntCollection
it.unimi.dsi.fastutil.ints.AbstractIntList
it.unimi.dsi.fastutil.ints.IntLists.Singleton
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.
| Field Summary | |
static long |
serialVersionUID
|
| Method Summary | |
boolean |
add(int k)
|
void |
add(int i,
int k)
|
boolean |
addAll(Collection c)
Delegates to a more generic method. |
boolean |
addAll(IntCollection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
Collection c)
|
boolean |
addAll(int i,
IntCollection c)
Delegates to a more generic method. |
boolean |
addAll(int i,
IntList c)
Delegates to a more generic method. |
boolean |
addAll(IntList c)
Delegates to a more generic method. |
boolean |
addAll(int i,
List c)
|
boolean |
addAll(List c)
|
void |
clear()
|
Object |
clone()
|
boolean |
contains(int k)
|
int |
getInt(int i)
|
IntListIterator |
intListIterator()
Delegates to the corresponding list-iterator method. |
IntListIterator |
intListIterator(int i)
Returns a type-specific list iterator on the list starting at a given index. |
IntList |
intSubList(int from,
int to)
|
boolean |
rem(int k)
Note that this method should be called remove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. |
boolean |
removeAll(Collection c)
Remove from this collection all elements in the given collection. |
boolean |
removeAll(IntCollection c)
Remove from this collection all elements in the given type-specific collection. |
int |
removeInt(int i)
|
boolean |
retainAll(Collection c)
Retains in this collection only elements from the given collection. |
boolean |
retainAll(IntCollection c)
Retains in this collection only elements from the given type-specific collection. |
int |
size()
|
void |
size(int size)
Sets the size of this list. |
int[] |
toIntArray()
Returns a primitive type array containing the items of this collection. |
| Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntList |
add, addElements, addElements, compareTo, equals, get, getElements, hashCode, indexOf, indexOf, intIterator, lastIndexOf, lastIndexOf, listIterator, listIterator, peek, peekInt, pop, popInt, push, push, remove, removeElements, set, set, subList, top, topInt, toString |
| Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntCollection |
add, contains, containsAll, containsAll, isEmpty, iterator, rem, remove, toArray, toArray, toArray, toIntArray |
| Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.List |
add, contains, containsAll, isEmpty, iterator, remove, toArray, toArray |
| Methods inherited from interface it.unimi.dsi.fastutil.ints.IntCollection |
containsAll, toArray, toIntArray |
| Methods inherited from interface it.unimi.dsi.fastutil.Stack |
isEmpty |
| Field Detail |
public static final long serialVersionUID
| Method Detail |
public boolean rem(int k)
IntCollectionremove(), but the clash
with the similarly named index-based method in the List interface
forces us to use a distinguished name. For simplicity, the set interfaces reinstates
remove().
rem in interface IntCollectionrem in class AbstractIntListpublic boolean add(int k)
add in interface IntCollectionadd in class AbstractIntCollection
public void add(int i,
int k)
add in interface IntListadd in class AbstractIntListpublic int getInt(int i)
getInt in interface IntListList.get(int)public int removeInt(int i)
removeInt in interface IntListremoveInt in class AbstractIntListpublic boolean contains(int k)
contains in interface IntCollectioncontains in class AbstractIntListpublic boolean addAll(IntList c)
AbstractIntList
addAll in interface IntListaddAll in class AbstractIntListpublic boolean addAll(IntCollection c)
AbstractIntList
addAll in interface IntCollectionaddAll in class AbstractIntList
public boolean addAll(int i,
IntList c)
AbstractIntList
addAll in interface IntListaddAll in class AbstractIntList
public boolean addAll(int i,
IntCollection c)
AbstractIntList
addAll in interface IntListaddAll in class AbstractIntListpublic boolean removeAll(IntCollection c)
AbstractIntCollection
removeAll in interface IntCollectionremoveAll in class AbstractIntCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean retainAll(IntCollection c)
AbstractIntCollection
retainAll in interface IntCollectionretainAll in class AbstractIntCollectionc - a type-specific collection.
true if this collection changed as a result of the call.public boolean addAll(List c)
public boolean addAll(Collection c)
AbstractIntList
addAll in interface ListaddAll in class AbstractIntList
public boolean addAll(int i,
List c)
public boolean addAll(int i,
Collection c)
addAll in interface ListaddAll in class AbstractIntListpublic boolean removeAll(Collection c)
AbstractIntCollection
removeAll in interface ListremoveAll in class AbstractIntCollectionc - a collection.
true if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractIntCollection
retainAll in interface ListretainAll in class AbstractIntCollectionc - a collection.
true if this collection changed as a result of the call.public int[] toIntArray()
IntCollection
toIntArray in interface IntCollectiontoIntArray in class AbstractIntCollectionpublic IntListIterator intListIterator()
AbstractIntList
intListIterator in interface IntListintListIterator in class AbstractIntListpublic IntListIterator intListIterator(int i)
IntListThe iterator returned by the List.listIterator() method and by this
method are identical; however, using this method you can save a type casting.
intListIterator in interface IntListList.listIterator(int)
public IntList intSubList(int from,
int to)
intSubList in interface IntListintSubList in class AbstractIntListpublic int size()
size in interface Listpublic void size(int size)
IntListIf 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 IntListsize in class AbstractIntListpublic void clear()
clear in interface Listclear in class AbstractIntCollectionpublic Object clone()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||