Interface IntOrderedIterable

All Known Implementing Classes:
IntRangeSet

public interface IntOrderedIterable
API for a collection that supports ordered iteration over int values.
Since:
1.58
Version:
1.0
Author:
matt
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    forEachOrdered(int min, int max, IntConsumer action)
    Iterate over a range of values in this collection.
    void
    Iterate over all primitive values in this collection.
  • Method Details

    • forEachOrdered

      void forEachOrdered(IntConsumer action)
      Iterate over all primitive values in this collection.

      This method of iteration can be more efficient than iterating via the Iterator API because no unboxing of primitives is necessary.

      Parameters:
      action - the consumer to handle the values
    • forEachOrdered

      void forEachOrdered(int min, int max, IntConsumer action)
      Iterate over a range of values in this collection.

      This method of iteration can be more efficient than iterating via the Iterator API because no unboxing of primitives is necessary.

      Parameters:
      min - the minimum key value (inclusive)
      max - the maximum key value (exclusive)
      action - the consumer to handle the values