@PublicAPI public class GroupDefinition extends java.lang.Object implements java.lang.Cloneable, java.lang.Comparable<GroupDefinition>
Constructor and Description |
---|
GroupDefinition()
Creates an empty group pattern.
|
GroupDefinition(java.lang.String abbreviation,
Molecule original)
Creates a new group pattern.
|
Modifier and Type | Method and Description |
---|---|
GroupDefinition |
clone() |
int |
compareTo(GroupDefinition o) |
boolean |
equals(java.lang.Object obj) |
java.lang.String |
getAbbreviation()
Gets the abbreviation of the group.
|
int |
getAttachCount(java.lang.Integer index)
Gets the attachment point count for the atom specified by the index
|
java.util.Collection<java.lang.Integer> |
getAttachmentPointOrders(int atomIndex)
Returns the attachment point orders of the atom specified by
atomIndex . |
java.util.List<java.lang.Integer> |
getConnectionAtoms()
Gets the indexes of atoms connection to any atoms
|
Molecule |
getGroup()
Gets the definition of the group.
|
static java.util.List<GroupDefinition> |
getGroupsOf(java.lang.String text,
java.util.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-acid
|
void |
setAbbreviation(java.lang.String abbreviation)
Sets the abbreviation of the group.
|
void |
setAminoAcid(boolean aminoAcid)
Sets whether the group represents an amino-acid
|
void |
setOriginal(Molecule original)
Sets the original molecule of the group.
|
java.lang.String |
toString() |
public GroupDefinition()
public GroupDefinition(java.lang.String abbreviation, Molecule original)
abbreviation
- The abbreviation of the group.original
- the original molecule of the group definitionpublic java.lang.String getAbbreviation()
public void setAbbreviation(java.lang.String abbreviation)
abbreviation
- The abbreviation of the group.public Molecule getGroup()
public Molecule getOriginal()
public void setOriginal(Molecule original)
original
- The original molecule of the group.public static java.util.List<GroupDefinition> getGroupsOf(java.lang.String text, java.util.List<GroupDefinition> groupDefinition)
text
- The abbreviation of the group.groupDefinition
- The list of group definitionspublic int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.util.List<java.lang.Integer> getConnectionAtoms()
public int getAttachCount(java.lang.Integer index)
index
- public java.util.Collection<java.lang.Integer> getAttachmentPointOrders(int atomIndex)
atomIndex
.public GroupDefinition clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public java.lang.String toString()
toString
in class java.lang.Object
public int compareTo(GroupDefinition o)
compareTo
in interface java.lang.Comparable<GroupDefinition>
public void setAminoAcid(boolean aminoAcid)
aminoAcid
- whether the group represents an amino-acidpublic boolean isAminoAcid()