D
- Type of represented descriptorpublic class ParseCustomToDescriptor<D extends Descriptor> extends Object implements Function<String,ParsedDescriptorResult<D>>
Descriptor
s from String
s optionally with IDs.
The parser processes textual lines to create descriptors.Constructor and Description |
---|
ParseCustomToDescriptor(Function<String,String> descSplitter,
Function<String,String> idSplitterOrNull,
DescriptorGenerator<D> generator)
Construct new instance.
|
public ParseCustomToDescriptor(Function<String,String> descSplitter, Function<String,String> idSplitterOrNull, DescriptorGenerator<D> generator)
descSplitter
- Function
to extract the descriptors String representationidSplitterOrNull
- Function
to extract the IDs or null
generator
- DescriptorGenerator
to parse the descriptors String representationpublic ParsedDescriptorResult<D> apply(String input)
apply
in interface Function<String,ParsedDescriptorResult<D extends Descriptor>>