|
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.AtomGraphDecorator
A decorator for an AtomGraph. Use AtomGraphDecorator
to dynamically add responsibilities to an AtomGraph at runtime,
as an alternative to directly subclassing an AtomGraph implementation.
| Constructor Summary | |
protected |
AtomGraphDecorator(AtomGraph graph)
Decorates graph. |
| 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. |
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. |
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, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
protected AtomGraphDecorator(AtomGraph graph)
graph.
graph - the AtomGraph to decorate| Method Detail |
public 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 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 int getAtomIndex(Atom atom)
AtomCollectionAtom.
getAtomIndex in interface AtomCollectionatom - the atom
atompublic AtomIterator iterateAtoms()
AtomCollectionAtoms in this collection.
iterateAtoms in interface AtomCollectionAtoms in this collectionpublic Atom[] toAtomArray()
AtomCollection
toAtomArray in interface AtomCollection
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 otherwisepublic 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 otherwisepublic int countAtomPairs()
AtomPairCollectionAtomPairs contained in this collection.
countAtomPairs in interface AtomPairCollectionAtomPairs contained in this collection.
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 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 int getAtomPairIndex(AtomPair pair)
AtomPairCollectionAtomPair.
getAtomPairIndex in interface AtomPairCollectionpair - the AtomPair to search for
AtomPairpublic AtomPairIterator iterateAtomPairs()
AtomPairCollectionAtomPairs in this collection.
iterateAtomPairs in interface AtomPairCollectionAtomPairs in this collectionpublic AtomPair[] toAtomPairArray()
AtomPairCollection
toAtomPairArray in interface AtomPairCollectionpublic 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 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
atom
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||