public static class CharCollections.UnmodifiableCollection extends java.lang.Object implements CharCollection, java.io.Serializable
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(char k) |
boolean |
add(java.lang.Character k) |
boolean |
addAll(CharCollection c) |
boolean |
addAll(java.util.Collection<? extends java.lang.Character> c) |
CharIterator |
charIterator()
Deprecated.
|
void |
clear() |
boolean |
contains(char o) |
boolean |
contains(java.lang.Object k) |
boolean |
containsAll(CharCollection c) |
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
isEmpty() |
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 |
remove(java.lang.Object ok) |
boolean |
removeAll(CharCollection c) |
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
retainAll(CharCollection c) |
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
java.lang.Object[] |
toArray() |
char[] |
toArray(char[] a)
Returns a primitive type array containing the items of this collection.
|
<T> T[] |
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() |
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitpublic int size()
size in interface java.util.Collection<java.lang.Character>public boolean isEmpty()
isEmpty in interface java.util.Collection<java.lang.Character>public boolean contains(char o)
contains in interface CharCollectionCollection.contains(Object)public 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>@Deprecated public CharIterator charIterator()
CharCollectioncharIterator in interface CharCollectionCharCollection.iterator()public boolean add(char k)
add in interface CharCollectionCollection.add(Object)public boolean remove(java.lang.Object ok)
remove in interface java.util.Collection<java.lang.Character>public boolean addAll(java.util.Collection<? extends java.lang.Character> c)
addAll in interface java.util.Collection<java.lang.Character>public boolean containsAll(java.util.Collection<?> c)
containsAll in interface java.util.Collection<java.lang.Character>public boolean removeAll(java.util.Collection<?> c)
removeAll in interface java.util.Collection<java.lang.Character>public boolean retainAll(java.util.Collection<?> c)
retainAll in interface java.util.Collection<java.lang.Character>public void clear()
clear in interface java.util.Collection<java.lang.Character>public java.lang.String toString()
toString in class java.lang.Objectpublic <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>a - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public java.lang.Object[] toArray()
toArray in interface java.util.Collection<java.lang.Character>public char[] toCharArray()
CharCollectiontoCharArray 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 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 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 addAll(CharCollection c)
addAll in interface CharCollectionCollection.addAll(Collection)public boolean containsAll(CharCollection c)
containsAll in interface CharCollectionCollection.containsAll(Collection)public boolean removeAll(CharCollection c)
removeAll in interface CharCollectionCollection.removeAll(Collection)public boolean retainAll(CharCollection c)
retainAll in interface CharCollectionCollection.retainAll(Collection)public boolean add(java.lang.Character k)
add in interface java.util.Collection<java.lang.Character>public boolean contains(java.lang.Object k)
contains in interface java.util.Collection<java.lang.Character>