|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.jscience.chemistry.gui.extended.molecule.Bond
public class Bond
Tripos base Bond class
Atom| Field Summary | |
|---|---|
Atom |
a1
From and to atoms, respectively |
Atom |
a2
From and to atoms, respectively |
static int |
ANY
Any bond type |
static int |
AROMATIC
Aromatic bond type |
static int |
DASH
Wedge down bond type |
static int |
DOUBLE
Double bond type |
protected int |
id
Bond id |
PropAttributes |
prop
Property list at the end of the bond string |
protected int |
ringId
Id of ring atom belongs to (0 means atom is not in a ring) |
static int |
SINGLE
Single bond type |
static int |
TRIPLE
Triple bond type |
protected int |
type
Bond type |
static int |
WEDGE
Wedge up bond type |
| Constructor Summary | |
|---|---|
Bond()
Default constructor |
|
Bond(Atom from,
Atom to,
int btype)
Constructor without Properties |
|
Bond(Bond b)
Copy constructor |
|
Bond(int id,
int type,
Atom from,
Atom to,
int ringId)
Constructor without properties |
|
Bond(int id,
int type,
Atom from,
Atom to,
int ringId,
java.util.Properties prop)
Full constructor |
|
| Method Summary | |
|---|---|
boolean |
equals(Bond b)
Compares this bond with another |
java.util.Properties |
getAttributes()
Get the actual properties object that holds the attributes |
int |
getId()
Returns id of the bond |
PropAttributes |
getPropAttributes()
Get the encapsluation of the properties object which holds the attributes |
int |
getRingId()
Returns id of the ring which this bond associates with |
int |
getType()
Returns bond type |
float |
length()
Retrun the length of this bond |
void |
setAttributes(java.util.Properties p)
Set the attributes for the bond |
void |
setId(int id)
Set id of the bond |
void |
setPropAttributes(PropAttributes p)
Set the attributes for the bond |
void |
setRingId(int id)
Set id of the ring which this bond associate with |
void |
setType(int n)
Set bond type |
java.lang.String |
toString()
Returns a String representation of bond |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final int SINGLE
public static final int DOUBLE
public static final int TRIPLE
public static final int AROMATIC
public static final int WEDGE
public static final int DASH
public static final int ANY
protected int id
protected int type
public Atom a1
public Atom a2
protected int ringId
public PropAttributes prop
| Constructor Detail |
|---|
public Bond(int id,
int type,
Atom from,
Atom to,
int ringId,
java.util.Properties prop)
id - bond idtype - bond typefrom - from atomto - to atomringId - id of ring atom belongs to (0 means atom is not in a ring)prop - properties of the bond, (string pairs on the end)
public Bond(Atom from,
Atom to,
int btype)
type - bond typefrom - from atomto - to atom
public Bond(int id,
int type,
Atom from,
Atom to,
int ringId)
id - bond idtype - bond typefrom - from atomto - to atomringId - id of ring atom belongs to (0 means atom is not in a ring)public Bond()
public Bond(Bond b)
b - bond to be copied| Method Detail |
|---|
public void setType(int n)
throws java.lang.IllegalArgumentException
n - bond type
java.lang.IllegalArgumentException - if illegal bond typegetType()public int getType()
setType(int)public boolean equals(Bond b)
b - bond to compare with
public java.lang.String toString()
toString in class java.lang.Objectpublic float length()
public java.util.Properties getAttributes()
getAttributes in interface PropAttributesInterpublic PropAttributes getPropAttributes()
getPropAttributes in interface PropAttributesInterpublic void setAttributes(java.util.Properties p)
setAttributes in interface PropAttributesInterp - Property for the bondpublic void setPropAttributes(PropAttributes p)
setPropAttributes in interface PropAttributesInterp - Property for the bondpublic int getId()
public int getRingId()
public void setId(int id)
id - bond idgetId()public void setRingId(int id)
id - ring idgetRingId()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||