uchicago.src.sim.parameter.rpl
Class RPLFactory

java.lang.Object
  extended by uchicago.src.sim.parameter.rpl.RPLFactory

public class RPLFactory
extends java.lang.Object

Factory class for creating RPLParameter and RPLValues from intermediary objects.

Version:
$Revision: 1.4 $ $Date: 2004/10/19 18:12:54 $

Constructor Summary
RPLFactory()
           
 
Method Summary
static RPLParameter createConstant(java.lang.String name, RPLObject val)
          Creates a constant RPLParameter from the specified name and having the specified value.
static RPLParameter createParameter(java.lang.String name, RPLList list)
          Creates an RPLParameter with specified name whose value is defined by the specified list.
static RPLParameter createParameter(java.lang.String name, RPLObject start, RPLObject end)
          Creates an RPLParameter with specified name from the specified starting and ending values.
static RPLParameter createParameter(java.lang.String name, RPLObject start, RPLObject end, RPLObject incr)
          Creates an RPLParameter with specified name from the specified starting, ending and increment values.
static RPLList createRPLList(java.util.List list)
          Creates an RPLList from the specified list.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RPLFactory

public RPLFactory()
Method Detail

createRPLList

public static RPLList createRPLList(java.util.List list)
Creates an RPLList from the specified list. This will convert all the items in the list to the type of the first item, if possible.

Parameters:
list - the list of RPLObjects used to create the RPLList
Returns:
the created RPLList

createConstant

public static RPLParameter createConstant(java.lang.String name,
                                          RPLObject val)
Creates a constant RPLParameter from the specified name and having the specified value.

Parameters:
name - the name of the parameter
val - an RPLObject representing the value of the constant.
Returns:

createParameter

public static RPLParameter createParameter(java.lang.String name,
                                           RPLList list)
Creates an RPLParameter with specified name whose value is defined by the specified list.

Parameters:
name - the name of the parameter
list - an RPLList whose items are represent the possible values of the parameter
Returns:
a new RPLParameter

createParameter

public static RPLParameter createParameter(java.lang.String name,
                                           RPLObject start,
                                           RPLObject end)
Creates an RPLParameter with specified name from the specified starting and ending values.

Parameters:
name - the name of the parameter
start - an RPLObject that represents the starting value of the new RPLParameter
end - an RPLObject that represents the ending value of the new RPLParameter
Returns:
a new RPLParameter

createParameter

public static RPLParameter createParameter(java.lang.String name,
                                           RPLObject start,
                                           RPLObject end,
                                           RPLObject incr)
Creates an RPLParameter with specified name from the specified starting, ending and increment values.

Parameters:
name - the name of the parameter
start - an RPLObject that represents the starting value of the new RPLParameter
end - an RPLObject that represents the ending value of the new RPLParameter
incr - an RPLObject that represents the increment value of the new RPLParameter
Returns:
a new RPLParameter