|
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.BasicAtomPair
A default implementation of the AtomPair interface. The
equals method does not distinguish between source and target atoms,
so BasicAtomPair is suitable for undirected graph representations.
| Constructor Summary | |
BasicAtomPair(Atom source,
Atom target)
Creates a new BasicAtomPair from source and
target. |
|
| Method Summary | |
boolean |
connects(Atom atom1,
Atom atom2)
Returns true if the specified atoms are connected by this
AtomPair. |
boolean |
contains(Atom atom)
Returns true if the spacified Atom is linked by this
AtomPair. |
boolean |
equals(java.lang.Object object)
Returns true if object has the same two atoms as
this AtomPair. |
Atom |
getMate(Atom atom)
Returns the mate for the specified atom. |
Atom |
getSource()
Returns the source Atom. |
Atom |
getTarget()
Returns the target Atom. |
int |
hashCode()
Required due to override of Object.equals(). |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
public BasicAtomPair(Atom source,
Atom target)
BasicAtomPair from source and
target.
source - the source Atomtarget - the target Atom
java.lang.IllegalArgumentException - if source and target are equal
by Object.equals| Method Detail |
public Atom getSource()
AtomPair
getSource in interface AtomPairpublic Atom getTarget()
AtomPair
getTarget in interface AtomPairpublic Atom getMate(Atom atom)
AtomPair
getMate in interface AtomPairatom - the atom for which the mate will be returned
public boolean contains(Atom atom)
AtomPairtrue if the spacified Atom is linked by this
AtomPair.
contains in interface AtomPairatom - the atom to examine
true if the atom is linked by this bond, false
otherwise
public boolean connects(Atom atom1,
Atom atom2)
AtomPairtrue if the specified atoms are connected by this
AtomPair.
connects in interface AtomPairatom1 - the first atomatom2 - the second atom
AtomPair,
false otherwisepublic boolean equals(java.lang.Object object)
true if object has the same two atoms as
this AtomPair. Returns false otherwise, or if
the source and target atoms of object are equal.
object - the Object to compare
true if source and target are contained in this
AtomPair, false otherwisepublic int hashCode()
Object.equals(). Currently,
invokes super.hashCode().
|
The Octet Molecular Representation Framework v0.8.2 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||