org.extex.language.word.impl
Class TeXWords

java.lang.Object
  extended by org.extex.language.word.impl.ExTeXWords
      extended by org.extex.language.word.impl.TeXWords
All Implemented Interfaces:
java.io.Serializable, WordTokenizer

public class TeXWords
extends ExTeXWords
implements WordTokenizer

This class tokenizes a list of nodes according to the rules of TeX.

Version:
$Revision: 4784 $
Author:
Gerd Neugebauer
See Also:
Serialized Form

Field Summary
protected static long serialVersionUID
          The constant serialVersionUID contains the id for serialization.
 
Constructor Summary
TeXWords()
          Creates a new object.
 
Method Summary
 int findWord(NodeList nodes, int start, UnicodeCharList word)
          Extract a word from a node list.
 UnicodeCharList normalize(UnicodeCharList word, TypesetterOptions options)
          Normalize a word for the lookup.
 
Methods inherited from class org.extex.language.word.impl.ExTeXWords
insertShy
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.extex.language.word.WordTokenizer
insertShy
 

Field Detail

serialVersionUID

protected static final long serialVersionUID
The constant serialVersionUID contains the id for serialization.

See Also:
Constant Field Values
Constructor Detail

TeXWords

public TeXWords()
Creates a new object.

Method Detail

findWord

public int findWord(NodeList nodes,
                    int start,
                    UnicodeCharList word)
             throws HyphenationException
Description copied from interface: WordTokenizer
Extract a word from a node list.

Specified by:
findWord in interface WordTokenizer
Overrides:
findWord in class ExTeXWords
Parameters:
nodes - the nodes to extract the word from
start - the start index
word - the target list for the letters of the word
Returns:
the index of the first node beyond the word
Throws:
HyphenationException - in case of an error
See Also:
WordTokenizer.findWord( org.extex.typesetter.type.NodeList, int, org.extex.core.UnicodeCharList)

normalize

public UnicodeCharList normalize(UnicodeCharList word,
                                 TypesetterOptions options)
                          throws HyphenationException
Description copied from interface: WordTokenizer
Normalize a word for the lookup.

Specified by:
normalize in interface WordTokenizer
Overrides:
normalize in class ExTeXWords
Parameters:
word - the word to normalize
options - the options to use
Returns:
the normalized word
Throws:
HyphenationException - in case of an error
See Also:
WordTokenizer.normalize( org.extex.core.UnicodeCharList, org.extex.typesetter.TypesetterOptions)