com.wallstreetwise.core.util
Class ScoredSuggestion

java.lang.Object
  extended by com.wallstreetwise.core.util.ScoredSuggestion
All Implemented Interfaces:
java.lang.Comparable

public class ScoredSuggestion
extends java.lang.Object
implements java.lang.Comparable

The ScoredSuggestion class implements Comparable and contains a word along with its equivalency ranking.


Constructor Summary
ScoredSuggestion(java.lang.String suggestion, double score)
          Create a ScoredSuggestion object.
 
Method Summary
 int compareTo(java.lang.Object o)
          NOTE: This method returns comparison values in DESCENDING order since this format is most acceptable to the user, i.e., show words with highest similarity score first in the suggestions list.
 double getScore()
          Return the equivalency ranking.
 java.lang.String getSuggestion()
          Return the suggestion String.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ScoredSuggestion

public ScoredSuggestion(java.lang.String suggestion,
                        double score)
Create a ScoredSuggestion object.

Parameters:
suggestion - a String representing a single word.
score - a double representing the equivalency score.
Method Detail

compareTo

public final int compareTo(java.lang.Object o)
NOTE: This method returns comparison values in DESCENDING order since this format is most acceptable to the user, i.e., show words with highest similarity score first in the suggestions list.

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
o - an Object.
Returns:
an int.

getSuggestion

public final java.lang.String getSuggestion()
Return the suggestion String.

Returns:
a String.

getScore

public final double getScore()
Return the equivalency ranking.

Returns:
a double.


JSpell SDK 2004 Spell Checker for the Java (tm) Platform
Copyright © 1996-2005 The Solution Cafe Inc, All Rights Reserved - http://www.thesolutioncafe.com