|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectde.fzi.kadmos.api.ForwardingCorrespondence<T>
T - Type of corresponding entities.public abstract class ForwardingCorrespondence<T extends OWLEntity>
Abstract wrapper class for an Correspondence following the
Decorator pattern.
The class can be extended and additional functionality can be added without
accidentally changing the behaviour of the wrapped alignment implementation.
Note that the class is serialisable, thus extending classes must take care of proper serialisation and deserialisation of extra fields added. Care must also be taken if the wrapped alignment is not serialisable.
Extending classes should override equals as follows:
public boolean equals( Object other ) {
if( !(other instanceof MyExtension) )
return false;
MyExtension otherAlignment = (MyExtension) other;
return super.equals( otherAlignment.alignment ) && ...
}
where ... is supposed to perform additional checks regarding the extension.
Extending classes should not forget to override the hashCode function and the
clone function.
| Field Summary | |
|---|---|
protected Correspondence<? extends OWLEntity> |
correspondence
Wrapped correspondence object. |
| Constructor Summary | |
|---|---|
protected |
ForwardingCorrespondence(Correspondence<? extends OWLEntity> corr)
Creates a new instance that wraps another correspondence. |
| Method Summary | |
|---|---|
ForwardingCorrespondence<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 confidence)
Sets the confidence of this correspondence. |
String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
protected Correspondence<? extends OWLEntity> correspondence
| Constructor Detail |
|---|
protected ForwardingCorrespondence(Correspondence<? extends OWLEntity> corr)
corr - The correspondence to be wrapped by this object.| Method Detail |
|---|
public ForwardingCorrespondence<T> clone()
Correspondence
clone in interface Correspondence<T extends OWLEntity>clone in class Objectpublic boolean equals(Object other)
equals in class Objectpublic int hashCode()
hashCode in class Objectpublic String toString()
toString in class Objectpublic double getConfidence()
Correspondence
getConfidence in interface Correspondence<T extends OWLEntity>public T getEntity1()
Correspondence
getEntity1 in interface Correspondence<T extends OWLEntity>public T getEntity2()
Correspondence
getEntity2 in interface Correspondence<T extends OWLEntity>public void setConfidence(double confidence)
Correspondence
setConfidence in interface Correspondence<T extends OWLEntity>confidence - The confidence value.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||