@Test public void testevalExpression_double() { ValueFilterInequality vfi = new ValueFilterInequality(); assertEquals(false, vfi.evalExpressionD("lasfdt", 100.2, 200.5)); assertEquals(false, vfi.evalExpressionD("gteq", 5.34, 10.24)); assertEquals(true, vfi.evalExpressionD("gteq", 10.05, 5.34)); assertEquals(true, vfi.evalExpressionD("gt", 10, 5)); assertEquals(true, vfi.evalExpressionD("lt", 100.344, 100.355)); assertEquals(true, vfi.evalExpressionD("lteq", 7, 7)); assertEquals(false, vfi.evalExpressionD("eq", 100, 101)); assertEquals(true, vfi.evalExpressionD("eq", 137, 137)); }
protected boolean evalExpressionD(String op, double val, double rh) { if (op.equals("gteq")) { return val >= rh; } else if (op.equals("lteq")) { return val <= rh; } else if (op.equals("lt")) { return val < rh; } else if (op.equals("gt")) { return val > rh; } else if (op.equals("eq")) { return val == rh; } return false; }
ValueFilterInequality extends AbstractValueFilter { protected boolean evalExpressionD(String op, double val, double rh) { if (op.equals("gteq")) { return val >= rh; } else if (op.equals("lteq")) { return val <= rh; } else if (op.equals("lt")) { return val < rh; } else if (op.equals("gt")) { return val > rh; } else if (op.equals("eq")) { return val == rh; } return false; } }
ValueFilterInequality extends AbstractValueFilter { protected boolean evalExpressionD(String op, double val, double rh) { if (op.equals("gteq")) { return val >= rh; } else if (op.equals("lteq")) { return val <= rh; } else if (op.equals("lt")) { return val < rh; } else if (op.equals("gt")) { return val > rh; } else if (op.equals("eq")) { return val == rh; } return false; } ValueFilterInequality();  ValueFilterInequality(String iop, Long rh); }
ValueFilterInequality extends AbstractValueFilter { protected boolean evalExpressionD(String op, double val, double rh) { if (op.equals("gteq")) { return val >= rh; } else if (op.equals("lteq")) { return val <= rh; } else if (op.equals("lt")) { return val < rh; } else if (op.equals("gt")) { return val > rh; } else if (op.equals("eq")) { return val == rh; } return false; } ValueFilterInequality();  ValueFilterInequality(String iop, Long rh); @Override ValueObject filterValue(ValueObject value); }
ValueFilterInequality extends AbstractValueFilter { protected boolean evalExpressionD(String op, double val, double rh) { if (op.equals("gteq")) { return val >= rh; } else if (op.equals("lteq")) { return val <= rh; } else if (op.equals("lt")) { return val < rh; } else if (op.equals("gt")) { return val > rh; } else if (op.equals("eq")) { return val == rh; } return false; } ValueFilterInequality();  ValueFilterInequality(String iop, Long rh); @Override ValueObject filterValue(ValueObject value);  }