net.sf.ehcache.constructs.web
Class Header<T extends Serializable>

java.lang.Object
  extended by net.sf.ehcache.constructs.web.Header<T>
Type Parameters:
T - The type of Header value being stored. Must implement Serializable
All Implemented Interfaces:
Serializable

public class Header<T extends Serializable>
extends Object
implements Serializable

Generic implementation of a HTTP header. Handles String, Int and Date typed headers.

Version:
$Revision$
Author:
Eric Dalquist
See Also:
Serialized Form

Nested Class Summary
static class Header.Type
          Used to help differentiate the different header types
 
Constructor Summary
Header(String name, T value)
          Create a new Header
 
Method Summary
 boolean equals(Object obj)
           
 String getName()
           
 Header.Type getType()
           
 T getValue()
           
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Header

public Header(String name,
              T value)
Create a new Header

Parameters:
name - Name of the header, may not be null
value - Value of the header, may not be null
Method Detail

getName

public String getName()
Returns:
Name of the header, will never be null

getValue

public T getValue()
Returns:
Value for the header, will never be null

getType

public Header.Type getType()
Returns:
The header type

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

equals

public boolean equals(Object obj)
Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()


Copyright © 2003-2011 Terracotta, Inc.. All Rights Reserved.