Skip to content

Interface Expr

Javadoc 27 generates this reference during each site build from the exported packages and the annotation processor. The Java guide shows the API in use.

All Known Subinterfaces:
DynExpr, FloatExpr, IntegralExpr, IntExpr, NumericExpr, NumExpr, StringExpr, TextualExpr
All Known Implementing Classes:
DynField, FloatField, IntField, NumField, StringField
public sealed interface Expr permits NumericExpr, TextualExpr
An Iris expression. Methods build larger expressions: x.plus(1).le(y) is x + 1 <= y. The Java type of an expression is its Iris value type, so that a method takes only the operands Iris accepts; dynamic() gives an expression that every method takes, for a value whose type is open.

A handle is an expression of its own type. In a pattern, a statement or a comprehension body it stands for the current value of its name.

  • Method Summary

    Modifier and Type
    Method
    Description
    default DynExpr
    Returns this expression with no static type, which every method accepts.
    default DynExpr
    get(DynField field)
    Returns this.name, the field of the record this selects.
    default FloatExpr
    get(FloatField<?> field)
    Returns this.name, the field of the record this selects.
    default IntExpr
    get(IntField<?> field)
    Returns this.name, the field of the record this selects.
    default NumExpr
    get(NumField<?> field)
    Returns this.name, the field of the record this selects.
    default StringExpr
    get(StringField<?> field)
    Returns this.name, the field of the record this selects.
  • Method Details

    • dynamic

      default DynExpr dynamic()
      Returns this expression with no static type, which every method accepts.
      Returns:
      this expression with no static type, which every method accepts
    • get

      default IntExpr get(IntField<?> field)
      Returns this.name, the field of the record this selects.
      Parameters:
      field - the handle of the field
      Returns:
      this.name, the field of the record this selects
    • get

      default FloatExpr get(FloatField<?> field)
      Returns this.name, the field of the record this selects.
      Parameters:
      field - the handle of the field
      Returns:
      this.name, the field of the record this selects
    • get

      default NumExpr get(NumField<?> field)
      Returns this.name, the field of the record this selects.
      Parameters:
      field - the handle of the field
      Returns:
      this.name, the field of the record this selects
    • get

      default StringExpr get(StringField<?> field)
      Returns this.name, the field of the record this selects.
      Parameters:
      field - the handle of the field
      Returns:
      this.name, the field of the record this selects
    • get

      default DynExpr get(DynField field)
      Returns this.name, the field of the record this selects.
      Parameters:
      field - the handle of the field
      Returns:
      this.name, the field of the record this selects