net.sf.ehcache.constructs.web
Class Header<T extends java.io.Serializable>
java.lang.Object
net.sf.ehcache.constructs.web.Header<T>
- Type Parameters:
T - The type of Header value being stored. Must implement Serializable
- All Implemented Interfaces:
- java.io.Serializable
public class Header<T extends java.io.Serializable>
- extends java.lang.Object
- implements java.io.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(java.lang.String name,
T value)
Create a new Header |
| Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Header
public Header(java.lang.String name,
T value)
- Create a new Header
- Parameters:
name - Name of the header, may not be nullvalue - Value of the header, may not be null
getName
public java.lang.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 java.lang.Object
- See Also:
Object.hashCode()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals in class java.lang.Object
- See Also:
Object.equals(java.lang.Object)
toString
public java.lang.String toString()
- Overrides:
toString in class java.lang.Object
- See Also:
Object.toString()
Copyright ? 2003-2010 Terracotta, Inc.. All Rights Reserved.