Package com.io7m.idstore.model

# Class IdOptional

java.lang.Object
com.io7m.idstore.model.IdOptional

public final class IdOptional extends Object
Extra functions for `Optional`.

- ## Nested Class Summary

  Nested Classes
  Modifier and Type
  Class
  Description
  `static interface`
  `IdOptional.IdPartialFunctionType<A,B,E extends Exception>`
  The type of partial functions.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static <A, B, E extends Exception>
  Optional<B>`
  `flatMapPartial(Optional<A> o, IdOptional.IdPartialFunctionType<A,Optional<B>,E> f)`
  See `Optional.flatMap(Function)`.
  `static <A, B, E extends Exception>
  Optional<B>`
  `mapPartial(Optional<A> o, IdOptional.IdPartialFunctionType<A,B,E> f)`
  See `Optional.map(Function)`.

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

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

- ## Method Details

  - ### mapPartial

    public static <A, B, E extends Exception> Optional<B> mapPartial(Optional<A> o, IdOptional.IdPartialFunctionType<A,B,E> f) throws E
    See `Optional.map(Function)`.
    Type Parameters:
      `A` - The type of source values
      `B` - The type of return values
      `E` - The type of exceptions raised
    Parameters:
      `o` - The optional
      `f` - The function
    Returns:
      The value of `f`
    Throws:
      `E` - On errors

  - ### flatMapPartial

    public static <A, B, E extends Exception> Optional<B> flatMapPartial(Optional<A> o, IdOptional.IdPartialFunctionType<A,Optional<B>,E> f) throws E
    See `Optional.flatMap(Function)`.
    Type Parameters:
      `A` - The type of source values
      `B` - The type of return values
      `E` - The type of exceptions raised
    Parameters:
      `o` - The optional
      `f` - The function
    Returns:
      The value of `f`
    Throws:
      `E` - On errors