@Test public void testChainedIsElementOf() { for( Object o : input ) { chainedProcessor.execute(o, ANONYMOUS_CSVCONTEXT); } try { chainedProcessor.execute("not an element", ANONYMOUS_CSVCONTEXT); fail("should have thrown SuperCsvConstraintViolationException"); } catch(final SuperCsvConstraintViolationException e) {} }
public Object execute(final Object value, final CsvContext context) { if( !collection.contains(value) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' is not an element of the supplied Collection", value), context, this); } return next.execute(value, context); }
IsElementOf extends CellProcessorAdaptor implements BoolCellProcessor, DateCellProcessor,
	DoubleCellProcessor, LongCellProcessor, StringCellProcessor { public Object execute(final Object value, final CsvContext context) { if( !collection.contains(value) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' is not an element of the supplied Collection", value), context, this); } return next.execute(value, context); } }
IsElementOf extends CellProcessorAdaptor implements BoolCellProcessor, DateCellProcessor,
	DoubleCellProcessor, LongCellProcessor, StringCellProcessor { public Object execute(final Object value, final CsvContext context) { if( !collection.contains(value) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' is not an element of the supplied Collection", value), context, this); } return next.execute(value, context); } IsElementOf(final Collection<Object> collection);  IsElementOf(final Collection<Object> collection, final CellProcessor next); }
IsElementOf extends CellProcessorAdaptor implements BoolCellProcessor, DateCellProcessor,
	DoubleCellProcessor, LongCellProcessor, StringCellProcessor { public Object execute(final Object value, final CsvContext context) { if( !collection.contains(value) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' is not an element of the supplied Collection", value), context, this); } return next.execute(value, context); } IsElementOf(final Collection<Object> collection);  IsElementOf(final Collection<Object> collection, final CellProcessor next); Object execute(final Object value, final CsvContext context); }
IsElementOf extends CellProcessorAdaptor implements BoolCellProcessor, DateCellProcessor,
	DoubleCellProcessor, LongCellProcessor, StringCellProcessor { public Object execute(final Object value, final CsvContext context) { if( !collection.contains(value) ) { throw new SuperCsvConstraintViolationException(String.format( "'%s' is not an element of the supplied Collection", value), context, this); } return next.execute(value, context); } IsElementOf(final Collection<Object> collection);  IsElementOf(final Collection<Object> collection, final CellProcessor next); Object execute(final Object value, final CsvContext context);  }