Package it.unimi.dsi.fastutil.ints
Class IntCollections.IterableCollection
- java.lang.Object
-
- java.util.AbstractCollection<java.lang.Integer>
-
- it.unimi.dsi.fastutil.ints.AbstractIntCollection
-
- it.unimi.dsi.fastutil.ints.IntCollections.IterableCollection
-
- All Implemented Interfaces:
IntCollection
,IntIterable
,java.io.Serializable
,java.lang.Iterable<java.lang.Integer>
,java.util.Collection<java.lang.Integer>
- Enclosing class:
- IntCollections
public static class IntCollections.IterableCollection extends AbstractIntCollection 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 primitive iterator on the elements of this collection.IntSpliterator
intSpliterator()
Returns a primitive spliterator on the elements of this collection.boolean
isEmpty()
IntIterator
iterator()
Returns a type-specific iterator on the elements of this collection.int
size()
IntSpliterator
spliterator()
Returns a type-specific spliterator on the elements of this collection.-
Methods inherited from class it.unimi.dsi.fastutil.ints.AbstractIntCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, forEach, rem, remove, removeAll, removeAll, removeIf, retainAll, retainAll, toArray, toIntArray, toIntArray, toString
-
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface java.util.Collection
clear, equals, hashCode, toArray, toArray, toArray
-
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntCollection
intParallelStream, intStream, parallelStream, removeIf, removeIf, stream
-
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntIterable
forEach, forEach
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
size
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
size
in classjava.util.AbstractCollection<java.lang.Integer>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmpty
in interfacejava.util.Collection<java.lang.Integer>
- Overrides:
isEmpty
in classjava.util.AbstractCollection<java.lang.Integer>
-
iterator
public IntIterator iterator()
Description copied from interface:IntCollection
Returns a type-specific iterator on the elements of this collection.- Specified by:
iterator
in interfacejava.util.Collection<java.lang.Integer>
- Specified by:
iterator
in interfaceIntCollection
- Specified by:
iterator
in interfaceIntIterable
- Specified by:
iterator
in interfacejava.lang.Iterable<java.lang.Integer>
- Specified by:
iterator
in classAbstractIntCollection
- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-
spliterator
public IntSpliterator spliterator()
Description copied from interface:IntCollection
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 interfacejava.util.Collection<java.lang.Integer>
- Specified by:
spliterator
in interfaceIntCollection
- Specified by:
spliterator
in interfaceIntIterable
- Specified by:
spliterator
in interfacejava.lang.Iterable<java.lang.Integer>
- Returns:
- a type-specific spliterator on the elements of this collection.
-
intIterator
public IntIterator intIterator()
Description copied from interface:IntCollection
Returns a primitive iterator on the elements of this collection.This method is identical to
IntCollection.iterator()
, as the type-specific iterator is already compatible with the JDK's primitive iterators. It only exists for compatibility with the other primitive types'Collection
s that have use for widened iterators.- Specified by:
intIterator
in interfaceIntCollection
- Specified by:
intIterator
in interfaceIntIterable
- Returns:
- a primitive iterator on the elements of this collection.
-
intSpliterator
public IntSpliterator intSpliterator()
Description copied from interface:IntCollection
Returns a primitive spliterator on the elements of this collection.This method is identical to
IntCollection.spliterator()
, as the type-specific spliterator is already compatible with the JDK's primitive spliterators. It only exists for compatibility with the other primitive types'Collection
s that have use for widened spliterators.- Specified by:
intSpliterator
in interfaceIntCollection
- Specified by:
intSpliterator
in interfaceIntIterable
- Returns:
- a primitive spliterator on the elements of this collection.
-
-