Package it.unimi.dsi.fastutil.shorts
Class ShortCollections.IterableCollection
java.lang.Object
java.util.AbstractCollection<Short>
it.unimi.dsi.fastutil.shorts.AbstractShortCollection
it.unimi.dsi.fastutil.shorts.ShortCollections.IterableCollection
- All Implemented Interfaces:
ShortCollection,ShortIterable,Serializable,Iterable<Short>,Collection<Short>
- Enclosing class:
ShortCollections
public static class ShortCollections.IterableCollection
extends AbstractShortCollection
implements Serializable
A collection wrapper class for iterables.
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionit.unimi.dsi.fastutil.ints.IntIteratorReturns a widened primitive iterator on the elements of this collection.it.unimi.dsi.fastutil.ints.IntSpliteratorReturns widened primitive spliterator on the elements of this collection.booleanisEmpty()it.unimi.dsi.fastutil.shorts.ShortIteratoriterator()Returns a type-specific iterator on the elements of this collection.intsize()it.unimi.dsi.fastutil.shorts.ShortSpliteratorReturns a type-specific spliterator on the elements of this collection.Methods inherited from class it.unimi.dsi.fastutil.shorts.AbstractShortCollection
add, add, addAll, addAll, contains, contains, containsAll, containsAll, rem, remove, removeAll, removeAll, retainAll, retainAll, toArray, toShortArray, toShortArray, toStringMethods inherited from class java.util.AbstractCollection
clear, toArray, toArrayMethods inherited from class java.lang.Object
clone, equals, finalize, 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.shorts.ShortCollection
intParallelStream, intStream, parallelStream, removeIf, removeIf, removeIf, streamMethods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterable
forEach, forEach, forEach
-
Field Details
-
iterable
-
-
Constructor Details
-
IterableCollection
-
-
Method Details
-
size
public int size()- Specified by:
sizein interfaceCollection<Short>- Specified by:
sizein classAbstractCollection<Short>
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceCollection<Short>- Overrides:
isEmptyin classAbstractCollection<Short>
-
iterator
public it.unimi.dsi.fastutil.shorts.ShortIterator iterator()Description copied from interface:ShortCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfaceCollection<Short>- Specified by:
iteratorin interfaceIterable<Short>- Specified by:
iteratorin interfaceShortCollection- Specified by:
iteratorin interfaceShortIterable- Specified by:
iteratorin classAbstractShortCollection- Returns:
- a type-specific iterator on the elements of this collection.
- See Also:
-
spliterator
public it.unimi.dsi.fastutil.shorts.ShortSpliterator spliterator()Description copied from interface:ShortCollectionReturns 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<Short>- Specified by:
spliteratorin interfaceIterable<Short>- Specified by:
spliteratorin interfaceShortCollection- Specified by:
spliteratorin interfaceShortIterable- Returns:
- a type-specific spliterator on the elements of this collection.
-
intIterator
public it.unimi.dsi.fastutil.ints.IntIterator intIterator()Description copied from interface:ShortCollectionReturns 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:
intIteratorin interfaceShortCollection- Specified by:
intIteratorin interfaceShortIterable- Returns:
- a widened primitive iterator on the elements of this collection.
-
intSpliterator
public it.unimi.dsi.fastutil.ints.IntSpliterator intSpliterator()Description copied from interface:ShortCollectionReturns 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:
intSpliteratorin interfaceShortCollection- Specified by:
intSpliteratorin interfaceShortIterable- Returns:
- a widened primitive spliterator on the elements of this collection.
-