org.foray.hyphen
Class WordWrapper

java.lang.Object
  extended by org.foray.hyphen.WordWrapper
All Implemented Interfaces:
Serializable, CharSequence, org.axsl.hyphen.Word, org.axsl.hyphen.WordSequenceContent

public class WordWrapper
extends Object
implements org.axsl.hyphen.Word, Serializable

Decorates a normalized word with some additional data.

See Also:
Serialized Form

Constructor Summary
WordWrapper(Word4a wrappedWord, boolean isCapitalized, boolean isUppercase)
          Constructor.
WordWrapper(Word4a wrappedWord, boolean isCapitalized, boolean isUppercase, char trailingAttachedPunctuation)
          Constructor.
 
Method Summary
 char charAt(int index)
           
 int getLiangWeight(org.axsl.hyphen.HyphenationFilter filter, int pointIndex)
           
 org.axsl.hyphen.MutatingHyphenationBreak getMutatingBreak(org.axsl.hyphen.HyphenationFilter filter, int pointIndex)
           
 CharSequence getNormalizedWord()
           
 int getOffset(org.axsl.hyphen.HyphenationFilter filter, int pointIndex)
           
 char getSegmentChar(org.axsl.hyphen.HyphenationFilter filter, int layoutOptionIndex, int segmentIndex, int charIndex)
           
 int getSegmentLength(org.axsl.hyphen.HyphenationFilter filter, int layoutOptionIndex, int segmentIndex)
           
 int getWeight(org.axsl.hyphen.HyphenationFilter filter, int pointIndex)
           
 int length()
           
 int qtyHyphenationPoints(org.axsl.hyphen.HyphenationFilter filter)
           
 int qtyLayoutOptions(org.axsl.hyphen.HyphenationFilter filter)
           
 int qtySegments(org.axsl.hyphen.HyphenationFilter filter, int layoutOptionIndex)
           
 CharSequence subSequence(int start, int end)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

WordWrapper

public WordWrapper(Word4a wrappedWord,
                   boolean isCapitalized,
                   boolean isUppercase,
                   char trailingAttachedPunctuation)
Constructor.

Parameters:
wrappedWord - The word being wrapped.
isCapitalized - Indicates whether the actual word is the capitalized version of the normalized word.
isUppercase - Indicates whether the actual word is the uppercase version of the normalized word.
trailingAttachedPunctuation - The attached trailing punctuation, if any, that is attached to this word.

WordWrapper

public WordWrapper(Word4a wrappedWord,
                   boolean isCapitalized,
                   boolean isUppercase)
Constructor.

Parameters:
wrappedWord - The word being wrapped.
isCapitalized - Indicates whether the actual word is the capitalized version of the normalized word.
isUppercase - Indicates whether the actual word is the uppercase version of the normalized word.
Method Detail

length

public int length()
Specified by:
length in interface CharSequence

charAt

public char charAt(int index)
Specified by:
charAt in interface CharSequence

subSequence

public CharSequence subSequence(int start,
                                int end)
Specified by:
subSequence in interface CharSequence

toString

public String toString()
Specified by:
toString in interface CharSequence
Overrides:
toString in class Object

getNormalizedWord

public CharSequence getNormalizedWord()
Specified by:
getNormalizedWord in interface org.axsl.hyphen.Word

qtyHyphenationPoints

public int qtyHyphenationPoints(org.axsl.hyphen.HyphenationFilter filter)
Specified by:
qtyHyphenationPoints in interface org.axsl.hyphen.Word

getOffset

public int getOffset(org.axsl.hyphen.HyphenationFilter filter,
                     int pointIndex)
Specified by:
getOffset in interface org.axsl.hyphen.Word

getWeight

public int getWeight(org.axsl.hyphen.HyphenationFilter filter,
                     int pointIndex)
Specified by:
getWeight in interface org.axsl.hyphen.Word

getLiangWeight

public int getLiangWeight(org.axsl.hyphen.HyphenationFilter filter,
                          int pointIndex)
Specified by:
getLiangWeight in interface org.axsl.hyphen.Word

getMutatingBreak

public org.axsl.hyphen.MutatingHyphenationBreak getMutatingBreak(org.axsl.hyphen.HyphenationFilter filter,
                                                                 int pointIndex)
Specified by:
getMutatingBreak in interface org.axsl.hyphen.Word

qtyLayoutOptions

public int qtyLayoutOptions(org.axsl.hyphen.HyphenationFilter filter)
Specified by:
qtyLayoutOptions in interface org.axsl.hyphen.Word

qtySegments

public int qtySegments(org.axsl.hyphen.HyphenationFilter filter,
                       int layoutOptionIndex)
Specified by:
qtySegments in interface org.axsl.hyphen.Word

getSegmentLength

public int getSegmentLength(org.axsl.hyphen.HyphenationFilter filter,
                            int layoutOptionIndex,
                            int segmentIndex)
Specified by:
getSegmentLength in interface org.axsl.hyphen.Word

getSegmentChar

public char getSegmentChar(org.axsl.hyphen.HyphenationFilter filter,
                           int layoutOptionIndex,
                           int segmentIndex,
                           int charIndex)
Specified by:
getSegmentChar in interface org.axsl.hyphen.Word


Copyright © 2017. All rights reserved.