jtge.engine.data
Class Context

java.lang.Object
  extended byjtge.engine.data.Context
All Implemented Interfaces:
IContext

public class Context
extends java.lang.Object
implements IContext

Implements a container of data.

Version:
$Revision: 1.8 $ $Date: 2005/09/14 18:50:05 $
Author:
Mathieu Champlon

Constructor Summary
Context()
          Create a context.
 
Method Summary
 java.lang.Object get(java.lang.Object key)
          Retrieve a data based on its identifier.
 void put(java.lang.Object key, java.lang.Object data)
          Add a data to the context.
 void register(java.lang.Object callback)
          Register a callback.

Any update( Type data ) method of this object will be called when the type of its data argument is compatible with the type of a data set by calling the set() method.

 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context()
Create a context.

Method Detail

put

public final void put(java.lang.Object key,
                      java.lang.Object data)
Add a data to the context.

Specified by:
put in interface IContext
Parameters:
key - the data unique identifier
data - the data

get

public final java.lang.Object get(java.lang.Object key)
Retrieve a data based on its identifier.

Specified by:
get in interface IContext
Parameters:
key - the data unique identifier
Returns:
the data

register

public final void register(java.lang.Object callback)
Register a callback.

Any update( Type data ) method of this object will be called when the type of its data argument is compatible with the type of a data set by calling the set() method.

Specified by:
register in interface IContext
Parameters:
callback - a callback


Copyright © 2003-2005 . All Rights Reserved.