Class CharCollections.IterableCollection

All Implemented Interfaces:
CharCollection, CharIterable, Serializable, Iterable<Character>, Collection<Character>
Enclosing class:
CharCollections

public static class CharCollections.IterableCollection extends AbstractCharCollection implements Serializable
A collection wrapper class for iterables.
See Also:
  • Method Details

    • size

      public int size()
      Specified by:
      size in interface Collection<Character>
      Specified by:
      size in class AbstractCollection<Character>
    • isEmpty

      public boolean isEmpty()
      Specified by:
      isEmpty in interface Collection<Character>
      Overrides:
      isEmpty in class AbstractCollection<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 Collection<Character>
      Specified by:
      iterator in interface Iterable<Character>
      Specified by:
      iterator in class AbstractCharCollection
      Returns:
      a type-specific iterator on the elements of this collection.
      See Also:
    • 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 Collection<Character>
      Specified by:
      spliterator in interface Iterable<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.