Package liqp.nodes

Class ComparingExpressionNode

java.lang.Object
liqp.LValue
liqp.nodes.ComparingExpressionNode
All Implemented Interfaces:
LNode
Direct Known Subclasses:
EqNode, GtEqNode, GtNode, LtEqNode, LtNode, NEqNode

public abstract class ComparingExpressionNode extends LValue implements LNode
  • Field Details

    • lhs

      protected final LNode lhs
    • rhs

      protected final LNode rhs
  • Constructor Details

    • ComparingExpressionNode

      public ComparingExpressionNode(LNode lhs, LNode rhs, boolean relative)
      Parameters:
      lhs - - left-hand side
      rhs - - right-hand side
      relative - - expressions are two kinds: relative(>, >=, <, <=) and equality (==, <>, !=) and rules for comparing them different.
  • Method Details

    • render

      public Object render(TemplateContext context)
      Description copied from interface: LNode
      Renders this AST.
      Specified by:
      render in interface LNode
      Parameters:
      context - the context (variables) with which this node should be rendered.
      Returns:
      an Object denoting the rendered AST.
    • relativeCompareCommonRules

      protected Optional<Object> relativeCompareCommonRules(Object a, Object b, boolean strictTypedExpressions)