# Uses of Interface
java.util.function.LongConsumer

Packages that use LongConsumer
Package
Description
java.util
Contains the collections framework, some internationalization support classes, a service loader, properties, random number generation, string parsing and scanning classes, base64 encoding and decoding, a bit array, and several miscellaneous utility classes.
java.util.function
Functional interfaces provide target types for lambda expressions and method references.
java.util.stream
Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

- ## Uses of LongConsumer in java.util

  Classes in java.util that implement LongConsumer
  Modifier and Type
  Class
  Description
  `class`
  `LongSummaryStatistics`
  A state object for collecting statistics such as count, min, max, sum, and average.
  Subinterfaces with type arguments of type LongConsumer in java.util
  Modifier and Type
  Interface
  Description
  `static interface`
  `PrimitiveIterator.OfLong`
  An Iterator specialized for `long` values.
  `static interface`
  `Spliterator.OfLong`
  A Spliterator specialized for `long` values.
  Methods in java.util with parameters of type LongConsumer
  Modifier and Type
  Method
  Description
  `default void`
  PrimitiveIterator.OfLong.`forEachRemaining(LongConsumer action)`
  Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
  `void`
  OptionalLong.`ifPresent(LongConsumer action)`
  If a value is present, performs the given action with the value, otherwise does nothing.
  `void`
  OptionalLong.`ifPresentOrElse(LongConsumer action, Runnable emptyAction)`
  If a value is present, performs the given action with the value, otherwise performs the given empty-based action.

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

  Methods in java.util.function that return LongConsumer
  Modifier and Type
  Method
  Description
  `default LongConsumer`
  LongConsumer.`andThen(LongConsumer after)`
  Returns a composed `LongConsumer` that performs, in sequence, this operation followed by the `after` operation.
  Methods in java.util.function with parameters of type LongConsumer
  Modifier and Type
  Method
  Description
  `default LongConsumer`
  LongConsumer.`andThen(LongConsumer after)`
  Returns a composed `LongConsumer` that performs, in sequence, this operation followed by the `after` operation.

- ## Uses of LongConsumer in java.util.stream

  Subinterfaces of LongConsumer in java.util.stream
  Modifier and Type
  Interface
  Description
  `static interface`
  `LongStream.Builder`
  A mutable builder for a `LongStream`.
  Methods in java.util.stream with parameters of type LongConsumer
  Modifier and Type
  Method
  Description
  `void`
  LongStream.LongMapMultiConsumer.`accept(long value, LongConsumer lc)`
  Replaces the given `value` with zero or more values by feeding the mapped values to the `lc` consumer.
  `void`
  LongStream.`forEach(LongConsumer action)`
  Performs an action for each element of this stream.
  `void`
  LongStream.`forEachOrdered(LongConsumer action)`
  Performs an action for each element of this stream, guaranteeing that each element is processed in encounter order for streams that have a defined encounter order.
  `LongStream`
  LongStream.`peek(LongConsumer action)`
  Returns a stream consisting of the elements of this stream, additionally performing the provided action on each element as elements are consumed from the resulting stream.
  Method parameters in java.util.stream with type arguments of type LongConsumer
  Modifier and Type
  Method
  Description
  `default LongStream`
  Stream.`mapMultiToLong(BiConsumer<? super T, ? super LongConsumer> mapper)`
  Returns a `LongStream` consisting of the results of replacing each element of this stream with multiple elements, specifically zero or more elements.