Package it.unimi.dsi.fastutil.shorts
Class ShortCollections.IterableCollection
- java.lang.Object
-
- java.util.AbstractCollection<java.lang.Short>
-
- it.unimi.dsi.fastutil.shorts.AbstractShortCollection
-
- it.unimi.dsi.fastutil.shorts.ShortCollections.IterableCollection
-
- All Implemented Interfaces:
ShortCollection,ShortIterable,java.io.Serializable,java.lang.Iterable<java.lang.Short>,java.util.Collection<java.lang.Short>
- Enclosing class:
- ShortCollections
public static class ShortCollections.IterableCollection extends AbstractShortCollection 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 widened primitive iterator on the elements of this collection.IntSpliteratorintSpliterator()Returns widened primitive spliterator on the elements of this collection.booleanisEmpty()ShortIteratoriterator()Returns a type-specific iterator on the elements of this collection.intsize()ShortSpliteratorspliterator()Returns 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, 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.shorts.ShortCollection
intParallelStream, intStream, parallelStream, removeIf, removeIf, removeIf, stream
-
Methods inherited from interface it.unimi.dsi.fastutil.shorts.ShortIterable
forEach, forEach, forEach
-
-
-
-
Method Detail
-
size
public int size()
- Specified by:
sizein interfacejava.util.Collection<java.lang.Short>- Specified by:
sizein classjava.util.AbstractCollection<java.lang.Short>
-
isEmpty
public boolean isEmpty()
- Specified by:
isEmptyin interfacejava.util.Collection<java.lang.Short>- Overrides:
isEmptyin classjava.util.AbstractCollection<java.lang.Short>
-
iterator
public ShortIterator iterator()
Description copied from interface:ShortCollectionReturns a type-specific iterator on the elements of this collection.- Specified by:
iteratorin interfacejava.util.Collection<java.lang.Short>- Specified by:
iteratorin interfacejava.lang.Iterable<java.lang.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:
Iterable.iterator()
-
spliterator
public 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 interfacejava.util.Collection<java.lang.Short>- Specified by:
spliteratorin interfacejava.lang.Iterable<java.lang.Short>- Specified by:
spliteratorin interfaceShortCollection- Specified by:
spliteratorin interfaceShortIterable- Returns:
- a type-specific spliterator on the elements of this collection.
-
intIterator
public 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 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.
-
-