public interface TextSplitter
defines the interface of a method which separates a string into
parts and stores them in a TextStore
.
Hint:Typically a TextSplitter
and a Formatter
are used in tandem and communicate via a
TextStore
.
Modifier and Type | Field and Description |
---|---|
static TextSplitter |
NULLSPLITTER
is an instance of a
TextSplitter which does not
split the incoming text at all, but appends it completely as a new
part onto the given TextStore . |
Modifier and Type | Method and Description |
---|---|
void |
split(TextStore dst,
java.lang.StringBuilder source,
int start)
separates the stretch of text defined by the suffix of
source , starting at start into parts
and stores the parts in dst . |
static final TextSplitter NULLSPLITTER
is an instance of a TextSplitter
which does not
split the incoming text at all, but appends it completely as a new
part onto the given TextStore
. The
TextStore
is not cleared before.
void split(TextStore dst, java.lang.StringBuilder source, int start)
separates the stretch of text defined by the suffix of
source
, starting at start
into parts
and stores the parts in dst
.
The method normally does not clear the TextStore
,
but implementations may choose to do so.
Postcondition: Implementations of this method must
treat source
read-only.