public final class DistributedFunctions extends Object
Modifier and Type | Field and Description |
---|---|
static String |
CONSTANT_KEY
The string key returned by
constantKey() . |
Modifier and Type | Method and Description |
---|---|
static <T> DistributedPredicate<T> |
alwaysFalse()
Return sa predicate that always evaluates to
false . |
static <T> DistributedPredicate<T> |
alwaysTrue()
Returns a predicate that always evaluates to
true . |
static <T> DistributedFunction<T,String> |
constantKey()
Returns a function that always evaluates to the
CONSTANT_KEY . |
static <K,V> DistributedFunction<Map.Entry<K,V>,K> |
entryKey()
Returns a function that extracts the key of a
Map.Entry . |
static <K,V> DistributedFunction<Map.Entry<K,V>,V> |
entryValue()
Returns a function that extracts the value of a
Map.Entry . |
static <T> DistributedConsumer<T> |
noopConsumer()
Returns a consumer that does nothing with the argument.
|
static <T> DistributedFunction<T,T> |
wholeItem()
Synonym for
DistributedFunction.identity() , to be used as a
projection function (e.g., key extractor). |
public static final String CONSTANT_KEY
constantKey()
.@Nonnull public static <T> DistributedFunction<T,T> wholeItem()
DistributedFunction.identity()
, to be used as a
projection function (e.g., key extractor).@Nonnull public static <K,V> DistributedFunction<Map.Entry<K,V>,K> entryKey()
Map.Entry
.K
- type of entry's key@Nonnull public static <K,V> DistributedFunction<Map.Entry<K,V>,V> entryValue()
Map.Entry
.V
- type of entry's value@Nonnull public static <T> DistributedFunction<T,String> constantKey()
CONSTANT_KEY
.
This is useful as a key extractor in group-by operations where no
classification by key is desired.@Nonnull public static <T> DistributedConsumer<T> noopConsumer()
@Nonnull public static <T> DistributedPredicate<T> alwaysTrue()
true
.@Nonnull public static <T> DistributedPredicate<T> alwaysFalse()
false
.Copyright © 2018 Hazelcast, Inc.. All rights reserved.