The Octet Molecular Representation Framework v0.8.2

net.sf.octet.collection
Interface PaddleWheelCollection

All Known Subinterfaces:
Configuration, Conformation
All Known Implementing Classes:
BasicConfiguration, BasicConformation, BasicPaddleWheelCollection

public interface PaddleWheelCollection

PaddleWheelCollection represents an immutable group of PaddleWheels. Any PaddlesWheels may be present, but null is disallowed. PaddleWheels from different Molecules may or not be present, depending on implementation.

PaddleWheelCollection 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
See Also:
"Immutable Pattern (Grand98)"

Method Summary
 boolean containsPaddleWheel(Atom source, Atom target)
          Returns true if a PaddleWheel can be found containing an axis with source as its source and target as its target.
 boolean containsPaddleWheel(PaddleWheel paddleWheel)
          Returns true if the specified PaddleWheel is contained in this collection, and false otherwise.
 int countPaddleWheels()
          Returns the number of PaddleWheels contained in this collection.
 PaddleWheel getPaddleWheel(Atom source, Atom target)
          Returns the PaddleWheel containing an axis that consists of source and target.
 PaddleWheel getPaddleWheel(int index)
          Returns the PaddleWheel located at the specified zero-based index.
 int getPaddleWheelIndex(PaddleWheel paddleWheel)
          Returns the zero-based index of the specified PaddleWheel.
 PaddleWheelIterator iteratePaddleWheels()
          Returns an iterator over all PaddleWheels in this collection.
 PaddleWheel[] toPaddleWheelArray()
          Returns a copy of the PaddleWheels contained in this collection as an array.
 

Method Detail

containsPaddleWheel

public boolean containsPaddleWheel(PaddleWheel paddleWheel)
Returns true if the specified PaddleWheel is contained in this collection, and false otherwise.

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

countPaddleWheels

public int countPaddleWheels()
Returns the number of PaddleWheels contained in this collection.

Returns:
the number of PaddleWheels in this collection

getPaddleWheelIndex

public int getPaddleWheelIndex(PaddleWheel paddleWheel)
Returns the zero-based index of the specified PaddleWheel.

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

getPaddleWheel

public PaddleWheel getPaddleWheel(int index)
Returns the PaddleWheel located at the specified zero-based index.

Parameters:
index - the index
Returns:
the PaddleWheel 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 PaddleWheels

containsPaddleWheel

public boolean containsPaddleWheel(Atom source,
                                   Atom target)
Returns true if a PaddleWheel can be found containing an axis with source as its source and target as its target.

Parameters:
source - the source Atom of the axis
target - the target Atom of the axis
Returns:
true if the PaddleWheel could be found, or false otherwise

getPaddleWheel

public PaddleWheel getPaddleWheel(Atom source,
                                  Atom target)
Returns the PaddleWheel containing an axis that consists of source and target.

Parameters:
source - the source Atom
target - the target Atom
Returns:
the PaddleWheel accociated with the GammaSequence having source and target as endpoints
Throws:
NoSuchPaddleWheelException - if the PaddleWheel could not be found

iteratePaddleWheels

public PaddleWheelIterator iteratePaddleWheels()
Returns an iterator over all PaddleWheels in this collection.

Returns:
an iterator over all PaddleWheels in this collection

toPaddleWheelArray

public PaddleWheel[] toPaddleWheelArray()
Returns a copy of the PaddleWheels 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 PaddleWheel array for this collection

The Octet Molecular Representation Framework v0.8.2