Spec-Zone .ru
спецификации, руководства, описания, API
|
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.
|
STRICTLY_MUTATIVE
Indicates that this collector operates by strict mutation of its
result container.
|
UNORDERED
Indicates that the result container has no intrinsic order, such as
a
Set . |
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
STRICTLY_MUTATIVE
characteristic.
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 STRICTLY_MUTATIVE
Collector.accumulator()
and
Collector.combiner()
functions will always modify the state of and
return their first argument, rather than returning a different result
container.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
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, 2013, Oracle and/or its affiliates. All rights reserved.
DRAFT ea-b92