Class GroupDefinition
java.lang.Object
chemaxon.standardizer.advancedactions.GroupDefinition
- All Implemented Interfaces:
Cloneable
,Comparable<GroupDefinition>
@PublicApi
public class GroupDefinition
extends Object
implements Cloneable, Comparable<GroupDefinition>
Pattern of a group. Consists of an abbreviation as a text and a definition as
a molecule.
- Since:
- 5.7
-
Constructor Summary
ConstructorDescriptionCreates an empty group pattern.GroupDefinition
(String abbreviation, Molecule original) Creates a new group pattern. -
Method Summary
Modifier and TypeMethodDescriptionclone()
int
boolean
Gets the abbreviation of the group.int
getAttachCount
(Integer index) Gets the attachment point count for the atom specified by the indexgetAttachmentPointOrders
(int atomIndex) Returns the attachment point orders of the atom specified byatomIndex
.Gets the indexes of atoms connection to any atomsgetGroup()
Gets the definition of the group.static List<GroupDefinition>
getGroupsOf
(String text, List<GroupDefinition> groupDefinition) Gets the group from a list of group definitions, based on the abbreviation.Gets the original molecule of the group.int
hashCode()
boolean
Gets whether the group represents an amino-acidvoid
setAbbreviation
(String abbreviation) Sets the abbreviation of the group.void
setAminoAcid
(boolean aminoAcid) Sets whether the group represents an amino-acidvoid
setOriginal
(Molecule original) Sets the original molecule of the group.toString()
-
Constructor Details
-
GroupDefinition
public GroupDefinition()Creates an empty group pattern. -
GroupDefinition
Creates a new group pattern.- Parameters:
abbreviation
- The abbreviation of the group.original
- the original molecule of the group definition
-
-
Method Details
-
getAbbreviation
Gets the abbreviation of the group.- Returns:
- The abbreviation of the group.
-
setAbbreviation
Sets the abbreviation of the group.- Parameters:
abbreviation
- The abbreviation of the group.
-
getGroup
Gets the definition of the group.- Returns:
- The definition of the group.
-
getOriginal
Gets the original molecule of the group.- Returns:
- The original molecule of the group.
-
setOriginal
Sets the original molecule of the group.- Parameters:
original
- The original molecule of the group.
-
getGroupsOf
Gets the group from a list of group definitions, based on the abbreviation.- Parameters:
text
- The abbreviation of the group.groupDefinition
- The list of group definitions- Returns:
- The group molecule. (null if not found)
-
hashCode
public int hashCode() -
equals
-
getConnectionAtoms
Gets the indexes of atoms connection to any atoms- Returns:
- the indexes of atoms connection to any atoms
-
getAttachCount
Gets the attachment point count for the atom specified by the index- Returns:
- the attachment point count for the atom specified by the index
-
getAttachmentPointOrders
Returns the attachment point orders of the atom specified byatomIndex
. -
clone
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
toString
-
compareTo
- Specified by:
compareTo
in interfaceComparable<GroupDefinition>
-
setAminoAcid
public void setAminoAcid(boolean aminoAcid) Sets whether the group represents an amino-acid- Parameters:
aminoAcid
- whether the group represents an amino-acid
-
isAminoAcid
public boolean isAminoAcid()Gets whether the group represents an amino-acid- Returns:
- whether the group represents an amino-acid
-