MOEA Framework 2.12
API Specification

org.moeaframework.util.tree
Class Environment

java.lang.Object
  extended by org.moeaframework.util.tree.Environment

public class Environment
extends Object

The execution context, or environment, storing the named variables used by a program. Defined functions are first-class objects and also stored in the environment.


Constructor Summary
Environment()
          Constructs a new, empty environment.
Environment(Environment parent)
          Constructs a new environment enclosed within the specified enclosing environment.
 
Method Summary
<T> T
get(Class<T> type, String name)
          Returns the content of the named variable stored in this environment or its enclosing environment; or null if the variable has not yet been defined.
 void set(String name, Object value)
          Sets the content of the named variable to the specified value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Environment

public Environment()
Constructs a new, empty environment.


Environment

public Environment(Environment parent)
Constructs a new environment enclosed within the specified enclosing environment.

Parameters:
parent - the enclosing environment
Method Detail

get

public <T> T get(Class<T> type,
                 String name)
Returns the content of the named variable stored in this environment or its enclosing environment; or null if the variable has not yet been defined.

Parameters:
type - the type of the variable
name - the name of the variable
Returns:
the content of the named variable stored in this environment or its enclosing environment; or null if the variable has not yet been defined

set

public void set(String name,
                Object value)
Sets the content of the named variable to the specified value.

Parameters:
name - the name of the variable
value - the value to store in the variable

MOEA Framework 2.12
API Specification

Copyright 2009-2016 MOEA Framework. All rights reserved.
Licensed under the GNU Lesser General Public License.
Return to the MOEA Framework homepage. Visit us on Github!