uk.ac.man.bioinf.sequence.group
Interface SequenceGroup

All Known Subinterfaces:
GappedSequenceGroup
All Known Implementing Classes:
AbstractGappedSequenceGroup

public interface SequenceGroup

SequenceGroup.java This interface defines a SequenceGroup that is capable of storing a collection of sequences. It would usually be expected that the sequences in the group would usually have something in common with each other, being for instance some of the members of a SequenceAlignment, although this is not required. Created: Thu Jun 1 18:09:32 2000

Version:
$Id: SequenceGroup.java,v 1.4 2001/04/11 17:04:43 lord Exp $
Author:
Phillip Lord

Method Summary
 void addSequenceToGroup(Sequence seq)
          Adds a sequence to this group
 void clearSequences()
          Empty the group of sequences
 boolean containsSequence(Sequence seq)
          Does this group contain the sequence
 int getNumberSequences()
          Return the number of sequences in this group.
 Sequence[] getSequences()
          Get all the sequences in this group.
 Iterator iterator()
          Returns an iterator of all the sequences.
 void removeSequenceFromGroup(Sequence seq)
          Removes a sequence from this group
 

Method Detail

addSequenceToGroup

public void addSequenceToGroup(Sequence seq)
Adds a sequence to this group

Parameters:
seq - the sequence

removeSequenceFromGroup

public void removeSequenceFromGroup(Sequence seq)
Removes a sequence from this group

Parameters:
seq - the sequence

containsSequence

public boolean containsSequence(Sequence seq)
Does this group contain the sequence

Parameters:
seq - the sequence
Returns:
true if containined

getSequences

public Sequence[] getSequences()
Get all the sequences in this group.

Returns:

clearSequences

public void clearSequences()
Empty the group of sequences


getNumberSequences

public int getNumberSequences()
Return the number of sequences in this group.

Returns:
the number

iterator

public Iterator iterator()
Returns an iterator of all the sequences. This should be fail fast if the group is modified whilst the iterator is being used.

Returns: