@Test public void testVisitLongComparison() { assertTrue( new LongComparison(IntComparator.EQ, new LiteralLong(1L)) .accept(LongMatchExprEvaluator.instance(), new LiteralLong(1L))); assertFalse( new LongComparison(IntComparator.EQ, new LiteralLong(1L)) .accept(LongMatchExprEvaluator.instance(), new LiteralLong(2L))); }
@Override public @Nonnull Boolean visitLongComparison(LongComparison longComparison, LongExpr arg) { return longComparison .getComparator() .apply( arg.accept(LongExprEvaluator.instance(), null), longComparison.getExpr().accept(LongExprEvaluator.instance(), null)) .getBooleanValue(); }
LongMatchExprEvaluator implements LongMatchExprVisitor<Boolean, LongExpr> { @Override public @Nonnull Boolean visitLongComparison(LongComparison longComparison, LongExpr arg) { return longComparison .getComparator() .apply( arg.accept(LongExprEvaluator.instance(), null), longComparison.getExpr().accept(LongExprEvaluator.instance(), null)) .getBooleanValue(); } }
LongMatchExprEvaluator implements LongMatchExprVisitor<Boolean, LongExpr> { @Override public @Nonnull Boolean visitLongComparison(LongComparison longComparison, LongExpr arg) { return longComparison .getComparator() .apply( arg.accept(LongExprEvaluator.instance(), null), longComparison.getExpr().accept(LongExprEvaluator.instance(), null)) .getBooleanValue(); }  }
LongMatchExprEvaluator implements LongMatchExprVisitor<Boolean, LongExpr> { @Override public @Nonnull Boolean visitLongComparison(LongComparison longComparison, LongExpr arg) { return longComparison .getComparator() .apply( arg.accept(LongExprEvaluator.instance(), null), longComparison.getExpr().accept(LongExprEvaluator.instance(), null)) .getBooleanValue(); }  static @Nonnull LongMatchExprEvaluator instance(); @Override @Nonnull Boolean visitLongComparison(LongComparison longComparison, LongExpr arg); @Override @Nonnull Boolean visitLongMatchAll(LongMatchAll longMatchAll, LongExpr arg); }
LongMatchExprEvaluator implements LongMatchExprVisitor<Boolean, LongExpr> { @Override public @Nonnull Boolean visitLongComparison(LongComparison longComparison, LongExpr arg) { return longComparison .getComparator() .apply( arg.accept(LongExprEvaluator.instance(), null), longComparison.getExpr().accept(LongExprEvaluator.instance(), null)) .getBooleanValue(); }  static @Nonnull LongMatchExprEvaluator instance(); @Override @Nonnull Boolean visitLongComparison(LongComparison longComparison, LongExpr arg); @Override @Nonnull Boolean visitLongMatchAll(LongMatchAll longMatchAll, LongExpr arg);  }