au.id.pbw.hyfo.hyph
Class Modifier

java.lang.Object
  extended by au.id.pbw.hyfo.hyph.Modifier
All Implemented Interfaces:
Serializable

public class Modifier
extends Object
implements Serializable

This class represents the modification to a word which occurs when it is hyphenated.

Author:
Peter B. West
See Also:
Serialized Form

Field Summary
static byte DEFAULT_WEIGHT
          The default modifier break weight.
 String nobreak
          The text before line-breaking.
 String nobreak_post
          The nobreak text following the breakpoint.
 String nobreak_pre
          The nobreak text preceding the breakpoint.
 String postbreak
          The text following the line-break, after line-breaking.
 String prebreak
          The text preceding the line-break, after line-breaking.
 byte weight
          The weight associated with the modifier.
 
Constructor Summary
Modifier(Alphabet alphabet)
          Constructs the default modifier.
Modifier(Alphabet alphabet, String nobreak, String prebreak, String postbreak)
          Constructs a modifier with the given no-break, pre-break and post-break strings.
 
Method Summary
 Modifier get_default_modifier()
          Gets the default Modifier.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nobreak

public final String nobreak
The text before line-breaking.


prebreak

public final String prebreak
The text preceding the line-break, after line-breaking.


postbreak

public final String postbreak
The text following the line-break, after line-breaking.


nobreak_pre

public final String nobreak_pre
The nobreak text preceding the breakpoint.


nobreak_post

public final String nobreak_post
The nobreak text following the breakpoint.


weight

public final byte weight
The weight associated with the modifier.


DEFAULT_WEIGHT

public static final byte DEFAULT_WEIGHT
The default modifier break weight.

See Also:
Constant Field Values
Constructor Detail

Modifier

public Modifier(Alphabet alphabet)
Constructs the default modifier.

Parameters:
alphabet - the Alphabet applying to this modifier.

Modifier

public Modifier(Alphabet alphabet,
                String nobreak,
                String prebreak,
                String postbreak)
         throws HyphenationException
Constructs a modifier with the given no-break, pre-break and post-break strings.

Parameters:
alphabet - the Alphabet geverning tis modifier.
nobreak - the no-break string.
prebreak - the pre-break string.
postbreak - the postbreak string.
Throws:
HyphenationException - if the modifier data is incorrectly formatted.
Method Detail

get_default_modifier

public Modifier get_default_modifier()
Gets the default Modifier. This represents the usual hyphenation practice. The no-break string is empty, the post-break string is empty, and the pre-break string contains the default hyphen character.

Returns:
the default Modifier.


Copyright © 2005-2006 Peter B. West.