## Uses of Class
java.lang.Boolean

- Packages that use Boolean
  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 Boolean in java.lang

    Fields in java.lang declared as Boolean
    Modifier and Type | Field and Description
    --- | ---
    `static Boolean` | Boolean.`FALSE` The `Boolean` object corresponding to the primitive value `false`.
    `static Boolean` | Boolean.`TRUE` The `Boolean` object corresponding to the primitive value `true`.

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

    Methods in java.lang that return Boolean
    Modifier and Type | Method and Description
    --- | ---
    `static Boolean` | Boolean.`valueOf(boolean b)` Returns a `Boolean` instance representing the specified `boolean` value.
    `static Boolean` | Boolean.`valueOf(String s)` Returns a `Boolean` with a value represented by the specified string.

    Methods in java.lang with parameters of type Boolean
    Modifier and Type | Method and Description
    --- | ---
    `int` | Boolean.`compareTo(Boolean b)` Compares this `Boolean` instance with another.

  - ### Uses of Boolean in java.util

    Method parameters in java.util with type arguments of type Boolean
    Modifier and Type | Method and Description
    --- | ---
    `static <E> Set<E>` | Collections.`newSetFromMap(Map<E,Boolean> map)` Returns a set backed by the specified map.

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

    Methods in java.util.stream that return types with arguments of type Boolean
    Modifier and Type | Method and Description
    --- | ---
    `static <T> Collector<T,?,Map<Boolean,List<T>>>` | Collectors.`partitioningBy(Predicate<? super T> predicate)` Returns a `Collector` which partitions the input elements according to a `Predicate`, and organizes them into a `Map<Boolean, List<T>>`.
    `static <T,D,A> Collector<T,?,Map<Boolean,D>>` | Collectors.`partitioningBy(Predicate<? super T> predicate, Collector<? super T,A,D> downstream)` Returns a `Collector` which partitions the input elements according to a `Predicate`, reduces the values in each partition according to another `Collector`, and organizes them into a `Map<Boolean, D>` whose values are the result of the downstream reduction.

Copyright © 2025 API Design. All Rights Reserved.