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
Constructors Constructor Description GroupDefinition()
Creates an empty group pattern.GroupDefinition(String abbreviation, Molecule original)
Creates a new group pattern.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GroupDefinition
clone()
int
compareTo(GroupDefinition o)
boolean
equals(Object obj)
String
getAbbreviation()
Gets the abbreviation of the group.int
getAttachCount(Integer index)
Gets the attachment point count for the atom specified by the indexCollection<Integer>
getAttachmentPointOrders(int atomIndex)
Returns the attachment point orders of the atom specified byatomIndex
.List<Integer>
getConnectionAtoms()
Gets the indexes of atoms connection to any atomsMolecule
getGroup()
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.Molecule
getOriginal()
Gets the original molecule of the group.int
hashCode()
boolean
isAminoAcid()
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.String
toString()
-
-
-
Method Detail
-
getAbbreviation
public String getAbbreviation()
Gets the abbreviation of the group.- Returns:
- The abbreviation of the group.
-
setAbbreviation
public void setAbbreviation(String abbreviation)
Sets the abbreviation of the group.- Parameters:
abbreviation
- The abbreviation of the group.
-
getGroup
public Molecule getGroup()
Gets the definition of the group.- Returns:
- The definition of the group.
-
getOriginal
public Molecule getOriginal()
Gets the original molecule of the group.- Returns:
- The original molecule of the group.
-
setOriginal
public void setOriginal(Molecule original)
Sets the original molecule of the group.- Parameters:
original
- The original molecule of the group.
-
getGroupsOf
public static List<GroupDefinition> getGroupsOf(String text, List<GroupDefinition> groupDefinition)
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)
-
getConnectionAtoms
public List<Integer> getConnectionAtoms()
Gets the indexes of atoms connection to any atoms- Returns:
- the indexes of atoms connection to any atoms
-
getAttachCount
public int getAttachCount(Integer index)
Gets the attachment point count for the atom specified by the index- Parameters:
index
-- Returns:
- the attachment point count for the atom specified by the index
-
getAttachmentPointOrders
public Collection<Integer> getAttachmentPointOrders(int atomIndex)
Returns the attachment point orders of the atom specified byatomIndex
.
-
clone
public GroupDefinition clone() throws CloneNotSupportedException
- Overrides:
clone
in classObject
- Throws:
CloneNotSupportedException
-
compareTo
public int compareTo(GroupDefinition o)
- 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
-
-