public static class AbstractBrailleTranslator.util.DefaultLineBreaker.LineIterator extends Object implements BrailleTranslator.LineIterator, Cloneable
METRIC_FORCED_BREAK, METRIC_HYPHEN_COUNT
Constructor and Description |
---|
LineIterator(AbstractBrailleTranslator.util.DefaultLineBreaker.BrailleStream inputStream,
char blankChar,
char hyphenChar,
int wordSpacing) |
LineIterator(String fullyHyphenatedAndTranslatedString,
char blankChar,
char hyphenChar,
int wordSpacing) |
LineIterator(String fullyHyphenatedAndTranslatedString,
int from,
int to,
char blankChar,
char hyphenChar,
int wordSpacing) |
Modifier and Type | Method and Description |
---|---|
Object |
clone() |
BrailleTranslatorResult |
copy() |
int |
countRemaining() |
double |
getMetric(String metric) |
String |
getTranslatedRemainder() |
boolean |
hasNext() |
String |
nextTranslatedRow(int limit,
boolean force,
boolean wholeWordsOnly) |
boolean |
supportsMetric(String metric) |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
nextTranslatedRow
public LineIterator(String fullyHyphenatedAndTranslatedString, char blankChar, char hyphenChar, int wordSpacing)
public LineIterator(String fullyHyphenatedAndTranslatedString, int from, int to, char blankChar, char hyphenChar, int wordSpacing)
public LineIterator(AbstractBrailleTranslator.util.DefaultLineBreaker.BrailleStream inputStream, char blankChar, char hyphenChar, int wordSpacing)
public String nextTranslatedRow(int limit, boolean force, boolean wholeWordsOnly)
nextTranslatedRow
in interface BrailleTranslatorResult
limit
- specifies the maximum number of characters allowed in the resultforce
- specifies if the translator should force a break at the limit
if no natural break point is foundwholeWordsOnly
- specifies that the row may not end on a break point inside a word.public boolean hasNext()
hasNext
in interface BrailleTranslatorResult
public String getTranslatedRemainder()
getTranslatedRemainder
in interface BrailleTranslatorResult
public int countRemaining()
countRemaining
in interface BrailleTranslatorResult
public BrailleTranslatorResult copy()
copy
in interface BrailleTranslatorResult
public boolean supportsMetric(String metric)
supportsMetric
in interface BrailleTranslatorResult
public double getMetric(String metric)
getMetric
in interface BrailleTranslatorResult
Copyright © 2010–2024 The DAISY Consortium. All rights reserved.