Mobios v0.91

mobios.type
Class TandemSpectra

java.lang.Object
  extended by mobios.type.IndexObject
      extended by mobios.type.DoubleVector
          extended by mobios.type.Spectra
              extended by mobios.type.TandemSpectra
All Implemented Interfaces:
Externalizable, Serializable, Comparable<IndexObject>

public class TandemSpectra
extends Spectra

TandemSpectra represents a given spectra and its attached precursor mass.

Version:
2004.11.29
Author:
Smriti Ramakrishnan, Willard
See Also:
Serialized Form

Constructor Summary
TandemSpectra()
          Necessary for readExternal() and writeExternal().
TandemSpectra(mobios.db.Table table, int rowID, double precursorMass, double[] spectra)
          Main constructor using an array of doubles to define the Spectra.
TandemSpectra(mobios.db.Table table, int rowID, double precursorMass, String spectra)
          Constructs a TandemSpectra object from a {@link String representing the tandem spectra.
 
Method Summary
 int compareTo(IndexObject oThat)
           
 boolean equals(Object that)
           
 IndexObject[] expand()
          This method is necessary to implement bucketing, so that similar objects are only stored once in the database.
 double getPrecursorMass()
           
 int hashCode()
           
 void readExternal(ObjectInput in)
           
 String toString()
          all implementing classes are required to override toString
 void writeExternal(ObjectOutput out)
           
 
Methods inherited from class mobios.type.Spectra
getMax, getMin, sortAsc
 
Methods inherited from class mobios.type.DoubleVector
compareTo, getData, size
 
Methods inherited from class mobios.type.IndexObject
getRowID, setRowID, setRowIDLength
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

TandemSpectra

public TandemSpectra()
Necessary for readExternal() and writeExternal().


TandemSpectra

public TandemSpectra(mobios.db.Table table,
                     int rowID,
                     double precursorMass,
                     String spectra)
Constructs a TandemSpectra object from a {@link String representing the tandem spectra. The only difference between a Spectra and a TandemSpectra is that a TandemSpectra includes the precursor mass.

Parameters:
table - the corresponding TandemSpectraTable for this object
rowID - the rowID in the TandemSpectraTable.
precursorMass - the precursor mass of the spectra itself.
spectra - a space-seperated String representation of a single fragmentation spectra.

TandemSpectra

public TandemSpectra(mobios.db.Table table,
                     int rowID,
                     double precursorMass,
                     double[] spectra)
Main constructor using an array of doubles to define the Spectra.

Parameters:
table - the corresponding TandemSpectraTable for this object
rowID - the rowID in the TandemSpectraTable.
precursorMass - the precursor mass of the spectra itself.
spectra -
Method Detail

getPrecursorMass

public double getPrecursorMass()
Returns:
the precursor mass for this tandem spectra.

expand

public IndexObject[] expand()
Description copied from class: IndexObject
This method is necessary to implement bucketing, so that similar objects are only stored once in the database. If you do not want to implement bucketing for your object, you can just return an array of length one containing this object.

Overrides:
expand in class Spectra
Returns:
an array of IndexObjects

compareTo

public int compareTo(IndexObject oThat)
Specified by:
compareTo in interface Comparable<IndexObject>
Overrides:
compareTo in class DoubleVector

equals

public boolean equals(Object that)
Overrides:
equals in class DoubleVector

hashCode

public int hashCode()
Overrides:
hashCode in class DoubleVector

toString

public String toString()
Description copied from class: IndexObject
all implementing classes are required to override toString

Overrides:
toString in class DoubleVector

readExternal

public void readExternal(ObjectInput in)
                  throws ClassNotFoundException,
                         IOException
Specified by:
readExternal in interface Externalizable
Overrides:
readExternal in class DoubleVector
Throws:
ClassNotFoundException
IOException

writeExternal

public void writeExternal(ObjectOutput out)
                   throws IOException
Specified by:
writeExternal in interface Externalizable
Overrides:
writeExternal in class DoubleVector
Throws:
IOException

Mobios v0.91

(C) 2002 - 2006 The MoBIoS Group