The Octet Molecular Representation Framework v0.8.2

net.sf.octet.query
Class TemplateAtomQuery

java.lang.Object
  extended bynet.sf.octet.query.TemplateAtomQuery
All Implemented Interfaces:
AtomQuery

public class TemplateAtomQuery
extends java.lang.Object
implements AtomQuery

An implementation of the AtomQuery interface in which an existing Atom is used as a template for comparing other Atoms. TemplateAtomQuery will match Atoms in molecules that are either identical to the one in which the template is hosted, or which are superstructures of the molecule hosting the template.

This implementation ignores the Configuration of Atoms. To perform queries in which configuration is defined, use a MoleculeQueryBuilder .

Author:
Richard Apodaca

Constructor Summary
TemplateAtomQuery(Atom atom, Molecule molecule)
          Constructs a TemplateAtomQuery using atom as the templateAtom.
 
Method Summary
 boolean match(Atom atom, Molecule molecule)
          Returns true if this AtomQuery matches atom, or false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TemplateAtomQuery

public TemplateAtomQuery(Atom atom,
                         Molecule molecule)
Constructs a TemplateAtomQuery using atom as the templateAtom.

Parameters:
atom - the template Atom
molecule - the Molecule in which atom resides
Throws:
java.lang.NullPointerException - if atom is null
Method Detail

match

public boolean match(Atom atom,
                     Molecule molecule)
Description copied from interface: AtomQuery
Returns true if this AtomQuery matches atom, or false otherwise.

Specified by:
match in interface AtomQuery
Parameters:
atom - the Atom to match
molecule - the Molecule in which atom resides
Returns:
true if a match was found, or false otherwise

The Octet Molecular Representation Framework v0.8.2