Class CharCollections.IterableCollection

java.lang.Object
java.util.AbstractCollection<java.lang.Character>
it.unimi.dsi.fastutil.chars.AbstractCharCollection
it.unimi.dsi.fastutil.chars.CharCollections.IterableCollection
All Implemented Interfaces:
CharCollection, CharIterable, java.io.Serializable, java.lang.Iterable<java.lang.Character>, java.util.Collection<java.lang.Character>
Enclosing class:
CharCollections

public static class CharCollections.IterableCollection
extends AbstractCharCollection
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.Character>
      Specified by:
      size in class java.util.AbstractCollection<java.lang.Character>
    • isEmpty

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

      public CharIterator iterator()
      Description copied from interface: CharCollection
      Returns a type-specific iterator on the elements of this collection.
      Specified by:
      iterator in interface CharCollection
      Specified by:
      iterator in interface CharIterable
      Specified by:
      iterator in interface java.util.Collection<java.lang.Character>
      Specified by:
      iterator in interface java.lang.Iterable<java.lang.Character>
      Specified by:
      iterator in class AbstractCharCollection
      Returns:
      a type-specific iterator on the elements of this collection.
      See Also:
      Iterable.iterator()
    • spliterator

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

      public IntIterator intIterator()
      Description copied from interface: CharCollection
      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.

      WARNING: This is not the same as converting the source to a sequence of code points. This returned instance literally performs (int)(charValue) casts. Surrogate pairs will be left as separate elements instead of combined into a single element with the code point it represents. See Character for more discussion on code points, char values, and surrogate pairs.

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

      public IntSpliterator intSpliterator()
      Description copied from interface: CharCollection
      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.

      WARNING: This is not the same as converting the source to a sequence of code points. This returned instance literally performs (int)(charValue) casts. Surrogate pairs will be left as separate elements instead of combined into a single element with the code point it represents. See Character for more discussion on code points, char values, and surrogate pairs.

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