Enum VariableDataType

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<VariableDataType>

    public enum VariableDataType
    extends java.lang.Enum<VariableDataType>
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String formatString​(java.lang.String value)
      Format the value in a way that it can be mapped to json
      static java.util.Map<java.lang.Object,​java.lang.Object> readStringAsMap​(java.lang.String value)
      Read a list of key value pairs into a Map where keys are delimited from values by colons and pairs are delimited by commas
      java.lang.String validateValue​(java.lang.String value)
      Verify that the value can be converted to the data type
      static VariableDataType valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static VariableDataType[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • values

        public static VariableDataType[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (VariableDataType c : VariableDataType.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static VariableDataType valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null
      • formatString

        public java.lang.String formatString​(java.lang.String value)
        Format the value in a way that it can be mapped to json
        Parameters:
        value - to format
        Returns:
        formatted string that can be converted to json
      • validateValue

        public java.lang.String validateValue​(java.lang.String value)
        Verify that the value can be converted to the data type
        Parameters:
        value - to verify
        Returns:
        null if there are no issues or an error message if the value is invalid
      • readStringAsMap

        public static java.util.Map<java.lang.Object,​java.lang.Object> readStringAsMap​(java.lang.String value)
        Read a list of key value pairs into a Map where keys are delimited from values by colons and pairs are delimited by commas
        Parameters:
        value - string to convert to map
        Returns:
        map representation of the given string