public class Unique extends CellProcessorAdaptor
Compared to UniqueHashCode
this processor potentially uses more memory, as it stores references to each
encountered object rather than just their hashcodes. On reading huge files this can be a real memory-hazard, however,
it ensures a true uniqueness check.
next
Constructor and Description |
---|
Unique()
Constructs a new Unique processor, which ensures that all rows in a column are unique.
|
Unique(CellProcessor next)
Constructs a new Unique processor, which ensures that all rows in a column are unique, then calls the
next processor in the chain.
|
Modifier and Type | Method and 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 Unique()
public Unique(CellProcessor next)
next
- the next processor in the chainNullPointerException
- if next is nullpublic Object execute(Object value, CsvContext context)
value
- the value to be processedcontext
- the CSV contextSuperCsvCellProcessorException
- if value is nullSuperCsvConstraintViolationException
- if a non-unique value is encounteredCopyright © 2007–2015 Super CSV. All rights reserved.