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 skippedChars)
Extracts value of type
T from the given character data. |
String |
toString() |
T |
value() |
boolean extract(char[] data,
int offset,
int length,
boolean skippedChars)
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.skippedChars - whether or not there were skipped characters, f.ex. quotation.true if a value was extracted, otherwise false.T value()
String toString()
toString in class ObjectExtractors.Copyright © 2002–2017 The Neo4j Graph Database Project. All rights reserved.