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 Details

    • size

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

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

      public IntIterator iterator()
      Description copied from interface: IntCollection
      Returns a type-specific iterator on the elements of this collection.
      Specified by:
      iterator in interface java.util.Collection<java.lang.Integer>
      Specified by:
      iterator in interface IntCollection
      Specified by:
      iterator in interface IntIterable
      Specified by:
      iterator in interface java.lang.Iterable<java.lang.Integer>
      Specified by:
      iterator in class AbstractIntCollection
      Returns:
      a type-specific iterator on the elements of this collection.
      See Also:
      Iterable.iterator()
    • spliterator

      public IntSpliterator spliterator()
      Description copied from interface: IntCollection
      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.Integer>
      Specified by:
      spliterator in interface IntCollection
      Specified by:
      spliterator in interface IntIterable
      Specified by:
      spliterator in interface java.lang.Iterable<java.lang.Integer>
      Returns:
      a type-specific spliterator on the elements of this collection.
    • intIterator

      public IntIterator intIterator()
      Description copied from interface: IntCollection
      Returns 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:
      intIterator in interface IntCollection
      Specified by:
      intIterator in interface IntIterable
      Returns:
      a primitive iterator on the elements of this collection.
    • intSpliterator

      public IntSpliterator intSpliterator()
      Description copied from interface: IntCollection
      Returns 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:
      intSpliterator in interface IntCollection
      Specified by:
      intSpliterator in interface IntIterable
      Returns:
      a primitive spliterator on the elements of this collection.