@Test public void testVisitIntComparison() { assertTrue( new IntComparison(IntComparator.EQ, new LiteralInt(1)) .accept(IntMatchExprEvaluator.instance(), new LiteralInt(1))); assertFalse( new IntComparison(IntComparator.EQ, new LiteralInt(1)) .accept(IntMatchExprEvaluator.instance(), new LiteralInt(2))); }
@Override public @Nonnull Boolean visitIntComparison(IntComparison intComparison, IntExpr arg) { return intComparison .getComparator() .apply( arg.accept(IntExprEvaluator.instance(), null), intComparison.getExpr().accept(IntExprEvaluator.instance(), null)) .getBooleanValue(); }
IntMatchExprEvaluator implements IntMatchExprVisitor<Boolean, IntExpr> { @Override public @Nonnull Boolean visitIntComparison(IntComparison intComparison, IntExpr arg) { return intComparison .getComparator() .apply( arg.accept(IntExprEvaluator.instance(), null), intComparison.getExpr().accept(IntExprEvaluator.instance(), null)) .getBooleanValue(); } }
IntMatchExprEvaluator implements IntMatchExprVisitor<Boolean, IntExpr> { @Override public @Nonnull Boolean visitIntComparison(IntComparison intComparison, IntExpr arg) { return intComparison .getComparator() .apply( arg.accept(IntExprEvaluator.instance(), null), intComparison.getExpr().accept(IntExprEvaluator.instance(), null)) .getBooleanValue(); }  }
IntMatchExprEvaluator implements IntMatchExprVisitor<Boolean, IntExpr> { @Override public @Nonnull Boolean visitIntComparison(IntComparison intComparison, IntExpr arg) { return intComparison .getComparator() .apply( arg.accept(IntExprEvaluator.instance(), null), intComparison.getExpr().accept(IntExprEvaluator.instance(), null)) .getBooleanValue(); }  static @Nonnull IntMatchExprEvaluator instance(); @Override @Nonnull Boolean visitIntComparison(IntComparison intComparison, IntExpr arg); @Override @Nonnull Boolean visitIntMatchAll(IntMatchAll intMatchAll, IntExpr arg); }
IntMatchExprEvaluator implements IntMatchExprVisitor<Boolean, IntExpr> { @Override public @Nonnull Boolean visitIntComparison(IntComparison intComparison, IntExpr arg) { return intComparison .getComparator() .apply( arg.accept(IntExprEvaluator.instance(), null), intComparison.getExpr().accept(IntExprEvaluator.instance(), null)) .getBooleanValue(); }  static @Nonnull IntMatchExprEvaluator instance(); @Override @Nonnull Boolean visitIntComparison(IntComparison intComparison, IntExpr arg); @Override @Nonnull Boolean visitIntMatchAll(IntMatchAll intMatchAll, IntExpr arg);  }