Package chemaxon.struc.sgroup
Class AttachmentPoint
java.lang.Object
chemaxon.struc.sgroup.AttachmentPoint
- All Implemented Interfaces:
Serializable
,Comparable<AttachmentPoint>
@PublicApi
public class AttachmentPoint
extends Object
implements Comparable<AttachmentPoint>, Serializable
Attachment Point class for the Superatom S-group.
An attachment point object consists of
- the atom on which the attachment point was placed;
- the order which defines the order of the attachment points. When a bond is added to the superatom s-group in its contracted state then the bond will be added to the attachment point having the lowest order;
- the crossing bond connecting to this attachment point.
- Since:
- Marvin 6.0, Nov 21, 2012
- See Also:
-
Constructor Summary
ConstructorDescriptionAttachmentPoint
(MolAtom atom, int order, MolBond bond) Constructs an AttachmentPoint object -
Method Summary
Modifier and TypeMethodDescriptionint
compareTo
(AttachmentPoint attachmentPoint) Compares two attachment points by their order.getAtom()
Gets the atom on which the attachment point was placed.getBond()
Gets the bond that is binded to this attachment point (crossing bond).int
getOrder()
Gets the order of the attachment point.boolean
isFree()
Decides whether the attachment point is free or not.toString()
Overrides Object.toString() to ease debugging.
-
Constructor Details
-
AttachmentPoint
Constructs an AttachmentPoint object- Parameters:
atom
- on which that attachment point is setorder
- the order of the attachment pointbond
- the crossing bond- Throws:
IllegalArgumentException
- if the order is a non positive number- Since:
- Marvin 6.0, Nov 21, 2012
-
-
Method Details
-
getAtom
Gets the atom on which the attachment point was placed.- Returns:
- the atom on which the attachment point was placed
- Since:
- Marvin 6.0, Nov 21, 2012
-
getOrder
public int getOrder()Gets the order of the attachment point. When a bond is added to the superatom s-group in its contracted state then the bond will be added to the attachment point having the lowest order.- Returns:
- the order of the attachment point
- Since:
- Marvin 6.0, Nov 21, 2012
-
getBond
Gets the bond that is binded to this attachment point (crossing bond).- Returns:
- the crossing bond
- Since:
- Marvin 6.0, Nov 21, 2012
-
compareTo
Compares two attachment points by their order.- Specified by:
compareTo
in interfaceComparable<AttachmentPoint>
- Parameters:
attachmentPoint
- the attachment point to be compared to- Returns:
- a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object.
-
toString
Overrides Object.toString() to ease debugging. Returns a string consisting of the classname (without the package name!), the atom, the order, the crossing bond. -
isFree
public boolean isFree()Decides whether the attachment point is free or not. Free if it does not have a crossing bond.- Returns:
true
if the attachment point does not have a crossing bond,false
otherwise- Since:
- Marvin 6.0, 2013.02.14.
-