/** * Constructs parser with initial <code>proxyValues</code>. * * @param proxyValues Map containing proxy values by name. */ public ValueExpressionParser(Map<String, ValueProxy<?>> proxyValues) { this.proxyValues = proxyValues; this.rangeValueFactory = new RangeValueFactory(); this.circularRangeValueFactory = new CircularRangeValueFactory(); }
throw new RuntimeException("Increment cannot be null."); if (isType(Double.class, range) && increment instanceof Double) { return new CircularRangeValueDouble((Range<Double>) range, increment.doubleValue()); if (isType(Float.class, range) && increment instanceof Float) { return new CircularRangeValueFloat((Range<Float>) range, increment.floatValue()); if (isType(Long.class, range) && increment instanceof Long) { return new CircularRangeValueLong((Range<Long>) range, increment.longValue()); if (isType(Integer.class, range) && increment instanceof Integer) { return new CircularRangeValueInt((Range<Integer>) range, increment.intValue()); if (isType(Short.class, range) && increment instanceof Short) { return new CircularRangeValueShort((Range<Short>) range, increment.shortValue()); if (isType(Byte.class, range) && increment instanceof Byte) { return new CircularRangeValueByte((Range<Byte>) range, increment.byteValue());
/** * Circular range value definition. * * @return Circular range value definition rule. */ @SuppressWarnings({ "rawtypes" }) public Rule circularRangeValue() { return Sequence(function("circular", Sequence(numberRange(), comma(), numberLiteral())), push(circularRangeValueFactory.create((Range) pop(1), (Number) pop()))); }
/** * Circular range value definition. * * @return Circular range value definition rule. */ @SuppressWarnings({ "rawtypes" }) public Rule circularRangeValue() { return Sequence(function("circular", Sequence(numberRange(), comma(), numberLiteral())), push(circularRangeValueFactory.create((Range) pop(1), (Number) pop()))); }
/** * Constructs parser with initial <code>proxyValues</code>. * * @param proxyValues Map containing proxy values by name. */ public ValueExpressionParser(Map<String, ValueProxy<?>> proxyValues) { this.proxyValues = proxyValues; this.rangeValueFactory = new RangeValueFactory(); this.circularRangeValueFactory = new CircularRangeValueFactory(); }
throw new RuntimeException("Increment cannot be null."); if (isType(Double.class, range) && increment instanceof Double) { return new CircularRangeValueDouble((Range<Double>) range, increment.doubleValue()); if (isType(Float.class, range) && increment instanceof Float) { return new CircularRangeValueFloat((Range<Float>) range, increment.floatValue()); if (isType(Long.class, range) && increment instanceof Long) { return new CircularRangeValueLong((Range<Long>) range, increment.longValue()); if (isType(Integer.class, range) && increment instanceof Integer) { return new CircularRangeValueInt((Range<Integer>) range, increment.intValue()); if (isType(Short.class, range) && increment instanceof Short) { return new CircularRangeValueShort((Range<Short>) range, increment.shortValue()); if (isType(Byte.class, range) && increment instanceof Byte) { return new CircularRangeValueByte((Range<Byte>) range, increment.byteValue());