org.biojava.bio.program.homologene
Class SimpleOrthoPair

java.lang.Object
  extended by org.biojava.bio.program.homologene.SimpleOrthoPair
All Implemented Interfaces:
OrthoPair

public class SimpleOrthoPair
extends Object
implements OrthoPair

A no-frills implementation of the OrthoPair interface

Author:
David Huen

Constructor Summary
SimpleOrthoPair(Orthologue first, Orthologue second, SimilarityType type, double percentIdentity)
          constructor for the computed form of an orthology relationship.
SimpleOrthoPair(Orthologue first, Orthologue second, String ref)
          constructor for the curated form of an orthology relationship
 
Method Summary
 boolean equals(Object o)
           
 Orthologue getFirstOrthologue()
          gets the first orthologue in the orthology relationship.
 double getPercentIdentity()
          get percentage identity.
 String getRef()
          get reference to evidence for orthology.
 Orthologue getSecondOrthologue()
          gets the first orthologue in the orthology relationship.
 SimilarityType getSimilarity()
          gets the second orthologue in the orthology relationship.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SimpleOrthoPair

public SimpleOrthoPair(Orthologue first,
                       Orthologue second,
                       SimilarityType type,
                       double percentIdentity)
constructor for the computed form of an orthology relationship.


SimpleOrthoPair

public SimpleOrthoPair(Orthologue first,
                       Orthologue second,
                       String ref)
constructor for the curated form of an orthology relationship

Method Detail

getFirstOrthologue

public Orthologue getFirstOrthologue()
Description copied from interface: OrthoPair
gets the first orthologue in the orthology relationship.

I agree that this access route is somewhat sucky for a symmetric relationship but I'd hate returning a Set of orthologues more and all the fiddling would require.

Specified by:
getFirstOrthologue in interface OrthoPair

getSecondOrthologue

public Orthologue getSecondOrthologue()
Description copied from interface: OrthoPair
gets the first orthologue in the orthology relationship. This will be the one with the lower TaxonID.

Specified by:
getSecondOrthologue in interface OrthoPair

getSimilarity

public SimilarityType getSimilarity()
Description copied from interface: OrthoPair
gets the second orthologue in the orthology relationship. This will be the one with the higher TaxonID.

Specified by:
getSimilarity in interface OrthoPair

getPercentIdentity

public double getPercentIdentity()
Description copied from interface: OrthoPair
get percentage identity.

Specified by:
getPercentIdentity in interface OrthoPair

getRef

public String getRef()
Description copied from interface: OrthoPair
get reference to evidence for orthology.

Specified by:
getRef in interface OrthoPair

equals

public boolean equals(Object o)
Overrides:
equals in class Object