org.foray.fotree.fo.obj
Class FoWord

java.lang.Object
  extended by org.foray.fotree.fo.obj.FoWordSequenceContent
      extended by org.foray.fotree.fo.obj.FoWord
All Implemented Interfaces:
CharSequence

public class FoWord
extends FoWordSequenceContent

Fo wrapper around a word.


Constructor Summary
FoWord(org.axsl.hyphen.Word word)
          Constructor.
 
Method Summary
 char charAt(int index)
           
 org.axsl.hyphen.Word getWord()
          Returns the wrapped word.
 int length()
           
 char linefeedTreatmentCharAt(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment, org.axsl.common.value.LinefeedTreatment linefeedTreatment, int linefeedTreatmentIndex)
          Returns the char at a given index after linefeed-treatment is applied.
 int linefeedTreatmentLength(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment, org.axsl.common.value.LinefeedTreatment linefeedTreatment)
          Returns the number of chars in this object after linefeed-treatment is applied.
 CharSequence subSequence(int start, int end)
           
 char textTransformCharAt(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment, org.axsl.common.value.LinefeedTreatment linefeedTreatment, org.axsl.common.value.TextTransform textTransform, int textTransformIndex)
          Returns the char at a given index after text-transform is applied.
 String toString()
           
 char whiteSpaceCollapseCharAt(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment, org.axsl.common.value.LinefeedTreatment linefeedTreatment, org.axsl.common.value.TextTransform textTransform, boolean isWhiteSpaceCollapse, int whiteSpaceCollapseIndex)
          Returns the char at a given index after white-space-collapse is applied.
 int whiteSpaceCollapseLength(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment, org.axsl.common.value.LinefeedTreatment linefeedTreatment, org.axsl.common.value.TextTransform textTransform, boolean isWhiteSpaceCollapse)
          Returns the number of chars in this object after white-space-collapse is applied.
 char whiteSpaceTreatmentCharAt(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment, int whiteSpaceTreatmentIndex)
          Returns the char at a given index after white-space-treatment is applied.
 int whiteSpaceTreatmentLength(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment)
          Returns the number of chars in this object after white-space-treatment is applied.
 
Methods inherited from class org.foray.fotree.fo.obj.FoWordSequenceContent
textTransformLength
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FoWord

public FoWord(org.axsl.hyphen.Word word)
Constructor.

Parameters:
word - The wrapped word.
Method Detail

getWord

public org.axsl.hyphen.Word getWord()
Returns the wrapped word.

Returns:
The wrapped word.

length

public int length()

charAt

public char charAt(int index)

subSequence

public CharSequence subSequence(int start,
                                int end)

whiteSpaceTreatmentLength

public int whiteSpaceTreatmentLength(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment)
Description copied from class: FoWordSequenceContent
Returns the number of chars in this object after white-space-treatment is applied.

Overrides:
whiteSpaceTreatmentLength in class FoWordSequenceContent
Parameters:
whiteSpaceTreatment - The white-space-treatment to be used in evaluation.
Returns:
The number of chars in this object after white-space-treatment is applied.

whiteSpaceTreatmentCharAt

public char whiteSpaceTreatmentCharAt(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment,
                                      int whiteSpaceTreatmentIndex)
Description copied from class: FoWordSequenceContent
Returns the char at a given index after white-space-treatment is applied.

Overrides:
whiteSpaceTreatmentCharAt in class FoWordSequenceContent
Parameters:
whiteSpaceTreatment - The white-space-treatment to be used in evaluation.
whiteSpaceTreatmentIndex - The index into the chars in this instance, after white-space-treatment is applied.
Returns:
The char at a given index after white-space-treatment is applied.

linefeedTreatmentLength

public int linefeedTreatmentLength(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment,
                                   org.axsl.common.value.LinefeedTreatment linefeedTreatment)
Description copied from class: FoWordSequenceContent
Returns the number of chars in this object after linefeed-treatment is applied. The linefeed-treatment is applied after white-space-treatment, so this method shows the effect of both of those properties.

