org.enhydra.barracuda.core.util.data
Interface StateMap

All Known Subinterfaces:
BaseEvent, ControlEventContext, EventContext, FormMap, PData, PList, PMap, ViewContext, ViewEventContext
All Known Implementing Classes:
AbstractBComponent, AbstractPData, DefaultBaseEvent, DefaultEventContext, DefaultFormMap, DefaultStateMap, DefaultViewContext, HttpSessionStateMap, MapStateMap, PArrayList, PHashMap, ServletContextStateMap, ServletRequestParameterStateMap, ServletRequestStateMap

public interface StateMap

This interface defines the methods needed to implement state in an object. By this we mean that an object is capable of carrying state information along with it--you can put properties into the state and then get them back out.

Key entities that implement StateMap:


Method Summary
 java.lang.Object getState(java.lang.Object key)
          get a property in this StateMap
 java.util.List getStateKeys()
          get a list of the keys for this StateMap
 java.util.Map getStateValues()
          get a copy of the underlying Map that holds the state values
 void putState(java.lang.Object key, java.lang.Object val)
          set a property in this StateMap
 java.lang.Object removeState(java.lang.Object key)
          remove a property in this StateMap
 

Method Detail

putState

public void putState(java.lang.Object key,
                     java.lang.Object val)
set a property in this StateMap

Parameters:
key - the key object
val - the value object

getState

public java.lang.Object getState(java.lang.Object key)
get a property in this StateMap

Parameters:
key - the key object
Returns:
the value for the given key

removeState

public java.lang.Object removeState(java.lang.Object key)
remove a property in this StateMap

Parameters:
key - the key object
Returns:
the object which was removed

getStateKeys

public java.util.List getStateKeys()
get a list of the keys for this StateMap

Returns:
a list the keys for this StateMap

getStateValues

public java.util.Map getStateValues()
get a copy of the underlying Map that holds the state values

Returns:
a copy of the underlying state Map


Copyright © 2001 Enhydra.org