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 Details

    • size

      public int size()
      Specified by:
      size in interface java.util.Collection<java.lang.Short>
      Specified by:
      size in class java.util.AbstractCollection<java.lang.Short>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface java.util.Collection<java.lang.Short>
      Overrides:
      isEmpty in class java.util.AbstractCollection<java.lang.Short>
    • iterator

      public ShortIterator iterator()
      Description copied from interface: ShortCollection
      Returns a type-specific iterator on the elements of this collection.
      Specified by:
      iterator in interface java.util.Collection<java.lang.Short>
      Specified by:
      iterator in interface java.lang.Iterable<java.lang.Short>
      Specified by:
      iterator in interface ShortCollection
      Specified by:
      iterator in interface ShortIterable
      Specified by:
      iterator in class AbstractShortCollection
      Returns:
      a type-specific iterator on the elements of this collection.
      See Also:
      Iterable.iterator()
    • spliterator

      public ShortSpliterator spliterator()
      Description copied from interface: ShortCollection
      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 interface java.util.Collection<java.lang.Short>
      Specified by:
      spliterator in interface java.lang.Iterable<java.lang.Short>
      Specified by:
      spliterator in interface ShortCollection
      Specified by:
      spliterator in interface ShortIterable
      Returns:
      a type-specific spliterator on the elements of this collection.
    • intIterator

      public IntIterator intIterator()
      Description copied from interface: ShortCollection
      Returns 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, and double.

      Specified by:
      intIterator in interface ShortCollection
      Specified by:
      intIterator in interface ShortIterable
      Returns:
      a widened primitive iterator on the elements of this collection.
    • intSpliterator

      public IntSpliterator intSpliterator()
      Description copied from interface: ShortCollection
      Returns 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, and double.

      Specified by:
      intSpliterator in interface ShortCollection
      Specified by:
      intSpliterator in interface ShortIterable
      Returns:
      a widened primitive spliterator on the elements of this collection.