public interface Extractor<T> extends Cloneable
char[] into any type of value, f.ex. a Extractors.string(),
long or Extractors.intArray().
An Extractor is mutable for the single purpose of ability to reuse its value instance. Consider extracting
a primitive int -
Sub-interfaces and implementations can and should specify specific accessors for the purpose
of performance and less garbage, f.ex. where an IntExtractor could have an accessor method for
getting the extracted value as primitive int, to avoid auto-boxing which would arise from calling value().| Modifier and Type | Method and Description |
|---|---|
Extractor<T> |
clone() |
boolean |
extract(char[] data,
int offset,
int length,
boolean hadQuotes)
Extracts value of type
T from the given character data. |
boolean |
extract(char[] data,
int offset,
int length,
boolean hadQuotes,
CSVHeaderInformation optionalData)
Extracts value of type
T from the given character data. |
String |
name() |
T |
value() |
boolean extract(char[] data,
int offset,
int length,
boolean hadQuotes,
CSVHeaderInformation optionalData)
T from the given character data.data - characters in a buffer.offset - offset into the buffer where the value starts.length - number of characters from the offset to extract.hadQuotes - whether or not there were skipped characters, f.ex. quotation.optionalData - optional data to be used for spatial or temporal values or null if csv header did not use ittrue if a value was extracted, otherwise false.boolean extract(char[] data,
int offset,
int length,
boolean hadQuotes)
T from the given character data.data - characters in a buffer.offset - offset into the buffer where the value starts.length - number of characters from the offset to extract.hadQuotes - whether or not there were skipped characters, f.ex. quotation.true if a value was extracted, otherwise false.T value()
String name()
Extractors.Copyright © 2016–2021 MWARE SOLUTIONS. All rights reserved.