|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.octet.model.BasicAtomGraph
A default implementation of the AtomGraph interface that is suitable for
representing Molecule subgraphs.
| Constructor Summary | |
BasicAtomGraph()
Constructs an empty BasicAtomGraph. |
|
BasicAtomGraph(AtomCollection atoms,
AtomPairCollection pairs)
Constructs a BasicAtomGraph from atoms and pairs. |
|
BasicAtomGraph(AtomPairCollection pairs)
Constructs a BasicAtomGraph from the specified AtomPairCollection. |
|
| Method Summary | |
boolean |
containsAtom(Atom atom)
Returns true if the specified Atom is contained in this
collection, and false otherwise. |
boolean |
containsAtomPair(Atom source,
Atom target)
Returns true if an AtomPair connecting
source and target is contained in this
collection. |
boolean |
containsAtomPair(AtomPair pair)
Returns true if an AtomPair matching
pair is contained in this collection. |
int |
countAtomPairs()
Returns the number of AtomPairs contained in this collection. |
int |
countAtoms()
Returns the number of Atoms contained in this atom collection. |
int |
countNeighbors(Atom atom)
Returns the number of Atoms connected to atom in the context of
this AtomGraph. |
boolean |
equals(java.lang.Object object)
Overrides Object.equals(). |
Atom |
getAtom(int index)
Returns the Atom located at the specified zero-based index. |
int |
getAtomIndex(Atom atom)
Returns the zero-based index of the specified Atom. |
AtomPair |
getAtomPair(Atom source,
Atom target)
Returns an AtomPair containing the specified source
and target Atoms. |
AtomPair |
getAtomPair(int index)
Returns the AtomPair corresponding to the specified integer index. |
int |
getAtomPairIndex(AtomPair pair)
Returns the index of the specified AtomPair. |
int |
hashCode()
Overrides Object.hashCode() due to override of Object.equals()
. |
AtomPairIterator |
iterateAtomPairs()
Returns an iterator over all AtomPairs in this collection. |
AtomIterator |
iterateAtoms()
Returns an iterator over all Atoms in this collection. |
AtomIterator |
iterateNeighbors(Atom atom)
Returns an iterator over all neighbors of atom in the context of this
AtomGraph. |
Atom[] |
toAtomArray()
Returns a copy of the Atoms contained in this collection as an array. |
AtomPair[] |
toAtomPairArray()
Returns a copy of the atom pairs contained in this collection as an array. |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicAtomGraph()
BasicAtomGraph.
public BasicAtomGraph(AtomPairCollection pairs)
BasicAtomGraph from the specified AtomPairCollection.
Atoms will be induced from pairs.
pairs - the set of AtomPairs
java.lang.IllegalArgumentException - if pairs contains duplicate AtomPairs
public BasicAtomGraph(AtomCollection atoms,
AtomPairCollection pairs)
BasicAtomGraph from atoms and pairs.
Verifies that the Atoms implicit in pairs are all present
in atoms. Preserves the indexing of atoms and pairs
.
atoms - the Atom collectionpairs - the AtomPair collection
java.lang.IllegalArgumentException - if atoms and pairs are not
compatible| Method Detail |
public AtomIterator iterateNeighbors(Atom atom)
AtomGraphatom in the context of this
AtomGraph. This iterator may contain only a subset of the Atoms
returned by atom.iterateNeighbors(), depending on the nature of this
AtomGraph.
iterateNeighbors in interface AtomGraphatom - the Atom to examine
atompublic int countNeighbors(Atom atom)
AtomGraphAtoms connected to atom in the context of
this AtomGraph. This value will be less than or equal to the value returned
by atom.countNeighbors().
countNeighbors in interface AtomGraphatom - the Atom to examine
atompublic boolean containsAtom(Atom atom)
AtomCollectiontrue if the specified Atom is contained in this
collection, and false otherwise.
containsAtom in interface AtomCollectionatom - the Atom
true if contained, false otherwisepublic int countAtoms()
AtomCollectionAtoms contained in this atom collection.
countAtoms in interface AtomCollectionpublic int getAtomIndex(Atom atom)
AtomCollectionAtom.
getAtomIndex in interface AtomCollectionatom - the atom
atompublic Atom getAtom(int index)
AtomCollectionAtom located at the specified zero-based index.
getAtom in interface AtomCollectionindex - the index
Atom at index, or null
if the index is invalidpublic AtomIterator iterateAtoms()
AtomCollectionAtoms in this collection.
iterateAtoms in interface AtomCollectionAtoms in this collectionpublic Atom[] toAtomArray()
AtomCollection
toAtomArray in interface AtomCollectionpublic boolean containsAtomPair(AtomPair pair)
AtomPairCollectiontrue if an AtomPair matching
pair is contained in this collection.
containsAtomPair in interface AtomPairCollectionpair - the AtomPair to search for
true if found, false otherwise
public boolean containsAtomPair(Atom source,
Atom target)
AtomPairCollectiontrue if an AtomPair connecting
source and target is contained in this
collection.
containsAtomPair in interface AtomPairCollectionsource - the source atomtarget - the target atom
true if the atom pair exists, false otherwise
public AtomPair getAtomPair(Atom source,
Atom target)
AtomPairCollectionAtomPair containing the specified source
and target Atoms. If no such pair is found,
null is returned.
getAtomPair in interface AtomPairCollectionsource - the source atomtarget - the target atom
AtomPairpublic int countAtomPairs()
AtomPairCollectionAtomPairs contained in this collection.
countAtomPairs in interface AtomPairCollectionAtomPairs contained in this collection.public AtomPairIterator iterateAtomPairs()
AtomPairCollectionAtomPairs in this collection.
iterateAtomPairs in interface AtomPairCollectionAtomPairs in this collectionpublic int getAtomPairIndex(AtomPair pair)
AtomPairCollectionAtomPair.
getAtomPairIndex in interface AtomPairCollectionpair - the AtomPair to search for
AtomPairpublic AtomPair getAtomPair(int index)
AtomPairCollectionAtomPair corresponding to the specified integer index.
getAtomPair in interface AtomPairCollectionindex - the index to search for
AtomPair at the specified indexpublic AtomPair[] toAtomPairArray()
AtomPairCollection
toAtomPairArray in interface AtomPairCollectionpublic boolean equals(java.lang.Object object)
Object.equals().
public int hashCode()
Object.hashCode() due to override of Object.equals()
.
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||