Package org.pathvisio.libgpml.model.type
Class GroupType
java.lang.Object
org.pathvisio.libgpml.model.type.GroupType
public class GroupType
extends java.lang.Object
This class contains extensible enum for Group type property. Groups can have
different biological meanings (e.g. protein Complex), and can be rendered in
different ways based on that.
NB: group type previously named group style.
- Author:
- unknown, finterly
-
Field Summary
-
Constructor Summary
Constructors Modifier Constructor Description private
GroupType(java.lang.String name)
The constructor is private. -
Method Summary
Modifier and Type Method Description int
compareTo(GroupType groupType)
Compares string representations of given GroupType lexicographically.static GroupType
fromName(java.lang.String name)
Looks up the ConnectorType corresponding to that name.java.lang.String
getName()
Returns the name key for this GroupType.static java.lang.String[]
getNames()
Returns the names of all registered GroupTypes as a list.static GroupType[]
getValues()
Returns the group type values of all GroupTypes as a list.static GroupType
register(java.lang.String name)
Returns a GroupType from a given string identifier name.java.lang.String
toString()
Returns a string representation of this GroupType.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Field Details
-
nameToGroupType
-
GROUP
-
TRANSPARENT
-
COMPLEX
-
PATHWAY
-
ANALOG
-
PARALOG
-
name
private java.lang.String name
-
-
Constructor Details
-
GroupType
private GroupType(java.lang.String name)The constructor is private. GroupType cannot be directly instantiated. Use create() method to instantiate GroupType.- Parameters:
name
- the string key.
-
-
Method Details
-
register
Returns a GroupType from a given string identifier name. If the GroupType doesn't exist yet, it is created to extend the enum. The method makes sure that the same object is not added twice.- Parameters:
name
- the string key.- Returns:
- the GroupType for given name. If name does not exist, creates and returns a new GroupType.
-
getName
public java.lang.String getName()Returns the name key for this GroupType.- Returns:
- name the key for this GroupType.
-
fromName
Looks up the ConnectorType corresponding to that name. -
getNames
public static java.lang.String[] getNames()Returns the names of all registered GroupTypes as a list.- Returns:
- names the names of all registered GroupTypes in order of insertion.
-
getValues
Returns the group type values of all GroupTypes as a list.- Returns:
- groupTypes the list of all registered GroupTypes.
-
toString
public java.lang.String toString()Returns a string representation of this GroupType.- Overrides:
toString
in classjava.lang.Object
- Returns:
- name the identifier of this GroupType.
-
compareTo
Compares string representations of given GroupType lexicographically.- Returns:
- positive number (integer difference of character value) if first string is lexicographically greater than second string, negative number if first string is less than second string lexicographically, and 0 if first string is lexicographically equal to second string.
-