com.compomics.util.interfaces
Interface Sequence

All Known Implementing Classes:
NucleotideSequenceImpl, AASequenceImpl

public interface Sequence

This interface defines the default behaviour of any kind of sequence with a certain mass - be it DNA, portein or something else.

Author:
Lennart Martens

Method Summary
 int getLength()
          This method reports on the length of the current sequence.
 double getMass()
          This method will return the mass for the sequence.
 java.lang.String getSequence()
          This method will retrieve the sequence.
 void setSequence(java.lang.String aSequence)
          This method will set the sequence.
 

Method Detail

setSequence

void setSequence(java.lang.String aSequence)
This method will set the sequence.
Note that most implementations will also allow you to set this via the constructor.

Parameters:
aSequence - String with the sequence.

getSequence

java.lang.String getSequence()
This method will retrieve the sequence.

Returns:
String with the sequence.

getMass

double getMass()
This method will return the mass for the sequence.

Returns:
double with the mass.

getLength

int getLength()
This method reports on the length of the current sequence.

Returns:
int with the length of the sequence.


Copyright © 2011. All Rights Reserved.