etomica.atom
Class AtomPair

java.lang.Object
  extended by etomica.atom.AtomPair
All Implemented Interfaces:
IAtomList, Serializable

public class AtomPair
extends Object
implements IAtomList, Serializable

Data structure that contains two mutable atom instances.

See Also:
Serialized Form

Field Summary
 IAtom atom0
           
 IAtom atom1
           
 
Constructor Summary
AtomPair()
           
AtomPair(IAtom atom0, IAtom atom1)
           
 
Method Summary
 IAtom getAtom(int i)
          Returns the i-th atom, with numbering beginning from 0.
 int getAtomCount()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

atom0

public IAtom atom0

atom1

public IAtom atom1
Constructor Detail

AtomPair

public AtomPair()

AtomPair

public AtomPair(IAtom atom0,
                IAtom atom1)
Method Detail

getAtom

public final IAtom getAtom(int i)
Description copied from interface: IAtomList
Returns the i-th atom, with numbering beginning from 0. If i is greater than count-1, throws an IllegalArgumentException.

Specified by:
getAtom in interface IAtomList

getAtomCount

public final int getAtomCount()
Specified by:
getAtomCount in interface IAtomList
Returns:
the number of atoms in the set

toString

public String toString()
Overrides:
toString in class Object