The Octet Molecular Representation Framework v0.8.2

net.sf.octet.collection
Interface GammaSequenceCollection

All Known Subinterfaces:
Conformation
All Known Implementing Classes:
BasicConformation, BasicGammaSequenceCollection

public interface GammaSequenceCollection

An immutable group of GammaSequences. Any GammaSequences may be present, but null is disallowed. GammaSequences from different Molecules may or not be present, depending on implementation.

GammaSequenceCollection places the additional restriction on implementors that all methods are consistent - they can be assumed to return the same results throughout the Object's lifetime.

Author:
Richard Apodaca

Method Summary
 boolean containsGammaSequence(Atom source, Atom target)
          Returns true if a GammaSequence containing an axis with source as its source and target as its target can be found, or false otherwise.
 boolean containsGammaSequence(GammaSequence sequence)
          Returns true if the specified GammaSequence is contained in this collection, and false otherwise.
 int countGammaSequences()
          Returns the number of GammaSequences contained in this collection.
 GammaSequence getGammaSequence(Atom source, Atom target)
          Returns the GammaSequence having source and target axis Atoms.
 GammaSequence getGammaSequence(int index)
          Returns the GammaSequence located at the specified zero-based index.
 int getGammaSequenceIndex(GammaSequence sequence)
          Returns the zero-based index of the specified GammaSequence.
 GammaSequenceIterator iterateGammaSequences()
          Returns an iterator over all GammaSequences in this collection.
 GammaSequence[] toGammaSequenceArray()
          Returns a copy of the GammaSequences contained in this collection as an array.
 

Method Detail

containsGammaSequence

public boolean containsGammaSequence(GammaSequence sequence)
Returns true if the specified GammaSequence is contained in this collection, and false otherwise.

Parameters:
sequence - the PaddleWheel
Returns:
true if contained, false otherwise

countGammaSequences

public int countGammaSequences()
Returns the number of GammaSequences contained in this collection.

Returns:
the number of GammaSequences in this collection

getGammaSequenceIndex

public int getGammaSequenceIndex(GammaSequence sequence)
Returns the zero-based index of the specified GammaSequence.

Parameters:
sequence - the GammaSequence
Returns:
the index of the GammaSequence, or -1 if this collection does not contain sequence

getGammaSequence

public GammaSequence getGammaSequence(int index)
Returns the GammaSequence located at the specified zero-based index.

Parameters:
index - the index
Returns:
the GammaSequence at index, or null if the index is invalid
Throws:
java.lang.IndexOutOfBoundsException - if index is less than zero or greater than or equal to the number of GammaSequences

getGammaSequence

public GammaSequence getGammaSequence(Atom source,
                                      Atom target)
Returns the GammaSequence having source and target axis Atoms.

Parameters:
source - the source Atom
target - the target Atom
Returns:
the GammaSequence having source and target as axis Atoms
Throws:
NoSuchGammaSequenceException - if the GammaSequence could not be found

containsGammaSequence

public boolean containsGammaSequence(Atom source,
                                     Atom target)
Returns true if a GammaSequence containing an axis with source as its source and target as its target can be found, or false otherwise.

Parameters:
source - the axis source Atom
target - the axid target Atom
Returns:
true if the GammaSequence was found, or false otherwise

iterateGammaSequences

public GammaSequenceIterator iterateGammaSequences()
Returns an iterator over all GammaSequences in this collection.

Returns:
an iterator over all GammaSequences in this collection

toGammaSequenceArray

public GammaSequence[] toGammaSequenceArray()
Returns a copy of the GammaSequences contained in this collection as an array. The resulting array may be modified without changing the state of this collection.

Returns:
a copy of the GammaSequence array for this collection

The Octet Molecular Representation Framework v0.8.2