@Test(expected = SuperCsvConstraintViolationException.class) public void testLessThanMin() { String input = "12"; processor.execute(input, ANONYMOUS_CSVCONTEXT); }
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); final int length = stringValue.length(); if( length < min || length > max ) { throw new SuperCsvConstraintViolationException(String.format( "the length (%d) of value '%s' does not lie between the min (%d) and max (%d) values (inclusive)", length, stringValue, min, max), context, this); } return next.execute(stringValue, context); }
StrMinMax extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); final int length = stringValue.length(); if( length < min || length > max ) { throw new SuperCsvConstraintViolationException(String.format( "the length (%d) of value '%s' does not lie between the min (%d) and max (%d) values (inclusive)", length, stringValue, min, max), context, this); } return next.execute(stringValue, context); } }
StrMinMax extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); final int length = stringValue.length(); if( length < min || length > max ) { throw new SuperCsvConstraintViolationException(String.format( "the length (%d) of value '%s' does not lie between the min (%d) and max (%d) values (inclusive)", length, stringValue, min, max), context, this); } return next.execute(stringValue, context); } StrMinMax(final long min, final long max);  StrMinMax(final long min, final long max, final CellProcessor next); }
StrMinMax extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); final int length = stringValue.length(); if( length < min || length > max ) { throw new SuperCsvConstraintViolationException(String.format( "the length (%d) of value '%s' does not lie between the min (%d) and max (%d) values (inclusive)", length, stringValue, min, max), context, this); } return next.execute(stringValue, context); } StrMinMax(final long min, final long max);  StrMinMax(final long min, final long max, final CellProcessor next); Object execute(final Object value, final CsvContext context); }
StrMinMax extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); final String stringValue = value.toString(); final int length = stringValue.length(); if( length < min || length > max ) { throw new SuperCsvConstraintViolationException(String.format( "the length (%d) of value '%s' does not lie between the min (%d) and max (%d) values (inclusive)", length, stringValue, min, max), context, this); } return next.execute(stringValue, context); } StrMinMax(final long min, final long max);  StrMinMax(final long min, final long max, final CellProcessor next); Object execute(final Object value, final CsvContext context);  }