## Uses of Interface
java.util.function.Consumer

- Packages that use Consumer
  Package | Description
  --- | ---
  java.lang |
  java.util |
  java.util.function |

- - ### Uses of Consumer in java.lang

    Methods in java.lang with parameters of type Consumer
    Modifier and Type | Method and Description
    --- | ---
    `default void` | Iterable.`forEach(Consumer<? super T> action)` Performs the given action for each element of the `Iterable` until all elements have been processed or the action throws an exception.

  - ### Uses of Consumer in java.util

    Methods in java.util with parameters of type Consumer
    Modifier and Type | Method and Description
    --- | ---
    `default void` | Iterator.`forEachRemaining(Consumer<? super E> action)` Performs the given action for each remaining element until all elements have been processed or the action throws an exception.

  - ### Uses of Consumer in java.util.function

    Methods in java.util.function that return Consumer
    Modifier and Type | Method and Description
    --- | ---
    `default Consumer<T>` | Consumer.`andThen(Consumer<? super T> after)` Returns a composed `Consumer` that performs, in sequence, this operation followed by the `after` operation.

    Methods in java.util.function with parameters of type Consumer
    Modifier and Type | Method and Description
    --- | ---
    `default Consumer<T>` | Consumer.`andThen(Consumer<? super T> after)` Returns a composed `Consumer` that performs, in sequence, this operation followed by the `after` operation.

Copyright © 2025 API Design. All Rights Reserved.