The Octet Molecular Representation Framework v0.8.2

net.sf.octet.query
Interface MoleculeQuery

All Known Implementing Classes:
AllCyclesMoleculeQuery, CachedMoleculeQuery, TemplateMoleculeQuery

public interface MoleculeQuery

A Molecule query. Like AtomQuery, MoleculeQuery is immutable - meaning that every method invocation will return the same result for the same Molecule throughout the lifetime of the MoleculeQuery.

Author:
Richard Apodaca
See Also:
TemplateMoleculeQuery, "Immutable Pattern (Grand98)"

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.
 

Method Detail

match

public boolean match(Molecule molecule)
Returns true if this MoleculeQuery matches molecule, or false otherwise.

Parameters:
molecule - the Molecule to query
Returns:
true if a match was found, or false otherwise

countMatches

public int countMatches(Molecule molecule)
Returns the number of non-degenerate occurrences of this query in the specified Molecule.

Parameters:
molecule - the Molecule to query
Returns:
the number of non-degenerate occurrences of this query in molecule

getMatches

public AtomGraphCollection getMatches(Molecule molecule)
Returns a mapping of all occurrences of this query onto the specified Molecule.

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