return new LMinMax(Long.parseLong(args[0]), Long.parseLong(args[1]));
@Override public Object execute(Object value, CsvContext context) { Long result = (Long)super.execute(value, context); return result.intValue(); } }
/** * Constructs a new <tt>LMinMax</tt> processor, which converts the input data to a Long and and ensures the value is * between the supplied min and max values. * * @param min * the minimum value (inclusive) * @param max * the maximum value (inclusive) * @throws IllegalArgumentException * if {@code max < min} */ public LMinMax(final long min, final long max) { super(); checkPreconditions(min, max); this.min = min; this.max = max; }
validateInputNotNull(value, context);
@Override public Object execute(Object value, CsvContext context) { Long result = (Long)super.execute(value, context); return result.intValue(); } }
/** * Constructs a new <tt>LMinMax</tt> processor, which converts the input data to a Long and and ensures the value is * between the supplied min and max values, then calls the next processor in the chain. * * @param min * the minimum value (inclusive) * @param max * the maximum value (inclusive) * @param next * the next processor in the chain * @throws NullPointerException * if next is null * @throws IllegalArgumentException * if {@code max < min} */ public LMinMax(final long min, final long max, final LongCellProcessor next) { super(next); checkPreconditions(min, max); this.min = min; this.max = max; }
/** * Get a Long Min Max cellprocessor. * * @param minValue * minimum value. * @param maxValue * maximum value. * @return CellProcessor */ private static CellProcessor addLongMinMax(Long minValue, Long maxValue) { Long min = minValue == null ? LMinMax.MIN_LONG : minValue; Long max = maxValue == null ? LMinMax.MAX_LONG : maxValue; return new LMinMax(min, max); }
/** * Get a Long Min Max cellprocessor. * * @param minValue * minimum value. * @param maxValue * maximum value. * @return CellProcessor */ private static CellProcessor addLongMinMax(Long minValue, Long maxValue) { Long min = minValue == null ? LMinMax.MIN_LONG : minValue; Long max = maxValue == null ? LMinMax.MAX_LONG : maxValue; return new LMinMax(min, max); }
new LMinMax(0, 10, new FmtNumber("###", new ParseInt()))
return new LMinMax(Long.parseLong(args[0]), Long.parseLong(args[1]));