org.enhydra.barracuda.plankton.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
 void clearState()
          clear all state information
 Object getState(Object key)
          get a property in this StateMap
 List getStateKeys()
          get a list of the keys for this StateMap
 Map getStateValues()
          get a copy of the underlying Map that holds the state values
 void putState(Object key, Object val)
          set a property in this StateMap
 Object removeState(Object key)
          remove a property in this StateMap
 

Method Detail

putState

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

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

getState

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

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

removeState

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

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

getStateKeys

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

Returns:
a list the keys for this StateMap

getStateValues

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

Returns:
a copy of the underlying state Map

clearState

public void clearState()
clear all state information



Copyright © 2003 BarracudaMVC.org All Rights Reserved.