The Octet Molecular Representation Framework v0.8.2

net.sf.octet.query
Class PaddleWheelInvertor

java.lang.Object
  extended bynet.sf.octet.query.PaddleWheelInvertor
All Implemented Interfaces:
HalfPlaneCollection, PaddleWheel

public class PaddleWheelInvertor
extends java.lang.Object
implements PaddleWheel

Inverts the polarity of the PaddleWheel that it decorates. PaddleWheelInvertor can be used, among other purposes, for comparing the PaddleWheels of a Conformation in which GammaSequences of opposite polarity are encountered.

Author:
Richard Apodaca
See Also:
"Decorator Pattern (GoF95)"

Constructor Summary
PaddleWheelInvertor(PaddleWheel wheel)
          Constructs a fully-functional PaddleWheelInvertor by decorating wheel.
 
Method Summary
 boolean containsHalfPlane(HalfPlane halfPlane)
          Returns true if the specified HalfPlane is contained in this collection, and false otherwise.
 int countHalfPlanes()
          Returns the number of HalfPlanes contained in this HalfPlane collection.
 AtomPair getAxis()
          Returns the AtomPair containing the central Atom as its source and the neighbor Atom as its target.
 HalfPlane getHalfPlane(int index)
          Returns the HalfPlane located at the specified zero-based index.
 int getHalfPlaneIndex(HalfPlane halfPlane)
          Returns the zero-based index of the specified Atom.
 HalfPlaneIterator iterateHalfPlanes()
          Returns an iterator over all HalfPlanes in this collection.
 HalfPlaneIterator iterateHalfPlanes(HalfPlane halfPlane)
          Returns an iterator over all HalfPlanes in this PaddleWheel starting from halfPlane in the forward (clockwise) sense.
 HalfPlaneIterator iterateHalfPlanesReverse(HalfPlane halfPlane)
          Returns an iterator over all HalfPlanes in this PaddleWheel starting from halfPlane in the reverse (anticlockwise) sense.
 HalfPlane[] toHalfPlaneArray()
          Returns a copy of the HalfPlanes contained in this collection as an array.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PaddleWheelInvertor

public PaddleWheelInvertor(PaddleWheel wheel)
Constructs a fully-functional PaddleWheelInvertor by decorating wheel.

Parameters:
wheel - the PaddleWheel that will be decorated and inverted
Method Detail

getAxis

public AtomPair getAxis()
Description copied from interface: PaddleWheel
Returns the AtomPair containing the central Atom as its source and the neighbor Atom as its target.

Specified by:
getAxis in interface PaddleWheel
Returns:
the AtomPair containing the central Atom as its source and the neighbor Atom as its target

iterateHalfPlanes

public HalfPlaneIterator iterateHalfPlanes(HalfPlane halfPlane)
Description copied from interface: PaddleWheel
Returns an iterator over all HalfPlanes in this PaddleWheel starting from halfPlane in the forward (clockwise) sense.

Specified by:
iterateHalfPlanes in interface PaddleWheel
Parameters:
halfPlane - the HalfPLane at which iteration will begin
Returns:
halfPlane an iterator over all HalfPlanes in this PaddleWheel starting from halfPlane

iterateHalfPlanesReverse

public HalfPlaneIterator iterateHalfPlanesReverse(HalfPlane halfPlane)
Description copied from interface: PaddleWheel
Returns an iterator over all HalfPlanes in this PaddleWheel starting from halfPlane in the reverse (anticlockwise) sense.

Specified by:
iterateHalfPlanesReverse in interface PaddleWheel
Parameters:
halfPlane - the HalfPLane at which iteration will begin
Returns:
halfPlane an iterator over all HalfPlanes in this PaddleWheel starting from halfPlane

containsHalfPlane

public boolean containsHalfPlane(HalfPlane halfPlane)
Description copied from interface: HalfPlaneCollection
Returns true if the specified HalfPlane is contained in this collection, and false otherwise.

Specified by:
containsHalfPlane in interface HalfPlaneCollection
Parameters:
halfPlane - the HalfPlane
Returns:
true if contained, false otherwise

countHalfPlanes

public int countHalfPlanes()
Description copied from interface: HalfPlaneCollection
Returns the number of HalfPlanes contained in this HalfPlane collection.

Specified by:
countHalfPlanes in interface HalfPlaneCollection
Returns:
the number of HalfPlanes in this collection

getHalfPlane

public HalfPlane getHalfPlane(int index)
Description copied from interface: HalfPlaneCollection
Returns the HalfPlane located at the specified zero-based index.

Specified by:
getHalfPlane in interface HalfPlaneCollection
Parameters:
index - the index
Returns:
the HalfPlane at index, or null if the index is invalid

getHalfPlaneIndex

public int getHalfPlaneIndex(HalfPlane halfPlane)
Description copied from interface: HalfPlaneCollection
Returns the zero-based index of the specified Atom.

Specified by:
getHalfPlaneIndex in interface HalfPlaneCollection
Parameters:
halfPlane - the halfPlane
Returns:
the index of the HalfPlane, or -1 if this collection does not contain halfPlane

iterateHalfPlanes

public HalfPlaneIterator iterateHalfPlanes()
Description copied from interface: HalfPlaneCollection
Returns an iterator over all HalfPlanes in this collection.

Specified by:
iterateHalfPlanes in interface HalfPlaneCollection
Returns:
an iterator over all HalfPlanes in this collection

toHalfPlaneArray

public HalfPlane[] toHalfPlaneArray()
Description copied from interface: HalfPlaneCollection
Returns a copy of the HalfPlanes contained in this collection as an array. The resulting array may be modified without changing the state of this collection.

Specified by:
toHalfPlaneArray in interface HalfPlaneCollection
Returns:
a copy of the HalfPlane array for this collection

The Octet Molecular Representation Framework v0.8.2