things.data
Enum Data.Type

java.lang.Object
  extended by java.lang.Enum<Data.Type>
      extended by things.data.Data.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Data.Type>
Enclosing interface:
Data

public static enum Data.Type
extends java.lang.Enum<Data.Type>

Type of Data. This can be used to give meaning to results, since most Data objects will come as a result to some operation. Having different purposes for General and Result types is probably a bad idea, since it forks the purpose of this class. However, too much work was done in other areas to separate them.


Enum Constant Summary
ABORT
           
COMMAND
           
COMMAND_RESPONSE
           
COMMENT
           
ENTRY
           
EXCEPTION
           
FAIL
           
GENERIC
           
INCONCLUSIVE
           
INFO
           
KEEPALIVE
           
METRIC
           
PASS
           
WAITING
           
 
Method Summary
 java.lang.String getShortName()
          Get the shortname for the outcome.
 boolean isResult()
          Is this a result type?
static Data.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Data.Type[] 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

GENERIC

public static final Data.Type GENERIC

ENTRY

public static final Data.Type ENTRY

COMMAND

public static final Data.Type COMMAND

COMMAND_RESPONSE

public static final Data.Type COMMAND_RESPONSE

COMMENT

public static final Data.Type COMMENT

KEEPALIVE

public static final Data.Type KEEPALIVE

METRIC

public static final Data.Type METRIC

INFO

public static final Data.Type INFO

PASS

public static final Data.Type PASS

INCONCLUSIVE

public static final Data.Type INCONCLUSIVE

FAIL

public static final Data.Type FAIL

EXCEPTION

public static final Data.Type EXCEPTION

ABORT

public static final Data.Type ABORT

WAITING

public static final Data.Type WAITING
Method Detail

values

public static Data.Type[] 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 (Data.Type c : Data.Type.values())
    System.out.println(c);

Returns:
an array containing the constants of this enum type, in the order they are declared

valueOf

public static Data.Type 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

getShortName

public java.lang.String getShortName()
Get the shortname for the outcome. It will be only 4 characters. Do this programatically to keep it completely static. No need to take up memory with the enum instance itself (yes, I know that can technically be wrong).

Returns:
the short name as a String.

isResult

public boolean isResult()
Is this a result type?

Returns:
true if it is, otherwise false.


Things.