org.keyczar.enums
Enum KeyStatus

java.lang.Object
  extended by java.lang.Enum<KeyStatus>
      extended by org.keyczar.enums.KeyStatus
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<KeyStatus>

public enum KeyStatus
extends java.lang.Enum<KeyStatus>

Encodes different possible statuses of keys:

JSON Representation is one of the strings:

Author:
steveweis@gmail.com (Steve Weis), arkajit.dey@gmail.com (Arkajit Dey)

Enum Constant Summary
ACTIVE
           
INACTIVE
           
PRIMARY
           
 
Method Summary
static KeyStatus getStatus(int value)
           
static KeyStatus getStatus(java.lang.String name)
           
static KeyStatus valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static KeyStatus[] values()
          Returns an array containing the constants of this enum type, in the order they are declared.
 
Methods inherited from class java.lang.Enum
compareTo, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Enum Constant Detail

PRIMARY

public static final KeyStatus PRIMARY

ACTIVE

public static final KeyStatus ACTIVE

INACTIVE

public static final KeyStatus INACTIVE
Method Detail

values

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

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

valueOf

public static KeyStatus 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

getStatus

public static KeyStatus getStatus(int value)

getStatus

public static KeyStatus getStatus(java.lang.String name)