net.sf.ehcache.constructs.web
Enum Header.Type

java.lang.Object
  extended by java.lang.Enum<Header.Type>
      extended by net.sf.ehcache.constructs.web.Header.Type
All Implemented Interfaces:
java.io.Serializable, java.lang.Comparable<Header.Type>
Enclosing class:
Header<T extends java.io.Serializable>

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

Used to help differentiate the different header types


Enum Constant Summary
DATE
          A date Header.
INT
          A int Header.
STRING
          A String Header.
 
Method Summary
static Header.Type determineType(java.lang.Class<? extends java.io.Serializable> typeClass)
          Determines the Header.Type of the Header.
 java.lang.Class<? extends java.io.Serializable> getTypeClass()
           
static Header.Type valueOf(java.lang.String name)
          Returns the enum constant of this type with the specified name.
static Header.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

STRING

public static final Header.Type STRING
A String Header. HttpServletResponse.setHeader(String, String)


DATE

public static final Header.Type DATE
A date Header. HttpServletResponse.setDateHeader(String, long)


INT

public static final Header.Type INT
A int Header. HttpServletResponse.setIntHeader(String, int)

Method Detail

values

public static Header.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 (Header.Type c : Header.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 Header.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

getTypeClass

public java.lang.Class<? extends java.io.Serializable> getTypeClass()
Returns:
The header type class this Type represents

determineType

public static Header.Type determineType(java.lang.Class<? extends java.io.Serializable> typeClass)
Determines the Header.Type of the Header. Throws IllegalArgumentException if the specified class does not match any of the Types



Copyright ? 2003-2010 Terracotta, Inc.. All Rights Reserved.