Class DataNodeType

java.lang.Object
org.pathvisio.libgpml.model.type.DataNodeType

public class DataNodeType
extends java.lang.Object
This class contains extensible enum for DataNode type property.
Author:
unknown, finterly
  • Field Details

  • Constructor Details

    • DataNodeType

      private DataNodeType​(java.lang.String name)
      The constructor is private. DataNodeType cannot be directly instantiated. Use create() method to instantiate DataNodeType.
      Parameters:
      name - the string identifier of this DataNodeType.
      Throws:
      java.lang.NullPointerException - if name is null.
  • Method Details

    • register

      public static DataNodeType register​(java.lang.String name)
      Returns a DataNodeType from a given string identifier name. If the DataNodeType 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 DataNodeType for given name. If name does not exist, creates and returns a new DataNodeType.
    • getName

      public java.lang.String getName()
      Returns the name key for this DataNodeType.
      Returns:
      name the key for this DataNodeType.
    • fromName

      public static DataNodeType fromName​(java.lang.String name)
      Returns the DataNodeType from given string name.
      Parameters:
      name - the string.
      Returns:
      the DataNodeType with given string name.
    • getNames

      public static java.lang.String[] getNames()
      Returns the names of all registered DataNodeTypes as a String array.
      Returns:
      names the names of all registered DataNodeTypes in order of insertion.
    • getValues

      public static DataNodeType[] getValues()
      Returns the data node type values of all DataNodeTypes as a list.
      Returns:
      dataNodeTypes the list of all registered DataNodeTypes.
    • toString

      public java.lang.String toString()
      Returns a string representation of this DataNodeType.
      Overrides:
      toString in class java.lang.Object
      Returns:
      name the identifier of this DataNodeType.