Package org.deltafi.common.types
Enum VariableDataType
- java.lang.Object
-
- java.lang.Enum<VariableDataType>
-
- org.deltafi.common.types.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.StringformatString(java.lang.String value)Format the value in a way that it can be mapped to jsonstatic 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 commasjava.lang.StringvalidateValue(java.lang.String value)Verify that the value can be converted to the data typestatic VariableDataTypevalueOf(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.
-
-
-
Enum Constant Detail
-
STRING
public static final VariableDataType STRING
-
BOOLEAN
public static final VariableDataType BOOLEAN
-
NUMBER
public static final VariableDataType NUMBER
-
LIST
public static final VariableDataType LIST
-
MAP
public static final VariableDataType MAP
-
-
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 namejava.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
-
-