The Octet Molecular Representation Framework v0.8.2

net.sf.octet.builder
Class AbstractRepresentationBuilder.HalfPlaneTemplate

java.lang.Object
  extended bynet.sf.octet.builder.AbstractRepresentationBuilder.HalfPlaneTemplate
All Implemented Interfaces:
HalfPlaneProxy
Enclosing class:
AbstractRepresentationBuilder

protected class AbstractRepresentationBuilder.HalfPlaneTemplate
extends java.lang.Object
implements HalfPlaneProxy

A template for the construction of represenation-specific half planes. Note that this class is not immutable; values returned may differ from those returned by previous or subsequent method invocations.

Author:
Richard Apodaca

Method Summary
 int countAtoms()
          Returns the number of Atoms shared by this HalfPlaneTemplate.
 Atom getAtom(int index)
          Returns the Atom located at index.
 java.util.List getAtoms()
          Returns an unmodifiable List containing the Atoms shared by this HalfPlaneTemplate.
 int getPosition(Atom atom)
          Returns the position of atom within this HalfPlaneTemplate.
 int[] getPositions()
          Returns an array containing the positions of each Atom shared by this HalfPlaneTemplate .
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

countAtoms

public int countAtoms()
Returns the number of Atoms shared by this HalfPlaneTemplate.

Returns:
the number of Atoms shared by this HalfPlaneTemplate

getAtom

public Atom getAtom(int index)
Returns the Atom located at index.

Parameters:
index - the index to query
Returns:
the Atom located at index

getAtoms

public java.util.List getAtoms()
Returns an unmodifiable List containing the Atoms shared by this HalfPlaneTemplate.

Returns:
an unmodifiable List containing the Atoms shared by this HalfPlaneTemplate

getPositions

public int[] getPositions()
Returns an array containing the positions of each Atom shared by this HalfPlaneTemplate . The ordering and size of this array reflect the ordering and size of the set of Atoms shared by this HalfPlaneTemplate. The returned array may be modified without modifying the state of this HalfPlaneTemplate.

Returns:
an array containing +1 (upper), -1 (lower), or 0 (intersection)

getPosition

public int getPosition(Atom atom)
Returns the position of atom within this HalfPlaneTemplate.

Parameters:
atom - the Atom to query
Returns:
+1 (upper), -1 (lower), or 0 (intersection)

The Octet Molecular Representation Framework v0.8.2