Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## de.jstacs
Enum DataType

    java.lang.Object
      java.lang.Enum<DataType>
          de.jstacs.DataType

All Implemented Interfaces:
  Serializable, Comparable<DataType>

    public enum DataType

extends Enum<DataType>

This `enum` defines a number of data types that can be used for `Parameter`s and `Result` s.

Author:
  Jens Keilwagen, Jan Grau
See Also:
  `Parameter`, `Result`

Enum Constant Summary
`BOOLEAN` This value indicates the data type `boolean`.
`BYTE` This value indicates the data type `byte`.
`CHAR` This value indicates the data type `char`.
`DATASET` This value indicates the data type `DataSet`.
`DOUBLE` This value indicates the data type `double`.
`FILE` This value indicates the data type `FileParameter.FileRepresentation`.
`FLOAT` This value indicates the data type `float`.
`HTML` This value indicates the data type HTML.
`INT` This value indicates the data type `int`.
`LIST` This value indicates the data type `ListResult`.
`LONG` This value indicates the data type `long`.
`PARAMETERSET` This value indicates the data type `ParameterSet`.
`PNG` This value indicates the data type png.
`SHORT` This value indicates the data type `short`.
`STORABLE` This value indicates the data type `Storable`.
`STRING` This value indicates the data type `String`.

Method Summary
`static boolean` | `canBeCastedFromTo(DataType from, DataType to)` Checks if the `DataType` `from` can be casted to the `DataType` `to` without losing information.
`static DataType` | `valueOf(String name)` Returns the enum constant of this type with the specified name.
`static DataType[]` | `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`

Enum Constant Detail

### BOOLEAN

    public static final DataType BOOLEAN

  This value indicates the data type `boolean`.

### CHAR

    public static final DataType CHAR

  This value indicates the data type `char`.

### BYTE

    public static final DataType BYTE

  This value indicates the data type `byte`.

### SHORT

    public static final DataType SHORT

  This value indicates the data type `short`.

### INT

    public static final DataType INT

  This value indicates the data type `int`.

### LONG

    public static final DataType LONG

  This value indicates the data type `long`.

### FLOAT

    public static final DataType FLOAT

  This value indicates the data type `float`.

### DOUBLE

    public static final DataType DOUBLE

  This value indicates the data type `double`.

### STRING

    public static final DataType STRING

  This value indicates the data type `String`.

### HTML

    public static final DataType HTML

  This value indicates the data type HTML.

### PNG

    public static final DataType PNG

  This value indicates the data type png.

### STORABLE

    public static final DataType STORABLE

  This value indicates the data type `Storable`.

### DATASET

    public static final DataType DATASET

  This value indicates the data type `DataSet`.

### LIST

    public static final DataType LIST

  This value indicates the data type `ListResult`.

### PARAMETERSET

    public static final DataType PARAMETERSET

  This value indicates the data type `ParameterSet`.

### FILE

    public static final DataType FILE

  This value indicates the data type `FileParameter.FileRepresentation`.

Method Detail

### values

    public static 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 (DataType c : 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 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 name
    `NullPointerException` - if the argument is null

### canBeCastedFromTo

    public static boolean canBeCastedFromTo(DataType from,
                                            DataType to)

  Checks if the `DataType` `from` can be casted to the `DataType` `to` without losing information. The following casts are allowed:
  - `BYTE` -> `BYTE`, `SHORT`, `INT`, `LONG`, `DOUBLE`
  - `SHORT` -> `SHORT`, `INT`, `LONG`, `DOUBLE`
  - `INT` -> `INT`, `LONG`, `DOUBLE`
  - `LONG` -> `LONG`
  - `DOUBLE` -> `DOUBLE`

  Parameters:
    `from` - the `DataType` to cast from
    `to` - the `DataType` to cast to
  Returns:
    `true` if the cast is possible, `false` otherwise

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD