Schnittstelle ShortIterator

Alle Superschnittstellen:
Iterator<Short>
Alle bekannten Unterschnittstellen:
ShortBidirectionalIterator, ShortListIterator, ShortSplititerator

public interface ShortIterator extends Iterator<Short>
A Type-Specific Iterator that reduces (un)boxing
  • Methodenübersicht

    Modifizierer und Typ
    Methode
    Beschreibung
    default <E> void
    Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
    default void
    forEachRemaining(Consumer<? super Short> action)
    Veraltet.
    Please use the corresponding type-specific function instead.
    default void
    Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
    default Short
    Veraltet.
    Please use the corresponding type-specific function instead.
    short
    Returns the next element in the iteration.
    default int
    skip(int amount)
    Skips the Given amount of elements if possible.

    Von Schnittstelle geerbte Methoden java.util.Iterator

    hasNext, remove
  • Methodendetails

    • nextShort

      short nextShort()
      Returns the next element in the iteration.
      Gibt zurück:
      the next element in the iteration
      Löst aus:
      NoSuchElementException - if the iteration has no more elements
      Siehe auch:
    • next

      @Deprecated default Short next()
      Veraltet.
      Please use the corresponding type-specific function instead.

      This default implementation delegates to the corresponding type-specific function.

      Angegeben von:
      next in Schnittstelle Iterator<Short>
    • forEachRemaining

      default void forEachRemaining(ShortConsumer action)
      Performs the given action for each remaining element until all elements have been processed or the action throws an exception. Actions are performed in the order of iteration, if that order is specified. Exceptions thrown by the action are relayed to the caller.
      Parameter:
      action - The action to be performed for each element
      Löst aus:
      NullPointerException - if the specified action is null
      Siehe auch:
      ImplSpec:

      The default implementation behaves as if:

      
      	while (hasNext()) action.accept(nextShort());
       
    • forEachRemaining

      @Deprecated default void forEachRemaining(Consumer<? super Short> action)
      Veraltet.
      Please use the corresponding type-specific function instead.

      This default implementation delegates to the corresponding type-specific function.

      Angegeben von:
      forEachRemaining in Schnittstelle Iterator<Short>
    • forEachRemaining

      default <E> void forEachRemaining(E input, ObjectShortConsumer<E> action)
      Helper function to reduce Lambda usage and allow for more method references, since these are faster/cleaner.
      Typparameter:
      E - the generic type of the Object
      Parameter:
      input - the object that should be included
      action - The action to be performed for each element
      Löst aus:
      NullPointerException - if the specified action is null
    • skip

      default int skip(int amount)
      Skips the Given amount of elements if possible. A Optimization function to skip elements faster if the implementation allows it.
      Parameter:
      amount - the amount of elements that should be skipped
      Gibt zurück:
      the amount of elements that were skipped