serf.data
Class Record

java.lang.Object
  extended by serf.data.Record
Direct Known Subclasses:
PackageRecord

public class Record
extends java.lang.Object

Records are the fundamental object operated on by all of the SERF algorithms. Records can contain attributies and confidences. Not all SERF algorithms make use of Record confidences.


Constructor Summary
Record(double confidence, java.util.Map<java.lang.String,Attribute> attributes)
           
Record(double confidence, java.util.Set<Attribute> attributeSet)
           
 
Method Summary
 int calculateHashCode()
           
 boolean equals(java.lang.Object o)
          value based record equality.
 Attribute getAttribute(java.lang.String type)
           
 java.util.Map<java.lang.String,Attribute> getAttributes()
           
 double getConfidence()
           
 int getID()
           
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Record

public Record(double confidence,
              java.util.Set<Attribute> attributeSet)

Record

public Record(double confidence,
              java.util.Map<java.lang.String,Attribute> attributes)
Method Detail

getID

public int getID()

getConfidence

public double getConfidence()

getAttributes

public java.util.Map<java.lang.String,Attribute> getAttributes()

getAttribute

public Attribute getAttribute(java.lang.String type)

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

equals

public boolean equals(java.lang.Object o)
value based record equality.

Overrides:
equals in class java.lang.Object
Parameters:
o - an object representing another record.
Returns:
true if two records contain the same confidence value and attribute set.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

calculateHashCode

public int calculateHashCode()