Package it.unimi.dsi.fastutil.bytes
Class ByteCollections.IterableCollection
- java.lang.Object
-
- java.util.AbstractCollection<java.lang.Byte>
-
- it.unimi.dsi.fastutil.bytes.AbstractByteCollection
-
- it.unimi.dsi.fastutil.bytes.ByteCollections.IterableCollection
-
- All Implemented Interfaces:
ByteCollection
,ByteIterable
,java.io.Serializable
,java.lang.Iterable<java.lang.Byte>
,java.util.Collection<java.lang.Byte>
- Enclosing class:
- ByteCollections
public static class ByteCollections.IterableCollection extends AbstractByteCollection 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()
ByteIterator
iterator()
Returns a type-specific iterator on the elements of this collection.int
size()
ByteSpliterator
spliterator()
Returns a type-specific spliterator on the elements of this collection.-
Methods inherited from class it.unimi.dsi.fastutil.bytes.AbstractByteCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toByteArray, toByteArray, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteCollection
intParallelStream, intStream, parallelStream, removeIf, removeIf, removeIf, stream
-
Methods inherited from interface it.unimi.dsi.fastutil.bytes.ByteIterable
forEach, forEach, forEach
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.lang.Byte>
- Specified by:
size
in classjava.util.AbstractCollection<java.lang.Byte>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<java.lang.Byte>
- Overrides:
isEmpty
in classjava.util.AbstractCollection<java.lang.Byte>
-
iterator
public ByteIterator iterator()
Description copied from interface:ByteCollection
Returns a type-specific iterator on the elements of this collection.- Specified by:
iterator
in interfaceByteCollection
- Specified by:
iterator
in interfaceByteIterable
- Specified by:
iterator
in interfacejava.util.Collection<java.lang.Byte>
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Byte>
- Specified by:
iterator
in classAbstractByteCollection
- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-
spliterator
public ByteSpliterator spliterator()
Description copied from interface:ByteCollection
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 interfaceByteCollection
- Specified by:
spliterator
in interfaceByteIterable
- Specified by:
spliterator
in interfacejava.util.Collection<java.lang.Byte>
- Specified by:
spliterator
in interfacejava.lang.Iterable<java.lang.Byte>
- Returns:
- a type-specific spliterator on the elements of this collection.
-
intIterator
public IntIterator intIterator()
Description copied from interface:ByteCollection
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
.- Specified by:
intIterator
in interfaceByteCollection
- Specified by:
intIterator
in interfaceByteIterable
- Returns:
- a widened primitive iterator on the elements of this collection.
-
intSpliterator
public IntSpliterator intSpliterator()
Description copied from interface:ByteCollection
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
.- Specified by:
intSpliterator
in interfaceByteCollection
- Specified by:
intSpliterator
in interfaceByteIterable
- Returns:
- a widened primitive spliterator on the elements of this collection.
-
-