Overrides:
linefeedTreatmentLength in class FoWordSequenceContent
Parameters:
whiteSpaceTreatment - The white-space-treatment to be used in evaluation.
linefeedTreatment - The linefeed-treatment to be used in evaluation.
Returns:
The number of chars in this object after linefeed-treatment is applied.

linefeedTreatmentCharAt

public char linefeedTreatmentCharAt(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment,
                                    org.axsl.common.value.LinefeedTreatment linefeedTreatment,
                                    int linefeedTreatmentIndex)
Description copied from class: FoWordSequenceContent
Returns the char at a given index after linefeed-treatment is applied. The linefeed-treatment is applied after white-space-treatment, so this method shows the effect of both of those properties.

Overrides:
linefeedTreatmentCharAt in class FoWordSequenceContent
Parameters:
whiteSpaceTreatment - The white-space-treatment to be used in evaluation.
linefeedTreatment - The linefeed-treatment to be used in evaluation.
linefeedTreatmentIndex - The index into the chars in this instance, after linefeed-treatment is applied.
Returns:
The char at a given index after white-space-treatment is applied.

textTransformCharAt

public char textTransformCharAt(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment,
                                org.axsl.common.value.LinefeedTreatment linefeedTreatment,
                                org.axsl.common.value.TextTransform textTransform,
                                int textTransformIndex)
Description copied from class: FoWordSequenceContent
Returns the char at a given index after text-transform is applied. The text-transform is applied after linefeed-treatment, which is applied after white-space-treatment, so this method shows the effect of all of those properties.

Specified by:
textTransformCharAt in class FoWordSequenceContent
Parameters:
whiteSpaceTreatment - The white-space-treatment to be used in evaluation.
linefeedTreatment - The linefeed-treatment to be used in evaluation.
textTransform - The text-transform to be used in evaluation.
textTransformIndex - The index into the chars in this instance, after text-transform is applied.
Returns:
The char at a given index after text-transform is applied.

whiteSpaceCollapseLength

public int whiteSpaceCollapseLength(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment,
                                    org.axsl.common.value.LinefeedTreatment linefeedTreatment,
                                    org.axsl.common.value.TextTransform textTransform,
                                    boolean isWhiteSpaceCollapse)
Description copied from class: FoWordSequenceContent
Returns the number of chars in this object after white-space-collapse is applied. The white-space-collapse is applied after text-transform is applied, which is applied after linefeed-treatment, which is applied after white-space-treatment, so this method shows the effect of all of those properties.

Overrides:
whiteSpaceCollapseLength in class FoWordSequenceContent
Parameters:
whiteSpaceTreatment - The white-space-treatment to be used in evaluation.
linefeedTreatment - The linefeed-treatment to be used in evaluation.
textTransform - The text-transform to be used in evaluation.
isWhiteSpaceCollapse - The white-space-collapse to be used in evaluation.
Returns:
The number of chars in this object after white-space-collapse is applied.

whiteSpaceCollapseCharAt

public char whiteSpaceCollapseCharAt(org.axsl.common.value.WhiteSpaceTreatment whiteSpaceTreatment,
                                     org.axsl.common.value.LinefeedTreatment linefeedTreatment,
                                     org.axsl.common.value.TextTransform textTransform,
                                     boolean isWhiteSpaceCollapse,
                                     int whiteSpaceCollapseIndex)
Description copied from class: FoWordSequenceContent
Returns the char at a given index after white-space-collapse is applied. The white-space-collapse is applied after text-transform is applied, which is applied after linefeed-treatment, which is applied after white-space-treatment, so this method shows the effect of all of those properties.

Overrides:
whiteSpaceCollapseCharAt in class FoWordSequenceContent
Parameters:
whiteSpaceTreatment - The white-space-treatment to be used in evaluation.
linefeedTreatment - The linefeed-treatment to be used in evaluation.
textTransform - The text-transform to be used in evaluation.
isWhiteSpaceCollapse - The white-space-collapse to be used in evaluation.
whiteSpaceCollapseIndex - The index into the chars in this instance, after white-space-collapse is applied.
Returns:
The char at a given index after white-space-collapse is applied.

toString

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


Copyright © 2017. All rights reserved.