|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.shorts.ShortCollections.SynchronizedCollection
A synchronized wrapper class for collections.
Field Summary | |
static long |
serialVersionUID
|
Method Summary | |
boolean |
add(Object k)
|
boolean |
add(short k)
|
boolean |
addAll(Collection c)
|
boolean |
addAll(ShortCollection c)
|
void |
clear()
|
boolean |
contains(Object k)
|
boolean |
contains(short o)
|
boolean |
containsAll(Collection c)
|
boolean |
containsAll(ShortCollection c)
|
boolean |
isEmpty()
|
Iterator |
iterator()
|
boolean |
rem(short 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(ShortCollection c)
|
boolean |
retainAll(Collection c)
|
boolean |
retainAll(ShortCollection c)
|
ShortIterator |
shortIterator()
Returns a type-specific iterator on the collection. |
int |
size()
|
Object[] |
toArray()
|
Object[] |
toArray(Object[] a)
|
short[] |
toArray(short[] a)
Builds a primitive type array containing the items of this collection. |
short[] |
toShortArray()
Returns a primitive type array containing the items of this collection. |
short[] |
toShortArray(short[] 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(short o)
contains
in interface ShortCollection
Collection.contains(Object)
public short[] toShortArray()
ShortCollection
toShortArray
in interface ShortCollection
Collection.toArray()
public short[] toShortArray(short[] a)
ShortCollection
toShortArray
in interface ShortCollection
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 ShortIterator shortIterator()
ShortCollection
The iterator returned by the Collection.iterator()
method and by this
method are identical; however, using this method you can save a type casting.
shortIterator
in interface ShortCollection
Collection.iterator()
public boolean add(short k)
add
in interface ShortCollection
Collection.add(Object)
public boolean rem(short k)
ShortCollection
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 ShortCollection
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(ShortCollection c)
addAll
in interface ShortCollection
Collection.addAll(Collection)
public boolean containsAll(ShortCollection c)
containsAll
in interface ShortCollection
Collection.containsAll(Collection)
public boolean removeAll(ShortCollection c)
removeAll
in interface ShortCollection
Collection.removeAll(Collection)
public boolean retainAll(ShortCollection c)
retainAll
in interface ShortCollection
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 short[] toArray(short[] a)
ShortCollection
toArray
in interface ShortCollection
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 |