etomica.action
Class MoleculeChildAtomAction

java.lang.Object
  extended by etomica.action.MoleculeChildAtomAction
All Implemented Interfaces:
MoleculeAction, Serializable

public class MoleculeChildAtomAction
extends Object
implements MoleculeAction, Serializable

Wraps an AtomAction, and performs the wrapped action on the atom only if it is a leaf atom; if given an atom group (as indicated by the atom's node), performs action instead on all the atom's child atoms. This process continues recursively until the leaf atoms are encountered.

See Also:
Serialized Form

Constructor Summary
MoleculeChildAtomAction(AtomAction action)
          Constructor takes wrapped action, which is final.
 
Method Summary
 void actionPerformed(IMolecule atom)
           
 AtomAction getAtomAction()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MoleculeChildAtomAction

public MoleculeChildAtomAction(AtomAction action)
Constructor takes wrapped action, which is final.

Method Detail

actionPerformed

public void actionPerformed(IMolecule atom)
Specified by:
actionPerformed in interface MoleculeAction

getAtomAction

public AtomAction getAtomAction()
Returns:
Returns the wrapped action.