etomica.atom
Class AtomSetSinglet

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

public class AtomSetSinglet
extends Object
implements IAtomList, Serializable

Data structure that contains a single mutable atom instance.

See Also:
Serialized Form

Field Summary
 IAtom atom
           
 
Constructor Summary
AtomSetSinglet()
           
AtomSetSinglet(IAtom atom)
           
 
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

atom

public IAtom atom
Constructor Detail

AtomSetSinglet

public AtomSetSinglet()

AtomSetSinglet

public AtomSetSinglet(IAtom atom)
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