Logic (Java Application API for IBM Streams)
Date: 2020-08-07

com.ibm.streamsx.topology.logic

## Class Logic

- java.lang.Object
- - com.ibm.streamsx.topology.logic.Logic

-     public class Logic
      extends java.lang.Object

- - ### Constructor Summary

    Constructors
    Constructor and Description
    `Logic()`

  - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `static <T,U,R> BiFunction<T,java.util.List<U>,R>` | `first(BiFunction<T,U,R> logic)` Wrap a `BiFunction` instance that operators on a single value for the second parameter (type `U`) as a `BiFunction` that takes an `List`.
    `static <T> UnaryOperator<T>` | `identity()`
    `static <T> Function<T,java.lang.Object>` | `notKeyed()`

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

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

- - ### Constructor Detail

    - #### Logic

          public Logic()

  - ### Method Detail

    - #### identity

          public static <T> UnaryOperator<T> identity()

    - #### notKeyed

          public static <T> Function<T,java.lang.Object> notKeyed()

    - #### first

          public static <T,U,R> BiFunction<T,java.util.List<U>,R> first(BiFunction<T,U,R> logic)

      Wrap a `BiFunction` instance that operators on a single value for the second parameter (type `U`) as a `BiFunction` that takes an `List`. Only the first value from the list will be passed to to `logic`. If the list is empty, then `null` is passed.
      Parameters:
        `logic` - Logic to be called.
      Returns:
        Wrapper `Function2` that accepts an `List` of type `U` and passes the first value or `null` to `logic`.