|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectit.unimi.dsi.fastutil.chars.AbstractCharCollection
An abstract class providing basic methods for collections implementing a type-specific interface.
In particular, this class provide iterator()
, add(Object)
, remove(Object)
and
contains(Object)
methods that just call the type-specific counterpart.
Method Summary | |
boolean |
add(char k)
|
boolean |
add(Object o)
Delegates to the corresponding type-specific method. |
boolean |
addAll(CharCollection c)
Adds all elements of the given type-specific collection to this collection. |
boolean |
addAll(Collection c)
Adds all elements of the given collection to this collection. |
boolean |
contains(Object o)
Delegates to the corresponding type-specific method. |
boolean |
containsAll(CharCollection c)
Checks whether this collection contains all elements from the given type-specific collection. |
boolean |
containsAll(Collection c)
Checks whether this collection contains all elements from the given collection. |
boolean |
isEmpty()
|
Iterator |
iterator()
Delegates to the corresponding type-specific method. |
boolean |
remove(char k)
|
boolean |
remove(Object o)
Delegates to the corresponding type-specific method. |
boolean |
removeAll(CharCollection c)
Remove from this collection all elements in the given type-specific collection. |
boolean |
removeAll(Collection c)
Remove from this collection all elements in the given collection. |
boolean |
retainAll(CharCollection c)
Retains in this collection only elements from the given type-specific collection. |
boolean |
retainAll(Collection c)
Retains in this collection only elements from the given collection. |
Object[] |
toArray()
|
char[] |
toArray(char[] a)
Builds a primitive type array containing the items of this collection. |
Object[] |
toArray(Object[] a)
|
char[] |
toCharArray()
Returns a primitive type array containing the items of this collection. |
char[] |
toCharArray(char[] 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 it.unimi.dsi.fastutil.chars.CharCollection |
charIterator, contains |
Methods inherited from interface java.util.Collection |
clear, equals, hashCode, size |
Method Detail |
public char[] toArray(char[] a)
CharCollection
toArray
in interface CharCollection
a
- if this array is big enough, it will be used to store the collection.
Collection.toArray(Object[])
public char[] toCharArray()
CharCollection
toCharArray
in interface CharCollection
Collection.toArray()
public char[] toCharArray(char[] a)
CharCollection
toCharArray
in interface CharCollection
a
- if this array is big enough, it will be used to store the collection.
Collection.toArray(Object[])
public boolean addAll(CharCollection c)
addAll
in interface CharCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.Collection.addAll(Collection)
public boolean containsAll(CharCollection c)
containsAll
in interface CharCollection
c
- a type-specific collection.
true
if this collection contains all elements of the argument.Collection.containsAll(Collection)
public boolean retainAll(CharCollection c)
retainAll
in interface CharCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.Collection.retainAll(Collection)
public boolean removeAll(CharCollection c)
removeAll
in interface CharCollection
c
- a type-specific collection.
true
if this collection changed as a result of the call.Collection.removeAll(Collection)
public Object[] toArray()
toArray
in interface Collection
public Object[] toArray(Object[] a)
toArray
in interface Collection
public boolean addAll(Collection c)
addAll
in interface Collection
c
- a collection.
true
if this collection changed as a result of the call.public boolean add(char k)
add
in interface CharCollection
Collection.add(Object)
public boolean remove(char k)
remove
in interface CharCollection
Collection.remove(Object)
public Iterator iterator()
iterator
in interface Collection
public boolean add(Object o)
add
in interface Collection
public boolean remove(Object o)
remove
in interface Collection
public boolean contains(Object o)
contains
in interface Collection
public boolean containsAll(Collection c)
containsAll
in interface Collection
c
- a collection.
true
if this collection contains all elements of the argument.public boolean retainAll(Collection c)
retainAll
in interface Collection
c
- a collection.
true
if this collection changed as a result of the call.public boolean removeAll(Collection c)
removeAll
in interface Collection
c
- a collection.
true
if this collection changed as a result of the call.public boolean isEmpty()
isEmpty
in interface Collection
public String toString()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |