com.jfw.web.util
Class DataContainer

java.lang.Object
  extended by com.jfw.web.util.DataContainer

public final class DataContainer
extends java.lang.Object

A data container. Use a HashMap for save the data.

See Also:
DataContainerManager

Constructor Summary
DataContainer()
          Create the object and call mathod initialize().
 
Method Summary
 boolean exist(java.lang.String key)
          Check if a key exist in container.
 java.lang.Object get(java.lang.String key)
          Get a value from container.
 boolean put(java.lang.String key, java.lang.Object value)
          Set a data in container.
 boolean remove(java.lang.String key)
          Delete a key from container.
 java.lang.String toString()
          Return the toString of attribute container.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DataContainer

public DataContainer()
Create the object and call mathod initialize().

Method Detail

put

public boolean put(java.lang.String key,
                   java.lang.Object value)
Set a data in container.

Parameters:
key - the key to associate with the value.
value - the value to store.
Returns:
true, if key exist in container, false in other case.

get

public java.lang.Object get(java.lang.String key)
Get a value from container.

Parameters:
key - the key associated with the value.
Returns:
the value or nullif key not found in container.

exist

public boolean exist(java.lang.String key)
Check if a key exist in container.

Returns:
true if key exist, false in other case.

remove

public boolean remove(java.lang.String key)
Delete a key from container.

Returns:
true if key exist, false in other case.

toString

public java.lang.String toString()
Return the toString of attribute container.

Overrides:
toString in class java.lang.Object
Returns:
the toString of attribute container.