org.biojava.bio.search
Class SimpleSeqSimilaritySearchHit

java.lang.Object
  |
  +--org.biojava.bio.search.SimpleSeqSimilaritySearchHit

public class SimpleSeqSimilaritySearchHit
extends java.lang.Object
implements SeqSimilaritySearchHit, java.lang.Cloneable

a simple implementation of interface SeqSimilaritySearchHit that takes care of all the housekeeping. Objects of this class are immutable.

Author:
Gerald Loeffler for the IMP

Constructor Summary
SimpleSeqSimilaritySearchHit(SeqSimilaritySearchResult searchResult, double score, double pValue, double eValue, java.lang.String sequenceID, java.util.List subHits)
          construct an immutable object from the values of all properties.
 
Method Summary
 java.lang.Object clone()
           
 boolean equals(java.lang.Object o)
           
 double getEValue()
          return the overall E-value of this hit.
 double getPValue()
          return the overall P-value of this hit.
 double getScore()
          return the overall score of this hit in the units defined by the search algorithm.
 SeqSimilaritySearchResult getSearchResult()
          return the ssequence similarity search result to which this sequence similarity search hit belongs.
 java.lang.String getSequenceID()
          the sequence identifier of this hit within the sequence database against which the search was performed.
 java.util.List getSubHits()
          return an unmodifiable view of the sub-hits list.
 int hashCode()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleSeqSimilaritySearchHit

public SimpleSeqSimilaritySearchHit(SeqSimilaritySearchResult searchResult,
                                    double score,
                                    double pValue,
                                    double eValue,
                                    java.lang.String sequenceID,
                                    java.util.List subHits)
construct an immutable object from the values of all properties.
Parameters:
searchResult - the search result of which this search hit is a part. Not null.
score - the overall score of this hit. This is a mandatory piece of information and may hence not be NaN.
pValue - the overall P-value of this hit. May be NaN.
eValue - the overall E-value of this hit. May be NaN.
sequenceID - the (unique) sequence identifier for this hit, valid within the sequence database against which this search was performed. Not null.
subHits - a List of SeqSimilaritySearchSubHit objects containing all sub-hits for this hit. Not null.
Method Detail

getSearchResult

public SeqSimilaritySearchResult getSearchResult()
Description copied from interface: SeqSimilaritySearchHit
return the ssequence similarity search result to which this sequence similarity search hit belongs.
Specified by:
getSearchResult in interface SeqSimilaritySearchHit
Tags copied from interface: SeqSimilaritySearchHit
Returns:
the SeqSimilaritySearchResult object of which this object is a part. Never returns null.

getScore

public double getScore()
Description copied from interface: SeqSimilaritySearchHit
return the overall score of this hit in the units defined by the search algorithm.
Specified by:
getScore in interface SeqSimilaritySearchHit
Tags copied from interface: SeqSimilaritySearchHit
Returns:
the overall score of this hit. This is a mandatory piece of information and may hence not be NaN.

getPValue

public double getPValue()
Description copied from interface: SeqSimilaritySearchHit
return the overall P-value of this hit.
Specified by:
getPValue in interface SeqSimilaritySearchHit
Tags copied from interface: SeqSimilaritySearchHit
Returns:
the overall P-value of this hit. This is an optional (but desired) piece of information and implementations of this interface may return NaN if a P-value is not available for this hit.

getEValue

public double getEValue()
Description copied from interface: SeqSimilaritySearchHit
return the overall E-value of this hit.
Specified by:
getEValue in interface SeqSimilaritySearchHit
Tags copied from interface: SeqSimilaritySearchHit
Returns:
the overall E-value of this hit. This is an optional (but desired) piece of information and implementations of this interface may return NaN if an E-value is not available for this hit.

getSequenceID

public java.lang.String getSequenceID()
Description copied from interface: SeqSimilaritySearchHit
the sequence identifier of this hit within the sequence database against which the search was performed. Use getSearchResult().getSequenceDB().getSequence(id) to actually retrieve the sequence with this id.
Specified by:
getSequenceID in interface SeqSimilaritySearchHit
Tags copied from interface: SeqSimilaritySearchHit
Returns:
the (unique) sequence identifier for this hit, valid within the sequence database against which this search was performed. Never returns null.

getSubHits

public java.util.List getSubHits()
return an unmodifiable view of the sub-hits list.
Specified by:
getSubHits in interface SeqSimilaritySearchHit
Tags copied from interface: SeqSimilaritySearchHit
Returns:
a List of SeqSimilaritySearchSubHit objects containing all sub-hits for this hit. Never returns null and the List is guaranteed to contain at least 1 entry.

toString

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

equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

hashCode

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

clone

public java.lang.Object clone()
Specified by:
clone in interface SeqSimilaritySearchHit
Overrides:
clone in class java.lang.Object