CellProcessor
, StringCellProcessor
public class LMinMax extends CellProcessorAdaptor implements StringCellProcessor
MIN
or MAX
constants
provided in the class.Modifier and Type | Field | Description |
---|---|---|
static int |
MAX_8_BIT_SIGNED |
Maximum value for 8 bits (signed)
|
static int |
MAX_8_BIT_UNSIGNED |
Maximum value for 8 bits (unsigned)
|
static int |
MAX_CHAR |
Maximum value for a Character
|
static int |
MAX_INTEGER |
Maximum value for an Integer
|
static long |
MAX_LONG |
Maximum value for a Long
|
static short |
MAX_SHORT |
Maximum value for a Short
|
static int |
MIN_8_BIT_SIGNED |
Minimum value for 8 bits (signed)
|
static int |
MIN_8_BIT_UNSIGNED |
Minimum value for 8 bits (unsigned)
|
static int |
MIN_CHAR |
Minimum value for a Character
|
static int |
MIN_INTEGER |
Minimum value for an Integer
|
static long |
MIN_LONG |
Minimum value for a Long
|
static short |
MIN_SHORT |
Minimum value for a Short
|
next
Constructor | Description |
---|---|
LMinMax(long min,
long max) |
Constructs a new LMinMax processor, which converts the input data to a Long and and ensures the value is
between the supplied min and max values.
|
LMinMax(long min,
long max,
LongCellProcessor next) |
Constructs a new LMinMax 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.
|
Modifier and Type | Method | Description |
---|---|---|
Object |
execute(Object value,
CsvContext context) |
This method is invoked by the framework when the processor needs to process data or check constraints.
|
toString, validateInputNotNull
public static final long MAX_LONG
public static final long MIN_LONG
public static final int MAX_INTEGER
public static final int MIN_INTEGER
public static final short MAX_SHORT
public static final short MIN_SHORT
public static final int MAX_CHAR
public static final int MIN_CHAR
public static final int MAX_8_BIT_UNSIGNED
public static final int MIN_8_BIT_UNSIGNED
public static final int MAX_8_BIT_SIGNED
public static final int MIN_8_BIT_SIGNED
public LMinMax(long min, long max)
min
- the minimum value (inclusive)max
- the maximum value (inclusive)IllegalArgumentException
- if max < min
public LMinMax(long min, long max, LongCellProcessor next)
min
- the minimum value (inclusive)max
- the maximum value (inclusive)next
- the next processor in the chainNullPointerException
- if next is nullIllegalArgumentException
- if max < min
public Object execute(Object value, CsvContext context)
execute
in interface CellProcessor
value
- the value to be processedcontext
- the CSV contextSuperCsvCellProcessorException
- if value is null or can't be parsed as a LongSuperCsvConstraintViolationException
- if value, or doesn't lie between min and max (inclusive)Copyright © 2007–2018 Super CSV. All rights reserved.