|
||||||||||
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.
Nested Class Summary |
Nested classes inherited from class it.unimi.dsi.fastutil.ints.AbstractIntList |
AbstractIntList.IntSubList |
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)
IntCollection
remove()
, 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 IntCollection
rem
in class AbstractIntList
public boolean add(int k)
add
in interface IntCollection
add
in class AbstractIntList
public void add(int i, int k)
add
in interface IntList
add
in class AbstractIntList
public int getInt(int i)
getInt
in interface IntList
List.get(int)
public int removeInt(int i)
removeInt
in interface IntList
removeInt
in class AbstractIntList
public boolean contains(int k)
contains
in interface IntCollection
contains
in class AbstractIntList
public boolean addAll(IntList c)
AbstractIntList
addAll
in interface IntList
addAll
in class AbstractIntList
public boolean addAll(IntCollection c)
AbstractIntList
addAll
in interface IntCollection
addAll
in class AbstractIntList
public boolean addAll(int i, IntList c)
AbstractIntList
addAll
in interface IntList
addAll
in class AbstractIntList
public boolean addAll(int i, IntCollection c)
AbstractIntList
addAll
in interface IntList
addAll
in class AbstractIntList
public boolean removeAll(IntCollection c)
AbstractIntCollection
removeAll
in interface IntCollection
removeAll
in class AbstractIntCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.public boolean retainAll(IntCollection c)
AbstractIntCollection
retainAll
in interface IntCollection
retainAll
in class AbstractIntCollection
c
- 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 List
addAll
in class AbstractIntList
public boolean addAll(int i, List c)
public boolean addAll(int i, Collection c)
addAll
in interface List
addAll
in class AbstractIntList
public boolean removeAll(Collection c)
AbstractIntCollection
removeAll
in interface List
removeAll
in class AbstractIntCollection
c
- a collection.
true
if this collection changed as a result of the call.public boolean retainAll(Collection c)
AbstractIntCollection
retainAll
in interface List
retainAll
in class AbstractIntCollection
c
- a collection.
true
if this collection changed as a result of the call.public int[] toIntArray()
IntCollection
toIntArray
in interface IntCollection
toIntArray
in class AbstractIntCollection
public IntListIterator intListIterator()
AbstractIntList
intListIterator
in interface IntList
intListIterator
in class AbstractIntList
public IntListIterator intListIterator(int i)
IntList
The 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 IntList
intListIterator
in class AbstractIntList
public IntList intSubList(int from, int to)
intSubList
in interface IntList
intSubList
in class AbstractIntList
public int size()
size
in interface List
public void size(int size)
IntList
If 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 IntList
size
in class AbstractIntList
public void clear()
clear
in interface List
clear
in class AbstractIntCollection
public Object clone()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |