public abstract static class CharCollections.EmptyCollection extends AbstractCharCollection
This class may be useful to implement your own in case you subclass a type-specific collection.
| Modifier | Constructor and Description |
|---|---|
protected |
EmptyCollection() |
| Modifier and Type | Method and Description |
|---|---|
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) |
void |
clear() |
boolean |
contains(char k)
Returns
true if this collection contains the specified element. |
boolean |
containsAll(CharCollection c)
Checks whether this collection contains all elements from the given type-specific collection.
|
boolean |
containsAll(java.util.Collection<?> c) |
boolean |
equals(java.lang.Object o) |
void |
forEach(it.unimi.dsi.fastutil.chars.CharConsumer action)
Performs the given action for each element of this type-specific
Iterable
until all elements have been processed or the action throws an
exception. |
void |
forEach(java.util.function.Consumer<? super java.lang.Character> action)
Deprecated.
|
int |
hashCode() |
it.unimi.dsi.fastutil.ints.IntIterator |
intIterator()
Returns a widened primitive iterator on the elements of this collection.
|
it.unimi.dsi.fastutil.ints.IntSpliterator |
intSpliterator()
Returns widened primitive spliterator on the elements of this collection.
|
CharBidirectionalIterator |
iterator()
Returns a type-specific iterator on the elements of this collection.
|
boolean |
removeAll(CharCollection c)
Remove from this collection all elements in the given type-specific collection.
|
boolean |
removeAll(java.util.Collection<?> c) |
boolean |
removeIf(CharPredicate filter)
Remove from this collection all elements which satisfy the given predicate.
|
boolean |
removeIf(java.util.function.Predicate<? super java.lang.Character> filter)
Deprecated.
|
boolean |
retainAll(CharCollection c)
Retains in this collection only elements from the given type-specific collection.
|
boolean |
retainAll(java.util.Collection<?> c) |
int |
size() |
it.unimi.dsi.fastutil.chars.CharSpliterator |
spliterator()
Returns a type-specific spliterator on the elements of this collection.
|
java.lang.Object[] |
toArray() |
<T> T[] |
toArray(T[] array) |
char[] |
toCharArray()
Returns a primitive type array containing the items of this collection.
|
char[] |
toCharArray(char[] a)
Deprecated.
|
add, add, contains, rem, remove, toArray, toStringclone, finalize, getClass, notify, notifyAll, wait, wait, waitintParallelStream, intStream, parallelStream, removeIf, streamforEachpublic boolean contains(char k)
AbstractCharCollectiontrue if this collection contains the specified element.contains in interface CharCollectioncontains in class AbstractCharCollectionCollection.contains(Object)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[] array)
toArray in interface java.util.Collection<java.lang.Character>toArray in class java.util.AbstractCollection<java.lang.Character>public CharBidirectionalIterator iterator()
CharCollectioniterator 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 AbstractCharCollectionIterable.iterator()public it.unimi.dsi.fastutil.chars.CharSpliterator spliterator()
CharCollectionSee Collection.spliterator() for more documentation on the requirements
of the returned spliterator.
public int size()
size in interface java.util.Collection<java.lang.Character>size in class java.util.AbstractCollection<java.lang.Character>public void clear()
clear in interface java.util.Collection<java.lang.Character>clear in class java.util.AbstractCollection<java.lang.Character>public int hashCode()
hashCode in interface java.util.Collection<java.lang.Character>hashCode in class java.lang.Objectpublic boolean equals(java.lang.Object o)
equals in interface java.util.Collection<java.lang.Character>equals in class java.lang.Object@Deprecated public void forEach(java.util.function.Consumer<? super java.lang.Character> action)
CharIterablepublic boolean containsAll(java.util.Collection<?> c)
AbstractCharCollectioncontainsAll in interface java.util.Collection<java.lang.Character>containsAll in class AbstractCharCollectionpublic boolean addAll(java.util.Collection<? extends java.lang.Character> c)
AbstractCharCollectionaddAll in interface java.util.Collection<java.lang.Character>addAll in class AbstractCharCollectionpublic boolean removeAll(java.util.Collection<?> c)
AbstractCharCollectionremoveAll in interface java.util.Collection<java.lang.Character>removeAll in class AbstractCharCollectionpublic boolean retainAll(java.util.Collection<?> c)
AbstractCharCollectionretainAll in interface java.util.Collection<java.lang.Character>retainAll in class AbstractCharCollection@Deprecated public boolean removeIf(java.util.function.Predicate<? super java.lang.Character> filter)
CharCollectionpublic char[] toCharArray()
CharCollectiontoCharArray in interface CharCollectiontoCharArray in class AbstractCharCollectionCollection.toArray()@Deprecated public char[] toCharArray(char[] a)
AbstractCharCollectionNote 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 CharCollectiontoCharArray in class AbstractCharCollectiona - if this array is big enough, it will be used to store this collection.Collection.toArray(Object[])public void forEach(it.unimi.dsi.fastutil.chars.CharConsumer action)
CharIterableIterable
until all elements have been processed or the action throws an
exception.action - the action to be performed for each element.Iterable.forEach(java.util.function.Consumer)public boolean containsAll(CharCollection c)
CharCollectioncontainsAll in interface CharCollectioncontainsAll in class AbstractCharCollectionc - a type-specific collection.true if this collection contains all elements of the argument.Collection.containsAll(Collection)public boolean addAll(CharCollection c)
CharCollectionaddAll in interface CharCollectionaddAll in class AbstractCharCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.addAll(Collection)public boolean removeAll(CharCollection c)
CharCollectionremoveAll in interface CharCollectionremoveAll in class AbstractCharCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.removeAll(Collection)public boolean retainAll(CharCollection c)
CharCollectionretainAll in interface CharCollectionretainAll in class AbstractCharCollectionc - a type-specific collection.true if this collection changed as a result of the call.Collection.retainAll(Collection)public boolean removeIf(CharPredicate filter)
CharCollectionfilter - a predicate which returns true for elements to be
removed.true if any elements were removed.Collection.removeIf(java.util.function.Predicate)public it.unimi.dsi.fastutil.ints.IntIterator intIterator()
CharCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive iterators, of which there are only int, long, and double.
WARNING: This is not the same as converting the source to a sequence
of code points. This returned instance literally performs (int)(charValue) casts.
Surrogate pairs will be left as separate elements instead of combined into a single element
with the code point it represents. See Character for more discussion on code points,
char values, and surrogate pairs.
public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()
CharCollection
This method is provided for the purpose of APIs that expect only the JDK's
primitive spliterators, of which there are only int, long, and double.
WARNING: This is not the same as converting the source to a sequence
of code points. This returned instance literally performs (int)(charValue) casts.
Surrogate pairs will be left as separate elements instead of combined into a single element
with the code point it represents. See Character for more discussion on code points,
char values, and surrogate pairs.