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


Field Summary
(package private)  PatternConsumer consumer
           
 
Constructor Summary
PatternInternalParser()
           
PatternInternalParser(PatternConsumer consumer)
           
 
Method Summary
 void addClass(String c)
          Add a character class.
 void addException(String w, Vector e)
          Add a hyphenation exception.
 void addPattern(String p, String v)
          Add hyphenation patterns.
protected  String getHyphString(InputStream is)
           
 void parse(InputStream is)
           
 void parse(String filename)
           
 void parseString(String hyphs)
           
protected  void readClasses(StringTokenizer tk)
           
protected  void readExceptions(StringTokenizer tk)
           
protected  void readPatterns(StringTokenizer tk)
           
 void setConsumer(PatternConsumer consumer)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

consumer

PatternConsumer consumer
Constructor Detail

PatternInternalParser

public PatternInternalParser()

PatternInternalParser

public PatternInternalParser(PatternConsumer consumer)
Method Detail

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.