T
- Extracted typepublic final class ChemTermPropertyExtractor<T> extends Object implements PropertyExtractor<T>
Modifier and Type | Method and Description |
---|---|
static ChemTermPropertyExtractor<Double> |
doubleTerm(String expression,
boolean allowFailed) |
T |
extract(StructureRecord mol)
Extract/calculate represented property from a structure.
|
Class<T> |
getExtractedType()
Extracted type.
|
static ChemTermPropertyExtractor<Integer> |
intTerm(String expression,
boolean allowFailed) |
static ChemTermPropertyExtractor<Long> |
longTerm(String expression,
boolean allowFailed) |
static ChemTermPropertyExtractor<String> |
stringTerm(String expression,
boolean allowFailed) |
String |
toString() |
public static ChemTermPropertyExtractor<Integer> intTerm(String expression, boolean allowFailed)
public static ChemTermPropertyExtractor<Long> longTerm(String expression, boolean allowFailed)
public static ChemTermPropertyExtractor<Double> doubleTerm(String expression, boolean allowFailed)
public static ChemTermPropertyExtractor<String> stringTerm(String expression, boolean allowFailed)
public Class<T> getExtractedType()
PropertyExtractor
getExtractedType
in interface PropertyExtractor<T>
public T extract(StructureRecord mol) throws IllegalArgumentException
PropertyExtractor
IllegalArgumentException
is thrown when the property of the represented type can not be
extracted, including the following example cases:
extract
in interface PropertyExtractor<T>
mol
- Input structureIllegalArgumentException
- when the represented type can not be extracted. Implementation note: this is the
expected exception thrown when Chemical Terms are encapsulated and type mismatch surfaces only after execution