Class ExpressionLet

java.lang.Object
org.openhab.core.voice.text.Expression
org.openhab.core.voice.text.ExpressionLet

public final class ExpressionLet extends Expression
Expression that decorates the resulting (proxied) AST node of a given expression by a name, value and tag. This class is immutable.
Author:
Tilman Kamp - Initial contribution
  • Constructor Details

    • ExpressionLet

      public ExpressionLet(String name, Expression subExpression)
      Constructs a new instance.
      Parameters:
      name - the name that should be set on the node. Null, if the node's name should not be changed.
      subExpression - the expression who's resulting node should be altered
    • ExpressionLet

      public ExpressionLet(Expression subExpression, Object value)
      Constructs a new instance.
      Parameters:
      subExpression - the expression who's resulting node should be altered
      value - the value that should be set on the node. Null, if the node's value should not be changed.
    • ExpressionLet

      public ExpressionLet(String name, Expression subExpression, Object value, Object tag)
      Constructs a new instance.
      Parameters:
      name - the name that should be set on the node. Null, if the node's name should not be changed.
      subExpression - the expression who's resulting node should be altered
      value - the value that should be set on the node. Null, if the node's value should not be changed.
      tag - the tag that should be set on the node. Null, if the node's tag should not be changed.
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • getSubExpression

      public Expression getSubExpression()
      Returns:
      the subExpression
    • getName

      public String getName()
      Returns:
      the name
    • getValue

      public Object getValue()
      Returns:
      the value
    • getTag

      public Object getTag()
      Returns:
      the tag