Package org.supercsv.exception

Examples of org.supercsv.exception.NullInputException


*             if the input contains any of the substrings
* @return the argument value
*/
@Override
public Object execute(final Object value, final CSVContext context) throws SuperCSVException, ClassCastException {
  if( value == null ) { throw new NullInputException("Input cannot be null on line " + context.lineNumber + " at column " + context.columnNumber, context, this); }
  final String sval = value.toString(); // cast
 
  // check for forbidden strings
  for( final String forbidden : forbiddenSubStrings ) {
    if( sval.indexOf(forbidden) != -1 ) { throw new SuperCSVException("Entry \"" + value + "\" on line "
View Full Code Here


*             is the parameter value cannot be cast to a String
* @return the argument value if the value is unique
*/
@Override
public Object execute(final Object value, final CSVContext context) throws SuperCSVException, ClassCastException {
  if( value == null ) { throw new NullInputException("Input cannot be null on line " + context.lineNumber
    + " at column " + context.columnNumber, context, this); }
  final String sval = (value == null) ? null : value.toString(); // cast
  final int slength = (sval == null) ? 0 : sval.length();
 
  // check for required lengths
View Full Code Here

* {@inheritDoc}
*/
@Override
public Object execute(final Object value, final CSVContext context) throws SuperCSVException {
  if( value == null ) {
    throw new NullInputException("Input cannot be null on line " + context.lineNumber + " at column "
      + context.columnNumber, context, this);
  }
  final Long result;
  if( value instanceof Long ) {
    result = (Long) value;
View Full Code Here

TOP

Related Classes of org.supercsv.exception.NullInputException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.