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