Package org.deltafi.common.types
Enum Class VariableDataType
- All Implemented Interfaces:
Serializable,Comparable<VariableDataType>,Constable
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum Constants -
Method Summary
Modifier and TypeMethodDescriptionconvertValue(String value) formatString(String value) Format the value in a way that it can be mapped to jsonreadStringAsList(String value) Takes in a comma seperated list in a string and splits it into a list of strings.readStringAsMap(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 commasvalidateValue(String value) Verify that the value can be converted to the data typestatic VariableDataTypeReturns the enum constant of this class with the specified name.static VariableDataType[]values()Returns an array containing the constants of this enum class, in the order they are declared.
-
Enum Constant Details
-
STRING
-
BOOLEAN
-
NUMBER
-
LIST
-
MAP
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-
formatString
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
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
-
convertValue
-
readStringAsMap
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
-
readStringAsList
Takes in a comma seperated list in a string and splits it into a list of strings. Each value will be trimmed, empty values are dropped from the list- Parameters:
value- string containing a comma separated- Returns:
- value split into a list
-