## Uses of Class
java.lang.Long

- Packages that use Long
  Package | Description
  --- | ---
  java.lang |
  java.util |
  java.util.stream | Classes to support functional-style operations on streams of elements, such as map-reduce transformations on collections.

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

    Fields in java.lang with type parameters of type Long
    Modifier and Type | Field and Description
    --- | ---
    `static Class<Long>` | Long.`TYPE` The `Class` instance representing the primitive type `long`.

    Methods in java.lang that return Long
    Modifier and Type | Method and Description
    --- | ---
    `static Long` | Long.`decode(String nm)` Decodes a `String` into a `Long`.
    `static Long` | Long.`getLong(String nm)` Determines the `long` value of the system property with the specified name.
    `static Long` | Long.`getLong(String nm, long val)` Determines the `long` value of the system property with the specified name.
    `static Long` | Long.`getLong(String nm, Long val)` Returns the `long` value of the system property with the specified name.
    `static Long` | Long.`valueOf(long l)` Returns a `Long` instance representing the specified `long` value.
    `static Long` | Long.`valueOf(String s)` Returns a `Long` object holding the value of the specified `String`.
    `static Long` | Long.`valueOf(String s, int radix)` Returns a `Long` object holding the value extracted from the specified `String` when parsed with the radix given by the second argument.

    Methods in java.lang with parameters of type Long
    Modifier and Type | Method and Description
    --- | ---
    `int` | Long.`compareTo(Long anotherLong)` Compares two `Long` objects numerically.
    `static Long` | Long.`getLong(String nm, Long val)` Returns the `long` value of the system property with the specified name.

  - ### Uses of Long in java.util

    Methods in java.util that return Long
    Modifier and Type | Method and Description
    --- | ---
    `default Long` | PrimitiveIterator.OfLong.`next()` Returns the next element in the iteration.

    Method parameters in java.util with type arguments of type Long
    Modifier and Type | Method and Description
    --- | ---
    `default void` | Spliterator.OfLong.`forEachRemaining(Consumer<? super Long> action)` Performs the given action for each remaining element, sequentially in the current thread, until all elements have been processed or the action throws an exception.
    `default void` | PrimitiveIterator.OfLong.`forEachRemaining(Consumer<? super Long> action)` Performs the given action for each remaining element until all elements have been processed or the action throws an exception.
    `default boolean` | Spliterator.OfLong.`tryAdvance(Consumer<? super Long> action)` If a remaining element exists, performs the given action on it, returning `true`; else returns `false`.

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

    Methods in java.util.stream that return types with arguments of type Long
    Modifier and Type | Method and Description
    --- | ---
    `Stream<Long>` | LongStream.`boxed()` Returns a `Stream` consisting of the elements of this stream, each boxed to a `Long`.
    `static <T> Collector<T,?,Long>` | Collectors.`counting()` Returns a `Collector` accepting elements of type `T` that counts the number of input elements.
    `static <T> Collector<T,?,Long>` | Collectors.`summingLong(ToLongFunction<? super T> mapper)` Returns a `Collector` that produces the sum of a long-valued function applied to the input elements.

Copyright © 2025 API Design. All Rights Reserved.