@Test(expected = SuperCsvCellProcessorException.class) public void testWithNonString() { processor.execute(1, ANONYMOUS_CSVCONTEXT); }
public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof String) ) { throw new SuperCsvCellProcessorException(String.class, value, context, this); } final String stringValue = (String) value; final Boolean result; if( contains(trueValues, stringValue, ignoreCase) ) { result = Boolean.TRUE; } else if( contains(falseValues, stringValue, ignoreCase) ) { result = Boolean.FALSE; } else { throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a Boolean", value), context, this); } return next.execute(result, context); }
ParseBool extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof String) ) { throw new SuperCsvCellProcessorException(String.class, value, context, this); } final String stringValue = (String) value; final Boolean result; if( contains(trueValues, stringValue, ignoreCase) ) { result = Boolean.TRUE; } else if( contains(falseValues, stringValue, ignoreCase) ) { result = Boolean.FALSE; } else { throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a Boolean", value), context, this); } return next.execute(result, context); } }
ParseBool extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof String) ) { throw new SuperCsvCellProcessorException(String.class, value, context, this); } final String stringValue = (String) value; final Boolean result; if( contains(trueValues, stringValue, ignoreCase) ) { result = Boolean.TRUE; } else if( contains(falseValues, stringValue, ignoreCase) ) { result = Boolean.FALSE; } else { throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a Boolean", value), context, this); } return next.execute(result, context); } ParseBool();  ParseBool(final boolean ignoreCase);  ParseBool(final BoolCellProcessor next);  ParseBool(final boolean ignoreCase, final BoolCellProcessor next);  ParseBool(final String trueValue, final String falseValue);  ParseBool(final String trueValue, final String falseValue, final boolean ignoreCase);  ParseBool(final String[] trueValues, final String[] falseValues);  ParseBool(final String[] trueValues, final String[] falseValues, final boolean ignoreCase);  ParseBool(final String trueValue, final String falseValue, final BoolCellProcessor next);  ParseBool(final String trueValue, final String falseValue, final boolean ignoreCase,
		final BoolCellProcessor next);  ParseBool(final String[] trueValues, final String[] falseValues, final BoolCellProcessor next);  ParseBool(final String[] trueValues, final String[] falseValues, final boolean ignoreCase,
		final BoolCellProcessor next); }
ParseBool extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof String) ) { throw new SuperCsvCellProcessorException(String.class, value, context, this); } final String stringValue = (String) value; final Boolean result; if( contains(trueValues, stringValue, ignoreCase) ) { result = Boolean.TRUE; } else if( contains(falseValues, stringValue, ignoreCase) ) { result = Boolean.FALSE; } else { throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a Boolean", value), context, this); } return next.execute(result, context); } ParseBool();  ParseBool(final boolean ignoreCase);  ParseBool(final BoolCellProcessor next);  ParseBool(final boolean ignoreCase, final BoolCellProcessor next);  ParseBool(final String trueValue, final String falseValue);  ParseBool(final String trueValue, final String falseValue, final boolean ignoreCase);  ParseBool(final String[] trueValues, final String[] falseValues);  ParseBool(final String[] trueValues, final String[] falseValues, final boolean ignoreCase);  ParseBool(final String trueValue, final String falseValue, final BoolCellProcessor next);  ParseBool(final String trueValue, final String falseValue, final boolean ignoreCase,
		final BoolCellProcessor next);  ParseBool(final String[] trueValues, final String[] falseValues, final BoolCellProcessor next);  ParseBool(final String[] trueValues, final String[] falseValues, final boolean ignoreCase,
		final BoolCellProcessor next); Object execute(final Object value, final CsvContext context); }
ParseBool extends CellProcessorAdaptor implements StringCellProcessor { public Object execute(final Object value, final CsvContext context) { validateInputNotNull(value, context); if( !(value instanceof String) ) { throw new SuperCsvCellProcessorException(String.class, value, context, this); } final String stringValue = (String) value; final Boolean result; if( contains(trueValues, stringValue, ignoreCase) ) { result = Boolean.TRUE; } else if( contains(falseValues, stringValue, ignoreCase) ) { result = Boolean.FALSE; } else { throw new SuperCsvCellProcessorException(String.format("'%s' could not be parsed as a Boolean", value), context, this); } return next.execute(result, context); } ParseBool();  ParseBool(final boolean ignoreCase);  ParseBool(final BoolCellProcessor next);  ParseBool(final boolean ignoreCase, final BoolCellProcessor next);  ParseBool(final String trueValue, final String falseValue);  ParseBool(final String trueValue, final String falseValue, final boolean ignoreCase);  ParseBool(final String[] trueValues, final String[] falseValues);  ParseBool(final String[] trueValues, final String[] falseValues, final boolean ignoreCase);  ParseBool(final String trueValue, final String falseValue, final BoolCellProcessor next);  ParseBool(final String trueValue, final String falseValue, final boolean ignoreCase,
		final BoolCellProcessor next);  ParseBool(final String[] trueValues, final String[] falseValues, final BoolCellProcessor next);  ParseBool(final String[] trueValues, final String[] falseValues, final boolean ignoreCase,
		final BoolCellProcessor next); Object execute(final Object value, final CsvContext context);  }