|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.util.AbstractCollection<java.lang.Character>
it.unimi.dsi.fastutil.chars.AbstractCharCollection
public abstract class AbstractCharCollection
An abstract class providing basic methods for collections implementing a type-specific interface.
In particular, this class provide iterator(), add(), remove(Object) and
contains(Object) methods that just call the type-specific counterpart.
| Method Summary | ||
|---|---|---|
boolean |
add(char k)
|
|
boolean |
add(java.lang.Character 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(java.util.Collection<? extends java.lang.Character> c)
Adds all elements of the given collection to this collection. |
|
CharIterator |
charIterator()
Deprecated. |
|
boolean |
contains(char k)
|
|
boolean |
contains(java.lang.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(java.util.Collection<?> c)
Checks whether this collection contains all elements from the given collection. |
|
boolean |
isEmpty()
|
|
abstract CharIterator |
iterator()
Returns a type-specific iterator on the elements of this collection. |
|
boolean |
rem(char 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 |
rem(java.lang.Object o)
Delegates to the corresponding type-specific method. |
|
boolean |
remove(java.lang.Object ok)
Delegates to the type-specific rem() method. |
|
boolean |
removeAll(CharCollection c)
Remove from this collection all elements in the given type-specific collection. |
|
boolean |
removeAll(java.util.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(java.util.Collection<?> c)
Retains in this collection only elements from the given collection. |
|
java.lang.Object[] |
toArray()
|
|
char[] |
toArray(char[] a)
Returns a primitive type array containing the items of this collection. |
|
|
toArray(T[] a)
Returns an containing the items of this collection; the runtime type of the returned array is that of the specified array. |
|
char[] |
toCharArray()
Returns a primitive type array containing the items of this collection. |
|
char[] |
toCharArray(char[] a)
Returns a primitive type array containing the items of this collection. |
|
java.lang.String |
toString()
|
|
| Methods inherited from class java.util.AbstractCollection |
|---|
clear, size |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.util.Collection |
|---|
clear, equals, hashCode, size |
| Method Detail |
|---|
public char[] toArray(char[] a)
CharCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toArray in interface CharCollectiona - if this array is big enough, it will be used to store this collection.
Collection.toArray(Object[])public char[] toCharArray()
CharCollection
toCharArray in interface CharCollectionCollection.toArray()public char[] toCharArray(char[] a)
CharCollectionNote that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toCharArray in interface CharCollectiona - if this array is big enough, it will be used to store this collection.
Collection.toArray(Object[])public boolean addAll(CharCollection c)
addAll in interface CharCollectionc - 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 CharCollectionc - 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 CharCollectionc - 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 CharCollectionc - a type-specific collection.
true if this collection changed as a result of the call.Collection.removeAll(Collection)public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Character>toArray in class java.util.AbstractCollection<java.lang.Character>public <T> T[] toArray(T[] a)
CharCollectionWarning: Note that, contrarily to Collection.toArray(Object[]), this
methods just writes all elements of this collection: no special
value will be added after the last one.
toArray in interface CharCollectiontoArray in interface java.util.Collection<java.lang.Character>toArray in class java.util.AbstractCollection<java.lang.Character>a - if this array is big enough, it will be used to store this collection.
Collection.toArray(Object[])public boolean addAll(java.util.Collection<? extends java.lang.Character> c)
addAll in interface java.util.Collection<java.lang.Character>addAll in class java.util.AbstractCollection<java.lang.Character>c - a collection.
true if this collection changed as a result of the call.public boolean add(char k)
add in interface CharCollectionCollection.add(Object)@Deprecated public CharIterator charIterator()
charIterator in interface CharCollectionCharCollection.iterator()public abstract CharIterator iterator()
CharCollectionNote that this specification strengthens the one given in
Iterable.iterator(), which was already
strengthened in the corresponding type-specific class,
but was weakened by the fact that this interface extends Collection.
iterator in interface CharCollectioniterator in interface CharIterableiterator in interface java.lang.Iterable<java.lang.Character>iterator in interface java.util.Collection<java.lang.Character>iterator in class java.util.AbstractCollection<java.lang.Character>public boolean remove(java.lang.Object ok)
rem() method.
remove in interface java.util.Collection<java.lang.Character>remove in class java.util.AbstractCollection<java.lang.Character>public boolean add(java.lang.Character o)
add in interface java.util.Collection<java.lang.Character>add in class java.util.AbstractCollection<java.lang.Character>public boolean rem(java.lang.Object o)
public boolean contains(java.lang.Object o)
contains in interface java.util.Collection<java.lang.Character>contains in class java.util.AbstractCollection<java.lang.Character>public boolean contains(char k)
contains in interface CharCollectionCollection.contains(Object)public boolean rem(char k)
CharCollectionremove(), 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 CharCollectionCollection.remove(Object)public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<java.lang.Character>containsAll in class java.util.AbstractCollection<java.lang.Character>c - a collection.
true if this collection contains all elements of the argument.public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Character>retainAll in class java.util.AbstractCollection<java.lang.Character>c - a collection.
true if this collection changed as a result of the call.public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Character>removeAll in class java.util.AbstractCollection<java.lang.Character>c - a collection.
true if this collection changed as a result of the call.public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Character>isEmpty in class java.util.AbstractCollection<java.lang.Character>public java.lang.String toString()
toString in class java.util.AbstractCollection<java.lang.Character>
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||