|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.ints.IntCollections.UnmodifiableCollection
An unmodifiable wrapper class for collections.
Field Summary | |
static long |
serialVersionUID
|
Method Summary | |
boolean |
add(int k)
|
boolean |
add(Object k)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(IntCollection c)
|
void |
clear()
|
boolean |
contains(int o)
|
boolean |
contains(Object k)
|
boolean |
containsAll(Collection c)
|
boolean |
containsAll(IntCollection c)
|
IntIterator |
intIterator()
Returns a type-specific iterator on the collection. |
boolean |
isEmpty()
|
Iterator |
iterator()
|
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 |
remove(Object ok)
|
boolean |
removeAll(Collection c)
|
boolean |
removeAll(IntCollection c)
|
boolean |
retainAll(Collection c)
|
boolean |
retainAll(IntCollection c)
|
int |
size()
|
Object[] |
toArray()
|
int[] |
toArray(int[] a)
Builds a primitive type array containing the items of this collection. |
Object[] |
toArray(Object[] a)
|
int[] |
toIntArray()
Returns a primitive type array containing the items of this collection. |
int[] |
toIntArray(int[] a)
Builds a primitive type array containing the items of this collection. |
String |
toString()
|
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.util.Collection |
equals, hashCode |
Field Detail |
public static final long serialVersionUID
Method Detail |
public int size()
size
in interface Collection
public boolean isEmpty()
isEmpty
in interface Collection
public boolean contains(int o)
contains
in interface IntCollection
Collection.contains(Object)
public int[] toIntArray()
IntCollection
toIntArray
in interface IntCollection
Collection.toArray()
public int[] toIntArray(int[] a)
IntCollection
toIntArray
in interface IntCollection
a
- if this array is big enough, it will be used to store the collection.
Collection.toArray(Object[])
public Iterator iterator()
iterator
in interface Collection
public IntIterator intIterator()
IntCollection
The iterator returned by the Collection.iterator()
method and by this
method are identical; however, using this method you can save a type casting.
intIterator
in interface IntCollection
Collection.iterator()
public boolean add(int k)
add
in interface IntCollection
Collection.add(Object)
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
Collection.remove(Object)
public boolean remove(Object ok)
remove
in interface Collection
public boolean addAll(Collection c)
addAll
in interface Collection
public boolean containsAll(Collection c)
containsAll
in interface Collection
public boolean removeAll(Collection c)
removeAll
in interface Collection
public boolean retainAll(Collection c)
retainAll
in interface Collection
public boolean addAll(IntCollection c)
addAll
in interface IntCollection
Collection.addAll(Collection)
public boolean containsAll(IntCollection c)
containsAll
in interface IntCollection
Collection.containsAll(Collection)
public boolean removeAll(IntCollection c)
removeAll
in interface IntCollection
Collection.removeAll(Collection)
public boolean retainAll(IntCollection c)
retainAll
in interface IntCollection
Collection.retainAll(Collection)
public void clear()
clear
in interface Collection
public String toString()
public boolean add(Object k)
add
in interface Collection
public boolean contains(Object k)
contains
in interface Collection
public Object[] toArray()
toArray
in interface Collection
public Object[] toArray(Object[] a)
toArray
in interface Collection
public int[] toArray(int[] a)
IntCollection
toArray
in interface IntCollection
a
- if this array is big enough, it will be used to store the collection.
Collection.toArray(Object[])
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |