com.jspell.domain
Class JSpellWordBundle

java.lang.Object
  extended by com.jspell.domain.JSpellWordBundle

public class JSpellWordBundle
extends java.lang.Object

This class encapsulates information about a word that is being spell checked. It contains the word, the position of the word, whether the parser determined that this word should be capitalized or not. This class also contains numerous String based methods operating on the word contained in instances of this object.


Constructor Summary
JSpellWordBundle(java.lang.String word, int position, boolean specialCase, boolean forceUpperCase)
          Construct a JSpellWordBundle with the word, its position, whether it should be proper, and whether to force upper case suggestions when checking for errors.
JSpellWordBundle(java.lang.String word, int position, boolean specialCase, boolean forceUpperCase, boolean ignoreCheck)
          Construct a JSpellWordBundle with the word, its position, whether it should be proper, whether to force upper case suggestions when checking for errors, and whether this JSpellWordBundle should be ignored when spell checking.
 
Method Summary
 boolean getForceUpperCase()
          Return value of getForceUpperCase.
 boolean getIgnoreCheck()
          Return value of ignoreCheck.
 java.lang.String getLower_FirstCharOnly()
          Return the word with the first character as lower case.
static java.lang.String getLower_FirstCharOnly(java.lang.String original)
          Static - Return the word with the first character as lower case.
 java.lang.String getLower()
          Return the word as lower case.
 int getPosition()
          Return the position.
 java.lang.String getProper()
          Return the word with the first character capitalized.
static java.lang.String getProper(java.lang.String original)
          Static - Return the word with the first character capitalized.
 boolean getSpecialCase()
          Return true if word should be upper case.
static java.lang.String getUpper_FirstCharOnly(java.lang.String original)
          Static - Return the word with the first character as upper case.
 boolean getUpperCase()
          Return whether word is all upper case
 java.lang.String getWord()
          Return the word.
 boolean isProper()
          Return true if first character is upper case.
static boolean isProper(java.lang.String original)
          Return true if first character is upper case.
 void setForceUpperCase(boolean forceUpperCase)
          Set the value of forceUpperCase.
 void setSpecialCase(boolean specialCase)
          Set the value of specialCase.
 void setUpperCase(boolean upperCase)
          Set the value of upperCase.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JSpellWordBundle

public JSpellWordBundle(java.lang.String word,
                        int position,
                        boolean specialCase,
                        boolean forceUpperCase)
Construct a JSpellWordBundle with the word, its position, whether it should be proper, and whether to force upper case suggestions when checking for errors.

Parameters:
word - a String.
position - an int.
specialCase - true or false
forceUpperCase - true or false

JSpellWordBundle

public JSpellWordBundle(java.lang.String word,
                        int position,
                        boolean specialCase,
                        boolean forceUpperCase,
                        boolean ignoreCheck)
Construct a JSpellWordBundle with the word, its position, whether it should be proper, whether to force upper case suggestions when checking for errors, and whether this JSpellWordBundle should be ignored when spell checking.

Parameters:
word - a String.
position - an int.
specialCase - true or false.
forceUpperCase - true or false.
ignoreCheck - true or false.
Method Detail

getIgnoreCheck

public final boolean getIgnoreCheck()
Return value of ignoreCheck.

Returns:
true or false.

getForceUpperCase

public final boolean getForceUpperCase()
Return value of getForceUpperCase.

Returns:
true or false.

setForceUpperCase

public final void setForceUpperCase(boolean forceUpperCase)
Set the value of forceUpperCase. See JSpellDictionary for more information.

Parameters:
forceUpperCase - true or false.

getWord

public final java.lang.String getWord()
Return the word.

Returns:
a String.

getLower

public final java.lang.String getLower()
Return the word as lower case.

Returns:
a String.

isProper

public final boolean isProper()
Return true if first character is upper case.

Returns:
true or false.

isProper

public static final boolean isProper(java.lang.String original)
Return true if first character is upper case.

Parameters:
original - a String.
Returns:
true or false.

getProper

public final java.lang.String getProper()
Return the word with the first character capitalized.

Returns:
a String.

getProper

public static final java.lang.String getProper(java.lang.String original)
Static - Return the word with the first character capitalized.

Parameters:
original - a String.
Returns:
a String.

getLower_FirstCharOnly

public final java.lang.String getLower_FirstCharOnly()
Return the word with the first character as lower case.

Returns:
a String.

getLower_FirstCharOnly

public static final java.lang.String getLower_FirstCharOnly(java.lang.String original)
Static - Return the word with the first character as lower case.

Parameters:
original - a String.
Returns:
a String.

getUpper_FirstCharOnly

public static final java.lang.String getUpper_FirstCharOnly(java.lang.String original)
Static - Return the word with the first character as upper case.

Parameters:
original - a String.
Returns:
a String.

getSpecialCase

public final boolean getSpecialCase()
Return true if word should be upper case.

Returns:
true or false.

getUpperCase

public final boolean getUpperCase()
Return whether word is all upper case

Returns:
true or false.

setSpecialCase

public final void setSpecialCase(boolean specialCase)
Set the value of specialCase.

Parameters:
specialCase - true or false.

setUpperCase

public final void setUpperCase(boolean upperCase)
Set the value of upperCase.

Parameters:
upperCase - true or false.

getPosition

public final int getPosition()
Return the position.

Returns:
an int.


JSpell SDK - Spell Checker for the Java ™ Platform
Copyright © 2009 Page Scholar Inc, All Rights Reserved - http://www.jspell.com