public interface CharCollection
| Modifier and Type | Method and Description |
|---|---|
boolean |
add(char v)
Adds an element to this collection.
|
boolean |
addAll(CharCollection c)
Adds all the elements of a specified collection to
this collection.
|
void |
clear()
Clears this collection.
|
boolean |
contains(char v)
Indicates whether this collection contains a specified
element.
|
boolean |
containsAll(CharCollection c)
Indicates whether all elements of a specified
collection is contained in this collection.
|
boolean |
equals(Object obj)
Indicates whether this collection is equal to some object.
|
int |
hashCode()
Returns a hash code value for this collection.
|
boolean |
isEmpty()
Indicates whether this collection is empty.
|
CharIterator |
iterator()
Returns an iterator over this collection.
|
boolean |
remove(char v)
Removes a specified element from this collection.
|
boolean |
removeAll(CharCollection c)
Removes all the elements of a specified collection from
this collection.
|
boolean |
retainAll(CharCollection c)
Retains only the elements of a specified collection in
this collection.
|
int |
size()
Returns the number of elements in this collection.
|
char[] |
toArray()
Returns the elements of this collection as an array.
|
char[] |
toArray(char[] a)
Returns the elements of this collection as an array.
|
void |
trimToSize()
Minimizes the memory used by this collection.
|
boolean add(char v)
v - the element to add to this collection.UnsupportedOperationException - if the operation is not supported by this
collection.addAll(CharCollection)boolean addAll(CharCollection c)
c - the collection whose elements to add to this
collection.UnsupportedOperationException - if the operation is not supported by this
collection.NullPointerException - if c is null.add(char)void clear()
UnsupportedOperationException - if the operation is not supported by this
collection.boolean contains(char v)
v - the element to test for containment.containsAll(CharCollection)boolean containsAll(CharCollection c)
c - the collection whose elements to test for
containment.NullPointerException - if c is null.contains(char)boolean equals(Object obj)
int hashCode()
boolean isEmpty()
CharIterator iterator()
boolean remove(char v)
v - the char value to remove from this collection.UnsupportedOperationException - if the operation is not supported by this
collection.boolean removeAll(CharCollection c)
c - the collection whose elements to remove from this
collection.UnsupportedOperationException - if the operation is not supported by this
collection.NullPointerException - if c is null.boolean retainAll(CharCollection c)
c - the collection whose elements to retain in this
collection.UnsupportedOperationException - if the operation is not supported by this
collection.NullPointerException - if c is null.int size()
char[] toArray()
char[] toArray(char[] a)
a - an array to fill with the elements of this
collection; if a is null or not
big enough to contain all the elements of this
collection, an new array is allocated,
and a is not changed.void trimToSize()
Copyright © 2011–2021. All rights reserved.