@Test(expected = SuperCsvCellProcessorException.class) public void testWithNonBoolean() { processor.execute(123, ANONYMOUS_CSVCONTEXT); }
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof Boolean) ) { throw new SuperCsvCellProcessorException(Boolean.class, value, context, this); } final String result = ((Boolean) value).booleanValue() ? trueValue : falseValue; return next.execute(result, context); }
FmtBool extends CellProcessorAdaptor implements BoolCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof Boolean) ) { throw new SuperCsvCellProcessorException(Boolean.class, value, context, this); } final String result = ((Boolean) value).booleanValue() ? trueValue : falseValue; return next.execute(result, context); } }
FmtBool extends CellProcessorAdaptor implements BoolCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof Boolean) ) { throw new SuperCsvCellProcessorException(Boolean.class, value, context, this); } final String result = ((Boolean) value).booleanValue() ? trueValue : falseValue; return next.execute(result, context); } FmtBool(final String trueValue, final String falseValue);  FmtBool(final String trueValue, final String falseValue, final StringCellProcessor next); }
FmtBool extends CellProcessorAdaptor implements BoolCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof Boolean) ) { throw new SuperCsvCellProcessorException(Boolean.class, value, context, this); } final String result = ((Boolean) value).booleanValue() ? trueValue : falseValue; return next.execute(result, context); } FmtBool(final String trueValue, final String falseValue);  FmtBool(final String trueValue, final String falseValue, final StringCellProcessor next); Object execute(final Object value, final CsvContext context); }
FmtBool extends CellProcessorAdaptor implements BoolCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof Boolean) ) { throw new SuperCsvCellProcessorException(Boolean.class, value, context, this); } final String result = ((Boolean) value).booleanValue() ? trueValue : falseValue; return next.execute(result, context); } FmtBool(final String trueValue, final String falseValue);  FmtBool(final String trueValue, final String falseValue, final StringCellProcessor next); Object execute(final Object value, final CsvContext context);  }