Serializable
, Comparable<Collector.Characteristics>
, Constable
public static enum Collector.Characteristics extends Enum<Collector.Characteristics>
Collector
, which can be used to optimize reduction implementations.Enum.EnumDesc<E extends Enum<E>>
Enum Constant | Description |
---|---|
CONCURRENT |
Indicates that this collector is concurrent, meaning that the result container can support the accumulator function being called concurrently with the same result container from multiple threads. |
IDENTITY_FINISH |
Indicates that the finisher function is the identity function and can be elided. |
UNORDERED |
Indicates that the collection operation does not commit to preserving the encounter order of input elements. |
Modifier and Type | Method | Description |
---|---|---|
static Collector.Characteristics |
valueOf |
Returns the enum constant of this class with the specified name. |
static Collector.Characteristics[] |
values() |
Returns an array containing the constants of this enum class, in the order they are declared. |
public static final Collector.Characteristics CONCURRENT
If a CONCURRENT
collector is not also UNORDERED
, then it should only be evaluated concurrently if applied to an unordered data source.
public static final Collector.Characteristics UNORDERED
Set
.)public static final Collector.Characteristics IDENTITY_FINISH
public static Collector.Characteristics[] values()
public static Collector.Characteristics valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum class has no constant with the specified nameNullPointerException
- if the argument is null
© 1993, 2023, Oracle and/or its affiliates. All rights reserved.
Documentation extracted from Debian's OpenJDK Development Kit package.
Licensed under the GNU General Public License, version 2, with the Classpath Exception.
Various third party code in OpenJDK is licensed under different licenses (see Debian package).
Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/util/stream/Collector.Characteristics.html