Interface Just<T>

Type Parameters:
T - the content of the result.
All Superinterfaces:
OpResult<T>
All Known Implementing Classes:
BinVal, NumVal, StrVal

public non-sealed interface Just<T> extends OpResult<T>
Success resut.
  • Method Summary

    Modifier and Type
    Method
    Description
    Returns the result of the operation.
    default T
    Returns the success value, or null if this is an error.
    static <T> Just<T>
    of(T value)
    Creates a Just containing the given value.
  • Method Details

    • just

      T just()
      Returns the result of the operation.
      Returns:
      the result of the operation.
    • of

      static <T> Just<T> of(T value)
      Creates a Just containing the given value.
      Type Parameters:
      T - the type of the value.
      Parameters:
      value - the value to contain.
      Returns:
      a Just containing the value.
    • justOrNull

      default T justOrNull()
      Description copied from interface: OpResult
      Returns the success value, or null if this is an error.
      Specified by:
      justOrNull in interface OpResult<T>
      Returns:
      the success value, or null if this is an error.