com.hazelcast.jet.function

## Class DistributedFunctions

- java.lang.Object
- - com.hazelcast.jet.function.DistributedFunctions

-     public final class DistributedFunctions
      extends Object

  Factory methods for several common distributed functions.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CONSTANT_KEY` The string key returned by `constantKey()`.

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `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> DistributedFunction<T,T>` | `wholeItem()` Synonym for `DistributedFunction.identity()`, to be used as a projection function (e.g., key extractor).

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### CONSTANT_KEY

          public static final String CONSTANT_KEY

      The string key returned by `constantKey()`.
      See Also:
        Constant Field Values

  - ### Method Detail

    - #### wholeItem

          @Nonnull
          public static <T> DistributedFunction<T,T> wholeItem()

      Synonym for `DistributedFunction.identity()`, to be used as a projection function (e.g., key extractor).

    - #### entryKey

          @Nonnull
          public static <K,V> DistributedFunction<Map.Entry<K,V>,K> entryKey()

      Returns a function that extracts the key of a `Map.Entry`.
      Type Parameters:
        `K` - type of entry's key

    - #### entryValue

          @Nonnull
          public static <K,V> DistributedFunction<Map.Entry<K,V>,V> entryValue()

      Returns a function that extracts the value of a `Map.Entry`.
      Type Parameters:
        `V` - type of entry's value

    - #### constantKey

          @Nonnull
          public static <T> DistributedFunction<T,String> constantKey()

      Returns a function that always evaluates to the `CONSTANT_KEY`. This is useful as a key extractor in group-by operations where no classification by key is desired.

Copyright © 2018. All rights reserved.