Interface Value

All Superinterfaces:
Expr
All Known Implementing Classes:
Num

sealed interface Value extends Expr permits Num
Abstract class Value - The type of all Expressions which self-evaluate: Numbers, and (later, in H3) functions.
  • Field Summary

    Fields inherited from interface Expr

    PUNCTUATION
  • Method Summary

    Modifier and Type
    Method
    Description
    default Value
    Evaluate a given Expr.

    Methods inherited from interface Expr

    toString
  • Method Details

    • eval

      default Value eval()
      Description copied from interface: Expr
      Evaluate a given Expr.
      Specified by:
      eval in interface Expr
      Returns:
      the Value this Expr evaluates to. (In H0, all values are numbers (doubles), but in H3 that will change, which is why we have pre-emptively made the return type 'Value'.)