org.jicengine.operation
Class SimpleContext

java.lang.Object
  extended byorg.jicengine.operation.AbstractContext
      extended byorg.jicengine.operation.SimpleContext
All Implemented Interfaces:
Context

public class SimpleContext
extends AbstractContext

Author:
.timo

Nested Class Summary
 
Nested classes inherited from class org.jicengine.operation.Context
Context.DuplicateNameException, Context.ObjectNotFoundException
 
Constructor Summary
SimpleContext()
           
SimpleContext(java.lang.String name)
           
 
Method Summary
 void addObject(java.lang.String name, java.lang.Object object)
          If addObject success, the object stored will be returned by getObject with the same name.
 java.lang.Object getObject(java.lang.String name)
          finds an object from the context.
 boolean hasObject(java.lang.String name)
           
 
Methods inherited from class org.jicengine.operation.AbstractContext
getName, getName, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

SimpleContext

public SimpleContext()

SimpleContext

public SimpleContext(java.lang.String name)
Method Detail

hasObject

public boolean hasObject(java.lang.String name)

getObject

public java.lang.Object getObject(java.lang.String name)
                           throws Context.ObjectNotFoundException
Description copied from interface: Context
finds an object from the context.

Returns:
the object. NOTE: currently no null values supported.
Throws:
Context.ObjectNotFoundException - if the context doesn't have an object with the given name.

addObject

public void addObject(java.lang.String name,
                      java.lang.Object object)
Description copied from interface: Context
If addObject success, the object stored will be returned by getObject with the same name.