public static interface Hyphenator.LineIterator
Modifier and Type | Method and Description |
---|---|
boolean |
hasNext()
Returns true if there is remaining text to make a new line of.
|
boolean |
lineHasHyphen()
Whether or not a hyphen character should be inserted at the end of
the current line to indicate a word break.
|
void |
mark()
Set a checkpoint to which the iterator can be `reset` later.
|
String |
nextLine(int limit,
boolean force) |
String |
nextLine(int limit,
boolean force,
boolean allowHyphens)
Get the next line of text, with a length as close as possible to, but not
exceding `limit` characters, breaking a word if needed.
|
String |
remainder() |
void |
reset()
Roll back to a checkpoint previously set with `mark`, or to the
beginning if `mark` hasn't been called yet.
|
boolean hasNext()
String nextLine(int limit, boolean force, boolean allowHyphens)
lineHasHyphen()
). `limit` must
be greater than 0. If `force` is true, may not return an empty string. If
`allowHyphens` is false, breaking words is not permitted unless `force` is true
and an empty string would otherwise be returned. Must throw an exception if
there is no remaining text to make a new line of.String nextLine(int limit, boolean force)
boolean lineHasHyphen()
String remainder()
void mark()
void reset()
Copyright © 2010–2024 The DAISY Consortium. All rights reserved.