Class OneOfN.None

java.lang.Object
de.xima.fc.api.rest.pub.client.user.OneOfN
de.xima.fc.api.rest.pub.client.user.OneOfN.None
Enclosing class:
OneOfN

public static final class OneOfN.None extends OneOfN
Emulates a sum type consisting of 0 cases.
  • Method Details

    • getValue

      public Void getValue()
      Description copied from class: OneOfN
      Checks which case applies and returns the value for that case. You need to cast it yourself to the required type.
      Overrides:
      getValue in class OneOfN
      Returns:
      The value of this sum type.
    • instance

      public static OneOfN.None instance()
      Returns:
      The single instance of this bottom type.
    • match

      public <R> R match()
      Performs a case match on this sum type by invoking the mapping function for the matching case with the value of this sum type and returning the result.
      Type Parameters:
      R - Type of the result returned by each mapping function.
      Returns:
      The value returned by the mapping function for the matching case.
    • match

      public <R> R match(R defaultValue, OneOfN.NoneMatcher<R> matcher)
      Performs a case match on this sum type by invoking the mapping function for the matching case with the value of this sum type and returning the result.
      Type Parameters:
      R - Type of the result returned by each mapping function.
      Parameters:
      defaultValue - Value returned when the given matcher has no matching case.
      matcher - Matcher object for each case.
      Returns:
      The value returned by the mapping function for the matching case.