de.fzi.kadmos.api.impl
Class SimpleCorrespondence<T extends OWLEntity>

java.lang.Object
  extended by de.fzi.kadmos.api.impl.SimpleCorrespondence<T>
All Implemented Interfaces:
Correspondence<T>, Evaluable, Serializable, Cloneable

public class SimpleCorrespondence<T extends OWLEntity>
extends Object
implements Correspondence<T>, Serializable

Default implementation of a correspondence. This serialisable implementation realises a simple correspondence with confidence values between 0 and 1. It also provides default implementations for equals() and hashCode().

When cloning this object, the clone will reference the same entities as this object, i.e. referenced entites will not be cloned recursively.

Since:
1.0.0
Version:
1.2.1
Author:
Juergen Bock
See Also:
Serialized Form

Constructor Summary
protected SimpleCorrespondence(T ent1, T ent2, double conf)
          Creates a correspondence between to entites with specified confidence.
 
Method Summary
 SimpleCorrespondence<T> clone()
          Creates a clone of this correspondence.
 boolean equals(Object other)
          
 double getConfidence()
          Gets the confidence of this correspondence.
 T getEntity1()
          Gets the first entity of this correspondence.
 T getEntity2()
          Gets the second entity of this correspondence.
 int hashCode()
          
 void setConfidence(double conf)
          Sets the confidence of this correspondence.
 String toString()
          
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleCorrespondence

protected SimpleCorrespondence(T ent1,
                               T ent2,
                               double conf)
Creates a correspondence between to entites with specified confidence.

Parameters:
ent1 - Entity 1
ent2 - Entity 2
conf - Confidence value (will be cropped to 0 < conf < 1)
Since:
1.0.0
Method Detail

getConfidence

public double getConfidence()
Gets the confidence of this correspondence. The confidence is a value between 0 and 1.

Specified by:
getConfidence in interface Correspondence<T extends OWLEntity>
Returns:
The confidence value.

getEntity1

public T getEntity1()
Gets the first entity of this correspondence. null values are permitted.

Specified by:
getEntity1 in interface Correspondence<T extends OWLEntity>
Returns:
Entity 1.

getEntity2

public T getEntity2()
Gets the second entity of this correspondence. null values are permitted.

Specified by:
getEntity2 in interface Correspondence<T extends OWLEntity>
Returns:
Entity 2.

setConfidence

public void setConfidence(double conf)
Sets the confidence of this correspondence. Values greater than 1 will be set to 1, values less than 0 will be set to 0.

Specified by:
setConfidence in interface Correspondence<T extends OWLEntity>
Parameters:
conf - The confidence value.

equals

public boolean equals(Object other)

Overrides:
equals in class Object

hashCode

public int hashCode()

Overrides:
hashCode in class Object

clone

public SimpleCorrespondence<T> clone()
Creates a clone of this correspondence.

Specified by:
clone in interface Correspondence<T extends OWLEntity>
Overrides:
clone in class Object
Returns:
Clone of this correspondence.

toString

public String toString()

Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.