Class LongCollections.IterableCollection

    • Method Detail

      • size

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

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

        public LongIterator iterator()
        Description copied from interface: LongCollection
        Returns a type-specific iterator on the elements of this collection.
        Specified by:
        iterator in interface java.util.Collection<java.lang.Long>
        Specified by:
        iterator in interface java.lang.Iterable<java.lang.Long>
        Specified by:
        iterator in interface LongCollection
        Specified by:
        iterator in interface LongIterable
        Specified by:
        iterator in class AbstractLongCollection
        Returns:
        a type-specific iterator on the elements of this collection.
        See Also:
        Iterable.iterator()
      • spliterator

        public LongSpliterator spliterator()
        Description copied from interface: LongCollection
        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.Long>
        Specified by:
        spliterator in interface java.lang.Iterable<java.lang.Long>
        Specified by:
        spliterator in interface LongCollection
        Specified by:
        spliterator in interface LongIterable
        Returns:
        a type-specific spliterator on the elements of this collection.
      • longIterator

        public LongIterator longIterator()
        Description copied from interface: LongCollection
        Returns a primitive iterator on the elements of this collection.

        This method is identical to LongCollection.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:
        longIterator in interface LongCollection
        Specified by:
        longIterator in interface LongIterable
        Returns:
        a primitive iterator on the elements of this collection.
      • longSpliterator

        public LongSpliterator longSpliterator()
        Description copied from interface: LongCollection
        Returns a primitive spliterator on the elements of this collection.

        This method is identical to LongCollection.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:
        longSpliterator in interface LongCollection
        Specified by:
        longSpliterator in interface LongIterable
        Returns:
        a primitive spliterator on the elements of this collection.