Package it.unimi.dsi.fastutil.ints
Class IntCollections.IterableCollection
java.lang.Object
java.util.AbstractCollection<Integer>
it.unimi.dsi.fastutil.ints.AbstractIntCollection
it.unimi.dsi.fastutil.ints.IntCollections.IterableCollection
- All Implemented Interfaces:
IntCollection,IntIterable,Serializable,Iterable<Integer>,Collection<Integer>
- Enclosing class:
IntCollections
public static class IntCollections.IterableCollection
extends AbstractIntCollection
implements Serializable
A collection wrapper class for iterables.
- See Also:
-
Method Summary
Modifier and TypeMethodDescriptionReturns a primitive iterator on the elements of this collection.Returns a primitive spliterator on the elements of this collection.booleanisEmpty()iterator()Returns a type-specific iterator on the elements of this collection.intsize()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, toStringMethods inherited from class java.util.AbstractCollection
clear, toArray, toArrayMethods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
clear, equals, hashCode, toArray, toArray, toArrayMethods inherited from interface it.unimi.dsi.fastutil.ints.IntCollection
intParallelStream, intStream, parallelStream, removeIf, removeIf, streamMethods inherited from interface it.unimi.dsi.fastutil.ints.IntIterable
forEach, forEach
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<Integer>- Specified by:
sizein classAbstractCollection<Integer>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Integer>- Overrides:
isEmptyin classAbstractCollection<Integer>
-
iterator
Description copied from interface:IntCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceCollection<Integer>- Specified by:
iteratorin interfaceIntCollection- Specified by:
iteratorin interfaceIntIterable- Specified by:
iteratorin interfaceIterable<Integer>- Specified by:
iteratorin classAbstractIntCollection- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
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 interfaceCollection<Integer>- Specified by:
spliteratorin interfaceIntCollection- Specified by:
spliteratorin interfaceIntIterable- Specified by:
spliteratorin interfaceIterable<Integer>- Returns:
- a type-specific spliterator on the elements of this collection.
-
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
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.
-