@Test(expected = SuperCsvConstraintViolationException.class) public void testInvalidStringInput() { assertEquals("a", processor.execute("a", ANONYMOUS_CSVCONTEXT)); assertEquals("b", processor.execute("b", ANONYMOUS_CSVCONTEXT)); assertEquals("c", processor.execute("c", ANONYMOUS_CSVCONTEXT)); processor.execute("b", ANONYMOUS_CSVCONTEXT); }
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); int hash = value.hashCode(); if( !uniqueSet.add(hash) ) { throw new SuperCsvConstraintViolationException( String.format("duplicate value '%s' encountered with hashcode %d", value, hash), context, this); } return next.execute(value, context); }
UniqueHashCode extends CellProcessorAdaptor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); int hash = value.hashCode(); if( !uniqueSet.add(hash) ) { throw new SuperCsvConstraintViolationException( String.format("duplicate value '%s' encountered with hashcode %d", value, hash), context, this); } return next.execute(value, context); } }
UniqueHashCode extends CellProcessorAdaptor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); int hash = value.hashCode(); if( !uniqueSet.add(hash) ) { throw new SuperCsvConstraintViolationException( String.format("duplicate value '%s' encountered with hashcode %d", value, hash), context, this); } return next.execute(value, context); } UniqueHashCode();  UniqueHashCode(final CellProcessor next); }
UniqueHashCode extends CellProcessorAdaptor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); int hash = value.hashCode(); if( !uniqueSet.add(hash) ) { throw new SuperCsvConstraintViolationException( String.format("duplicate value '%s' encountered with hashcode %d", value, hash), context, this); } return next.execute(value, context); } UniqueHashCode();  UniqueHashCode(final CellProcessor next); Object execute(final Object value, final CsvContext context); }
UniqueHashCode extends CellProcessorAdaptor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); int hash = value.hashCode(); if( !uniqueSet.add(hash) ) { throw new SuperCsvConstraintViolationException( String.format("duplicate value '%s' encountered with hashcode %d", value, hash), context, this); } return next.execute(value, context); } UniqueHashCode();  UniqueHashCode(final CellProcessor next); Object execute(final Object value, final CsvContext context);  }