Class CharCollections.IterableCollection
- java.lang.Object
-
- java.util.AbstractCollection<java.lang.Character>
-
- it.unimi.dsi.fastutil.chars.AbstractCharCollection
-
- it.unimi.dsi.fastutil.chars.CharCollections.IterableCollection
-
- All Implemented Interfaces:
CharCollection
,CharIterable
,java.io.Serializable
,java.lang.Iterable<java.lang.Character>
,java.util.Collection<java.lang.Character>
- Enclosing class:
- CharCollections
public static class CharCollections.IterableCollection extends AbstractCharCollection implements java.io.Serializable
A collection wrapper class for iterables.- See Also:
- Serialized Form
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IntIterator
intIterator()
Returns a widened primitive iterator on the elements of this collection.IntSpliterator
intSpliterator()
Returns widened primitive spliterator on the elements of this collection.boolean
isEmpty()
CharIterator
iterator()
Returns a type-specific iterator on the elements of this collection.int
size()
CharSpliterator
spliterator()
Returns a type-specific spliterator on the elements of this collection.-
Methods inherited from class it.unimi.dsi.fastutil.chars.AbstractCharCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toCharArray, toCharArray, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharCollection
intParallelStream, intStream, parallelStream, removeIf, removeIf, removeIf, stream
-
Methods inherited from interface it.unimi.dsi.fastutil.chars.CharIterable
forEach, forEach, forEach
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.lang.Character>
- Specified by:
size
in classjava.util.AbstractCollection<java.lang.Character>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<java.lang.Character>
- Overrides:
isEmpty
in classjava.util.AbstractCollection<java.lang.Character>
-
iterator
public CharIterator iterator()
Description copied from interface:CharCollection
Returns a type-specific iterator on the elements of this collection.- Specified by:
iterator
in interfaceCharCollection
- Specified by:
iterator
in interfaceCharIterable
- Specified by:
iterator
in interfacejava.util.Collection<java.lang.Character>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Character>
- Specified by:
iterator
in classAbstractCharCollection
- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-
spliterator
public CharSpliterator spliterator()
Description copied from interface:CharCollection
Returns a type-specific spliterator on the elements of this collection.See
Collection.spliterator()
for more documentation on the requirements of the returned spliterator.- Specified by:
spliterator
in interfaceCharCollection
- Specified by:
spliterator
in interfaceCharIterable
- Specified by:
spliterator
in interfacejava.util.Collection<java.lang.Character>
- Specified by:
spliterator
in interfacejava.lang.Iterable<java.lang.Character>
- Returns:
- a type-specific spliterator on the elements of this collection.
-
intIterator
public IntIterator intIterator()
Description copied from interface:CharCollection
Returns a widened primitive iterator on the elements of this collection.This method is provided for the purpose of APIs that expect only the JDK's primitive iterators, of which there are only
int
,long
, anddouble
.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. SeeCharacter
for more discussion on code points, char values, and surrogate pairs.- Specified by:
intIterator
in interfaceCharCollection
- Specified by:
intIterator
in interfaceCharIterable
- Returns:
- a widened primitive iterator on the elements of this collection.
-
intSpliterator
public IntSpliterator intSpliterator()
Description copied from interface:CharCollection
Returns widened primitive spliterator on the elements of this collection.This method is provided for the purpose of APIs that expect only the JDK's primitive spliterators, of which there are only
int
,long
, anddouble
.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. SeeCharacter
for more discussion on code points, char values, and surrogate pairs.- Specified by:
intSpliterator
in interfaceCharCollection
- Specified by:
intSpliterator
in interfaceCharIterable
- Returns:
- a widened primitive spliterator on the elements of this collection.
-
-