com.lowagie.text.pdf.hyphenation
Class PatternInternalParser
java.lang.Object
|
+--com.lowagie.text.pdf.hyphenation.PatternInternalParser
- All Implemented Interfaces:
- PatternConsumer
- public class PatternInternalParser
- extends Object
- implements PatternConsumer
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
consumer
PatternConsumer consumer
PatternInternalParser
public PatternInternalParser()
PatternInternalParser
public PatternInternalParser(PatternConsumer consumer)
setConsumer
public void setConsumer(PatternConsumer consumer)
getHyphString
protected String getHyphString(InputStream is)
throws IOException
IOException
parse
public void parse(String filename)
parse
public void parse(InputStream is)
parseString
public void parseString(String hyphs)
readClasses
protected void readClasses(StringTokenizer tk)
readExceptions
protected void readExceptions(StringTokenizer tk)
readPatterns
protected void readPatterns(StringTokenizer tk)
addClass
public void addClass(String c)
- Description copied from interface:
PatternConsumer
- Add a character class.
A character class defines characters that are considered
equivalent for the purpose of hyphenation (e.g. "aA"). It
usually means to ignore case.
- Specified by:
addClass
in interface PatternConsumer
addException
public void addException(String w,
Vector e)
- Description copied from interface:
PatternConsumer
- Add a hyphenation exception. An exception replaces the
result obtained by the algorithm for cases for which this
fails or the user wants to provide his own hyphenation.
A hyphenatedword is a vector of alternating String's and
Hyphen
instances
- Specified by:
addException
in interface PatternConsumer
addPattern
public void addPattern(String p,
String v)
- Description copied from interface:
PatternConsumer
- Add hyphenation patterns.
- Specified by:
addPattern
in interface PatternConsumer
- Parameters:
p
- v
- interletter values expressed as a string of
digit characters.