Enum TypeInference.DataType
- java.lang.Object
-
- java.lang.Enum<TypeInference.DataType>
-
- com.datumbox.framework.common.dataobjects.TypeInference.DataType
-
- All Implemented Interfaces:
Serializable,Comparable<TypeInference.DataType>
- Enclosing class:
- TypeInference
public static enum TypeInference.DataType extends Enum<TypeInference.DataType>
Internal DataTypes used by the Framework.
-
-
Enum Constant Summary
Enum Constants Enum Constant Description BOOLEANBoolean/Dummy Variable.CATEGORICALCategorical variable.NUMERICALNumerical variable.ORDINALOrdinal variable.
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Objectparse(String s, TypeInference.DataType dataType)Takes a String and tries to translate it to the provided DataType.static TypeInference.DataTypevalueOf(String name)Returns the enum constant of this type with the specified name.static TypeInference.DataType[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
BOOLEAN
public static final TypeInference.DataType BOOLEAN
Boolean/Dummy Variable. Stored as boolean.
-
ORDINAL
public static final TypeInference.DataType ORDINAL
Ordinal variable. Stored as short by convention.
-
NUMERICAL
public static final TypeInference.DataType NUMERICAL
Numerical variable. Any numeric except of short which is reserved for ordinal variables.
-
CATEGORICAL
public static final TypeInference.DataType CATEGORICAL
Categorical variable. Any value that is non numeric or boolean.
-
-
Method Detail
-
values
public static TypeInference.DataType[] 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 (TypeInference.DataType c : TypeInference.DataType.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static TypeInference.DataType valueOf(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:
IllegalArgumentException- if this enum type has no constant with the specified nameNullPointerException- if the argument is null
-
parse
public static Object parse(String s, TypeInference.DataType dataType)
Takes a String and tries to translate it to the provided DataType. The result value is always casted to Object.- Parameters:
s-dataType-- Returns:
-
-