public static enum Collector.Characteristics extends Enum<Collector.Characteristics>
Collector
, which can
be used to optimize reduction implementations.Enum Constant and 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 and Description |
---|---|
static Collector.Characteristics |
valueOf(String name)
Returns the enum constant of this type with the specified name.
|
static Collector.Characteristics[] |
values()
Returns an array containing the constants of this enum type, 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()
for (Collector.Characteristics c : Collector.Characteristics.values()) System.out.println(c);
public static Collector.Characteristics valueOf(String name)
name
- the name of the enum constant to be returned.IllegalArgumentException
- if this enum type has no constant with the specified nameNullPointerException
- if the argument is null Submit a bug or feature
For further API reference and developer documentation, see Java SE Documentation. That documentation contains more detailed, developer-targeted descriptions, with conceptual overviews, definitions of terms, workarounds, and working code examples.
Copyright © 1993, 2024, Oracle and/or its affiliates. All rights reserved. Use is subject to license terms. Also see the documentation redistribution policy.