net.sourceforge.javamatch.engine
Class ResultItem

java.lang.Object
  extended bynet.sourceforge.javamatch.engine.ResultItem
All Implemented Interfaces:
java.lang.Comparable

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

Class ResultItem contains the match result of a single object and its match value


Field Summary
 java.lang.Object matchedObject
          The matched object
 float matchValue
          The match value of this ResultItem
 
Constructor Summary
ResultItem()
          Creates a new, empty, ResultItem
ResultItem(java.lang.Object matchedObject, float matchValue)
          Creates a new ResultItem with the given matched object and match value
 
Method Summary
 int compareTo(java.lang.Object otherObject)
          Compares this result item with the given other item
 java.lang.Object getMatchedObject()
          Returns the matched object
 float getMatchValue()
          Returns the match value of this ResultItem
 void setMatchedObject(java.lang.Object matchedObject)
          Sets the matched object
 void setMatchValue(float matchValue)
          Sets the match value of this ResultItem
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

matchValue

public float matchValue
The match value of this ResultItem


matchedObject

public java.lang.Object matchedObject
The matched object

Constructor Detail

ResultItem

public ResultItem()
Creates a new, empty, ResultItem


ResultItem

public ResultItem(java.lang.Object matchedObject,
                  float matchValue)
Creates a new ResultItem with the given matched object and match value

Parameters:
matchedObject - the object that was matched
matchValue - the return value of the matching of the matched object
Method Detail

setMatchValue

public void setMatchValue(float matchValue)
Sets the match value of this ResultItem

Parameters:
matchValue - the return value of the matching of the matched object

getMatchValue

public float getMatchValue()
Returns the match value of this ResultItem

Returns:
the return value of the matching of the matched object

setMatchedObject

public void setMatchedObject(java.lang.Object matchedObject)
Sets the matched object

Parameters:
matchedObject - the object that was matched

getMatchedObject

public java.lang.Object getMatchedObject()
Returns the matched object

Returns:
the object that was matched

compareTo

public int compareTo(java.lang.Object otherObject)
Compares this result item with the given other item

Specified by:
compareTo in interface java.lang.Comparable
Parameters:
otherObject - the other object, agains which this object is compared

Hosted by SourceForge.net/