public interface Segmenter
Modifier and Type | Method and Description |
---|---|
CloseableStringSink |
composer(Appendable target,
Closeable fwd)
Create composer.
|
<T extends Appendable & Closeable> |
composer(T target)
Convenience wrapper for
composer(java.lang.Appendable, java.io.Closeable) . |
String |
getCxnFormatName()
Format name used by
MolImporter and MolExporter . |
String |
getDescription()
Short human readable description.
|
<T extends Appendable & Closeable> |
optionalComposer(Optional<T> target)
Convenience wrapper for
composer(java.lang.Appendable, java.io.Closeable) . |
Iterator<String> |
segments(Iterator<String> lines)
Enumerate multi line segments of the input structure.
|
Function<Iterator<String>,Iterator<String>> |
segmentsFunction()
Function to transform input lines to segments.
|
String getCxnFormatName()
MolImporter
and MolExporter
.String getDescription()
Iterator<String> segments(Iterator<String> lines)
s.trim() == s
).lines
- Input linesFunction<Iterator<String>,Iterator<String>> segmentsFunction()
CloseableStringSink composer(Appendable target, Closeable fwd)
CloseableSink.close()
is required to be called.target
- Target to print to.fwd
- Forward closing or null<T extends Appendable & Closeable> CloseableStringSink composer(T target)
composer(java.lang.Appendable, java.io.Closeable)
.
This method typically used when a resource bound output channel is set up.T
- Closeable target typetarget
- Closeable target<T extends Appendable & Closeable> Optional<CloseableStringSink> optionalComposer(Optional<T> target)
composer(java.lang.Appendable, java.io.Closeable)
.
This method typically used when an optional output channel is set up.T
- Closeable target typetarget
- Optional closeable target