Class Max


public class Max extends PrimitiveFunction
Returns the maximum of two values.
  • Constructor Details

    • Max

      public Max()
  • Method Details

    • name

      public Name name()
      Description copied from class: PrimitiveFunction
      The unique name of the primitive function.
      Specified by:
      name in class PrimitiveFunction
      Returns:
      the name of this primitive function
    • type

      public TypeScheme type()
      Description copied from class: PrimitiveFunction
      The datatype of the primitive function.
      Specified by:
      type in class PrimitiveFunction
      Returns:
      the type scheme of this primitive function
    • implementation

      protected Function<List<Term>,Flow<Graph,Term>> implementation()
      Description copied from class: PrimitiveFunction
      A dynamic/interpreted implementation of the function.
      Specified by:
      implementation in class PrimitiveFunction
      Returns:
      the function implementation
    • apply

      public static <A> Function<A,A> apply(A left)
      Returns the maximum of two values.
      Type Parameters:
      A - the comparable type
      Parameters:
      left - the first value
      Returns:
      a function that takes the second value and returns the maximum
    • apply

      public static <A> A apply(A left, A right)
      Returns the maximum of two values.
      Type Parameters:
      A - the comparable type
      Parameters:
      left - the first value
      right - the second value
      Returns:
      the maximum of the two values