org.supercsv.cellprocessor.ift.LongCellProcessor Java Examples

The following examples show how to use org.supercsv.cellprocessor.ift.LongCellProcessor. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: CellProcessorBuilder.java    From attic-apex-malhar with Apache License 2.0 5 votes vote down vote up
/**
 * Get cellprocessor to parse String as Integer.
 *
 * @param cellProcessor
 *          next processor in the chain.
 * @return CellProcessor
 */
private static CellProcessor addParseInt(CellProcessor cellProcessor)
{
  if (cellProcessor == null) {
    return new ParseInt();
  }
  return new ParseInt((LongCellProcessor)cellProcessor);
}
 
Example #2
Source File: CellProcessorBuilder.java    From attic-apex-malhar with Apache License 2.0 5 votes vote down vote up
/**
 * Get cellprocessor to parse String as Long.
 *
 * @param cellProcessor
 *          next processor in the chain.
 * @return CellProcessor
 */
private static CellProcessor addParseLong(CellProcessor cellProcessor)
{
  if (cellProcessor == null) {
    return new ParseLong();
  }
  return new ParseLong((LongCellProcessor)cellProcessor);
}
 
Example #3
Source File: LMinMax.java    From super-csv with Apache License 2.0 3 votes vote down vote up
/**
 * Constructs a new <tt>LMinMax</tt> processor, which converts the input data to a Long and and ensures the value is
 * between the supplied min and max values, then calls the next processor in the chain.
 * 
 * @param min
 *            the minimum value (inclusive)
 * @param max
 *            the maximum value (inclusive)
 * @param next
 *            the next processor in the chain
 * @throws NullPointerException
 *             if next is null
 * @throws IllegalArgumentException
 *             if {@code max < min}
 */
public LMinMax(final long min, final long max, final LongCellProcessor next) {
	super(next);
	checkPreconditions(min, max);
	this.min = min;
	this.max = max;
}
 
Example #4
Source File: ParseInt.java    From super-csv with Apache License 2.0 2 votes vote down vote up
/**
 * Constructs a new <tt>ParseInt</tt> processor, which converts a String to an Integer, then calls the next
 * processor in the chain.
 * 
 * @param next
 *            the next processor in the chain
 * @throws NullPointerException
 *             if next is null
 */
public ParseInt(final LongCellProcessor next) {
	super(next);
}
 
Example #5
Source File: ParseLong.java    From super-csv with Apache License 2.0 2 votes vote down vote up
/**
 * Constructs a new <tt>ParseLong</tt> processor, which converts a String to a Long, then calls the next processor
 * in the chain.
 * 
 * @param next
 *            the next processor in the chain
 * @throws NullPointerException
 *             if next is null
 */
public ParseLong(final LongCellProcessor next) {
	super(next);
}