Package org.multiverse.api.functions

## Class Functions

- java.lang.Object
- - org.multiverse.api.functions.Functions

-     public final class Functions
      extends Object

  A utility class for `Function` functionality.

- - ### Method Summary

    All Methods Static Methods Concrete Methods
    Modifier and Type | Method | Description
    --- | --- | ---
    `static IntFunction` | `decIntFunction()` | Returns an `IntFunction` that decrements the input value by one.
    `static LongFunction` | `decLongFunction()` | Returns a `LongFunction` that decrements the input value by one.
    `static BooleanFunction` | `identityBooleanFunction()` | Returns a `BooleanFunction` that returns the argument.
    `static DoubleFunction` | `identityDoubleFunction()` | Returns an `DoubleFunction` that returns its input.
    `static Function` | `identityFunction()` | Returns an `Function` that returns its input.
    `static IntFunction` | `identityIntFunction()` | Returns an identity `IntFunction` (a function that returns its input value).
    `static LongFunction` | `identityLongFunction()` | Returns an identity `LongFunction` (a function that returns its input value).
    `static DoubleFunction` | `incDoubleFunction()` | Returns a `DoubleFunction` that increments the input with one.
    `static IntFunction` | `incIntFunction()` | Returns an `IntFunction` that increments the input value by one.
    `static IntFunction` | `incIntFunction​(int amount)` | Returns a `IntFunction` that increments with the given amount.
    `static LongFunction` | `incLongFunction()` | Returns a `LongFunction` that increments the input value by one.
    `static LongFunction` | `incLongFunction​(long amount)` | Returns a `LongFunction` that increments with the given amount.
    `static BooleanFunction` | `inverseBooleanFunction()` | Returns a `BooleanFunction` that inverts the argument.

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

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

- - ### Method Detail

    - #### identityFunction

          public static Function identityFunction()

      Returns an `Function` that returns its input.
      Returns:
        the identity function.

    - #### identityDoubleFunction

          public static DoubleFunction identityDoubleFunction()

      Returns an `DoubleFunction` that returns its input.
      Returns:
        the identity function.

    - #### incDoubleFunction

          public static DoubleFunction incDoubleFunction()

      Returns a `DoubleFunction` that increments the input with one.
      Returns:
        the increment function.

    - #### identityIntFunction

          public static IntFunction identityIntFunction()

      Returns an identity `IntFunction` (a function that returns its input value). The instance is cached.
      Returns:
        the identity IntFunction.

    - #### identityLongFunction

          public static LongFunction identityLongFunction()

      Returns an identity `LongFunction` (a function that returns its input value). The instance is cached.
      Returns:
        the identity LongFunction.

    - #### incIntFunction

          public static IntFunction incIntFunction()

      Returns an `IntFunction` that increments the input value by one. The instance is cached.
      Returns:
        the increment IntFunction.

    - #### decIntFunction

          public static IntFunction decIntFunction()

      Returns an `IntFunction` that decrements the input value by one. The instance is cached.
      Returns:
        the decrease IntFunction.

    - #### incLongFunction

          public static LongFunction incLongFunction()

      Returns a `LongFunction` that increments the input value by one. The instance is cached.
      Returns:
        the increment LongFunction.

    - #### decLongFunction

          public static LongFunction decLongFunction()

      Returns a `LongFunction` that decrements the input value by one. The instance is cached.
      Returns:
        the decrement LongFunction.

    - #### incIntFunction

          public static IntFunction incIntFunction​(int amount)

      Returns a `IntFunction` that increments with the given amount. For the -1, 0 and 1 a cached instance is returned. In the other cases a new instance is created.
      Parameters:
        `amount` - the value to increment with. A negative value does a decrement.
      Returns:
        the increment IntFunction.

    - #### inverseBooleanFunction

          public static BooleanFunction inverseBooleanFunction()

      Returns a `BooleanFunction` that inverts the argument.
      Returns:
        the function

    - #### identityBooleanFunction

          public static BooleanFunction identityBooleanFunction()

      Returns a `BooleanFunction` that returns the argument.
      Returns:
        the function.

    - #### incLongFunction

          public static LongFunction incLongFunction​(long amount)

      Returns a `LongFunction` that increments with the given amount. For the -1, 0 and 1 a cached instance is returned. In the other cases a new instance is created.
      Parameters:
        `amount` - the value to increment with. A negative value does a decrement.
      Returns:
        the increment LongFunction.