The Octet Molecular Representation Framework v0.8.2

net.sf.octet.query
Class AllCyclesMoleculeQuery

java.lang.Object
  extended bynet.sf.octet.query.AllCyclesMoleculeQuery
All Implemented Interfaces:
MoleculeQuery

public class AllCyclesMoleculeQuery
extends java.lang.Object
implements MoleculeQuery

Queries the set of all cycles in a Molecule. AllCyclesMoleculeQuery can be used with any instance of CycleTraverser to implement custom cycle-perception strategies. HanserCycleTraverser is used by default.

Author:
Richard Apodaca

Constructor Summary
AllCyclesMoleculeQuery()
          Constructs a fully-functional AllCyclesMoleculeQuery that uses a HanserCycleTraverser for cycle perception.
AllCyclesMoleculeQuery(CycleTraverser traverser)
          Constructs a fully-functional AllCyclesMoleculequery that delegates cycle perception to traverser.
 
Method Summary
 int countMatches(Molecule molecule)
          Returns the number of non-degenerate occurrences of this query in the specified Molecule.
 AtomGraphCollection getMatches(Molecule molecule)
          Returns a mapping of all occurrences of this query onto the specified Molecule.
 boolean match(Molecule molecule)
          Returns true if this MoleculeQuery matches molecule, or false otherwise.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AllCyclesMoleculeQuery

public AllCyclesMoleculeQuery()
Constructs a fully-functional AllCyclesMoleculeQuery that uses a HanserCycleTraverser for cycle perception.


AllCyclesMoleculeQuery

public AllCyclesMoleculeQuery(CycleTraverser traverser)
Constructs a fully-functional AllCyclesMoleculequery that delegates cycle perception to traverser.

Parameters:
traverser - the CycleTraverser that will be used for cycle perception
Method Detail

match

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

Specified by:
match in interface MoleculeQuery
Parameters:
molecule - the Molecule to query
Returns:
true if a match was found, or false otherwise

countMatches

public int countMatches(Molecule molecule)
Description copied from interface: MoleculeQuery
Returns the number of non-degenerate occurrences of this query in the specified Molecule.

Specified by:
countMatches in interface MoleculeQuery
Parameters:
molecule - the Molecule to query
Returns:
the number of non-degenerate occurrences of this query in molecule

getMatches

public AtomGraphCollection getMatches(Molecule molecule)
Description copied from interface: MoleculeQuery
Returns a mapping of all occurrences of this query onto the specified Molecule.

Specified by:
getMatches in interface MoleculeQuery
Parameters:
molecule - the Molecule to query
Returns:
the mapping of all occurrences of this query in molecule

The Octet Molecular Representation Framework v0.8.2