de.unibi.techfak.jpredictor.operator
Class ScoredSequenceStruct

java.lang.Object
  extended by de.unibi.techfak.jpredictor.operator.ScoredSequenceStruct
All Implemented Interfaces:
java.lang.Cloneable, java.lang.Comparable

public class ScoredSequenceStruct
extends java.lang.Object
implements java.lang.Comparable, java.lang.Cloneable

Class for holding the score of one sequence window on one sequence. It is used by the method scoreSequences() of interface IOperator.
Within this class are some possible information stored, just like the sequence number (e.g. within a file), start and end of a sequence window and of course the corresponding score. All fields are public for better access.


Field Summary
 double score
          The score of the sequence window on the sequence.
 int seqEnd
          The end of the sequence window on the sequence.
 int seqNumber
          The number of the sequences actually processed.
 int seqStart
          The start of the sequence window on the sequence.
 
Constructor Summary
ScoredSequenceStruct()
          Simple constructor.
ScoredSequenceStruct(int seqNumber, int seqStart, int seqEnd, double score)
          Simple constructor.
 
Method Summary
 java.lang.Object clone()
           
 int compareTo(java.lang.Object arg)
           
 java.lang.String out()
          Constructs the following String from this struct: seqNumber:seqStart-seqEnd:score
 void reset()
          Sets seqNumber, seqStart and seqEnd to -1, score to Double.NaN.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

seqNumber

public int seqNumber
The number of the sequences actually processed.


seqStart

public int seqStart
The start of the sequence window on the sequence.


seqEnd

public int seqEnd
The end of the sequence window on the sequence.


score

public double score
The score of the sequence window on the sequence.

Constructor Detail

ScoredSequenceStruct

public ScoredSequenceStruct()
Simple constructor. Calls reset().


ScoredSequenceStruct

public ScoredSequenceStruct(int seqNumber,
                            int seqStart,
                            int seqEnd,
                            double score)
Simple constructor. Sets all fields within this class.

Parameters:
seqNumber -
seqStart -
seqEnd -
score -
Method Detail

compareTo

public int compareTo(java.lang.Object arg)
Specified by:
compareTo in interface java.lang.Comparable

toString

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

clone

public java.lang.Object clone()
Overrides:
clone in class java.lang.Object

out

public java.lang.String out()
Constructs the following String from this struct: seqNumber:seqStart-seqEnd:score

Returns:
A string representing this object.

reset

public void reset()
Sets seqNumber, seqStart and seqEnd to -1, score to Double.NaN.