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 IntIteratorintIterator()Returns a primitive iterator on the elements of this collection.IntSpliteratorintSpliterator()Returns a primitive spliterator on the elements of this collection.booleanisEmpty()IntIteratoriterator()Returns a type-specific iterator on the elements of this collection.intsize()IntSpliteratorspliterator()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:
sizein interfacejava.util.Collection<java.lang.Integer>- Specified by:
sizein classjava.util.AbstractCollection<java.lang.Integer>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<java.lang.Integer>- Overrides:
isEmptyin classjava.util.AbstractCollection<java.lang.Integer>
-
iterator
public IntIterator iterator()
Description copied from interface:IntCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfacejava.util.Collection<java.lang.Integer>- Specified by:
iteratorin interfaceIntCollection- Specified by:
iteratorin interfaceIntIterable- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.Integer>- Specified by:
iteratorin classAbstractIntCollection- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
Iterable.iterator()
-
spliterator
public IntSpliterator spliterator()
Description copied from interface:IntCollectionReturns 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:
spliteratorin interfacejava.util.Collection<java.lang.Integer>- Specified by:
spliteratorin interfaceIntCollection- Specified by:
spliteratorin interfaceIntIterable- Specified by:
spliteratorin 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:IntCollectionReturns 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'Collections that have use for widened iterators.- Specified by:
intIteratorin interfaceIntCollection- Specified by:
intIteratorin interfaceIntIterable- Returns:
- a primitive iterator on the elements of this collection.
-
intSpliterator
public IntSpliterator intSpliterator()
Description copied from interface:IntCollectionReturns 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'Collections that have use for widened spliterators.- Specified by:
intSpliteratorin interfaceIntCollection- Specified by:
intSpliteratorin interfaceIntIterable- Returns:
- a primitive spliterator on the elements of this collection.
-
-