jet.servlet
Class JetData

java.lang.Object
  extended by jet.servlet.JetData
All Implemented Interfaces:
Resetable

public class JetData
extends java.lang.Object
implements Resetable

Wrapper class for hierarchical TreeMap structure.

Author:
Markus Meisters

Field Summary
private  java.util.TreeMap data
          Holds the data map with the hierarchical structure
 
Constructor Summary
JetData()
          Constructor
 
Method Summary
 void add(java.lang.String key, java.lang.Object value)
          adds data to the map
 java.lang.Object get(java.lang.String key)
          gets the data to from the map
 java.util.TreeMap getData()
           
static java.lang.Object getMapped(java.lang.String key, java.util.TreeMap dest)
          Method to get value from TreeMap structure
 java.lang.String getMessage(java.lang.String key)
          Returns the message for the given key
 void init(java.util.TreeMap data)
          init method to initialize the TreeMap internal used - must be called from jetAction before used
 void reset()
          Method to reset the object for pooling
static void setMapped(java.lang.String key, java.lang.Object value, java.util.TreeMap dest)
          Method to set key/value pair on TreeMap structure
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

data

private java.util.TreeMap data
Holds the data map with the hierarchical structure

Constructor Detail

JetData

public JetData()
Constructor

Method Detail

init

public void init(java.util.TreeMap data)
init method to initialize the TreeMap internal used - must be called from jetAction before used

Parameters:
data - the TreeMap to use

getData

public java.util.TreeMap getData()

add

public void add(java.lang.String key,
                java.lang.Object value)
adds data to the map


get

public java.lang.Object get(java.lang.String key)
gets the data to from the map


getMessage

public java.lang.String getMessage(java.lang.String key)
Returns the message for the given key

Parameters:
key - key
Returns:
message

reset

public void reset()
Method to reset the object for pooling

Specified by:
reset in interface Resetable

setMapped

public static void setMapped(java.lang.String key,
                             java.lang.Object value,
                             java.util.TreeMap dest)
Method to set key/value pair on TreeMap structure

Parameters:
key - key
value - value
dest - TreeMap where to set the key/value pair

getMapped

public static java.lang.Object getMapped(java.lang.String key,
                                         java.util.TreeMap dest)
Method to get value from TreeMap structure

Parameters:
key - key
dest - TreeMap where to set the key/value pair