net.sourceforge.rcache
Enum Cache.Operation

java.lang.Object
  extended by java.lang.Enum<Cache.Operation>
      extended by net.sourceforge.rcache.Cache.Operation
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Cache.Operation>
Enclosing interface:
Cache<K,V>

public static enum Cache.Operation
extends java.lang.Enum<Cache.Operation>

The operations defined in the Cache interface.

This enumeration can be used for any method needing to target a specific operation by name.


Enum Constant Summary
CLEAR
          clear() operation.
GET
          get() operation.
PUT
          put() operation.
REMOVE
          remove() operation.
 
Method Summary
static Cache.Operation valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Cache.Operation[] 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

GET

public static final Cache.Operation GET
get() operation.


PUT

public static final Cache.Operation PUT
put() operation.


REMOVE

public static final Cache.Operation REMOVE
remove() operation.


CLEAR

public static final Cache.Operation CLEAR
clear() operation.

Method Detail

values

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

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

valueOf

public static Cache.Operation 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


© 2007-2009 Rodrigo Ruiz
This site is hosted by