etomica.atom
Class AtomSetSinglet
java.lang.Object
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
atom
public IAtom atom
AtomSetSinglet
public AtomSetSinglet()
AtomSetSinglet
public AtomSetSinglet(IAtom atom)
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