Package edu.cmu.tetrad.util
Class Parameters
java.lang.Object
edu.cmu.tetrad.util.Parameters
- All Implemented Interfaces:
TetradSerializable,Serializable
Stores a list of named parameters with their values. Stores default values for known parameters. Returns a list of
parameters with their values, for the parameters whose values have been retrieved, using the toString method.
- Version:
- $Id: $Id
- Author:
- josephramsey
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor for Parameters.Parameters(Parameters parameters) Constructor for Parameters. -
Method Summary
Modifier and TypeMethodDescriptionReturns the object value of the given parameter, looking up its default in the ParamDescriptions map.Returns the object value of the given parameter, using the given default.booleangetBoolean(String name) Returns the boolean value of the given parameter, looking up its default in the ParamDescriptions map.booleangetBoolean(String name, boolean defaultValue) Returns the boolean value of the given parameter, using the given default.doubleReturns the double value of the given parameter, looking up its default in the ParamDescriptions map.doubleReturns the object value of the given parameter, using the given default.intReturns the integer value of the given parameter, looking up its default in the ParamDescriptions map.intReturns the integer value of the given parameter, looking up its default in the ParamDescriptions map.longReturns the long value of the given parameter, looking up its default in the ParamDescriptions map.longReturns the long value of the given parameter, looking up its default in the ParamDescriptions map.intgetNumValues(String name) Returns the number of values for the parameter.getParametersNames.Returns the string value of the given parameter, looking up its default in the ParamDescriptions map.Returns the string value of the given parameter, using the given default.Object[]Returns the values set for the given parameter.voidputAll(Parameters parameters) putAll.voidRemoves the specified parameter from the list of parameters.static ParametersserializableInstance.voidSets the given parameter to the given value.voidSets the value(s) of the given parameter to a list of strings.voidSets the given parameter to the given value.voidSets the value(s) of the given parameter to a list of values.toString()
-
Constructor Details
-
Parameters
public Parameters()Constructor for Parameters.
-
Parameters
Constructor for Parameters.
- Parameters:
parameters- aParametersobject
-
-
Method Details
-
serializableInstance
serializableInstance.
- Returns:
- a
Parametersobject
-
putAll
putAll.
- Parameters:
parameters- aParametersobject
-
toString
Returns a list of the parameters whose values were actually used in the course of the simulation.
-
getInt
Returns the integer value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name- The name of the parameter.- Returns:
- The integer value of this parameter.
-
getLong
Returns the long value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name- The name of the parameter.- Returns:
- The long value of this parameter.
-
getBoolean
Returns the boolean value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name- The name of the parameter.- Returns:
- The boolean value of this parameter.
-
getDouble
Returns the double value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name- The name or the parameter.- Returns:
- The double value of this parameter.
-
getString
Returns the string value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name- The name or the parameter.- Returns:
- The string value of this parameter.
-
get
Returns the object value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name- The name of the parameter.- Returns:
- The object value of this parameter.
-
getInt
Returns the integer value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name- The name of the parameter.defaultValue- a int- Returns:
- The integer value of this parameter.
-
getLong
Returns the long value of the given parameter, looking up its default in the ParamDescriptions map.- Parameters:
name- The name of the parameter.defaultValue- a long- Returns:
- The long value of this parameter.
-
getBoolean
Returns the boolean value of the given parameter, using the given default.- Parameters:
name- The name of the parameter.defaultValue- a boolean- Returns:
- The boolean value of this parameter.
-
getDouble
Returns the object value of the given parameter, using the given default.- Parameters:
name- The name of the parameter.defaultValue- a double- Returns:
- The double value of this parameter.
-
getString
Returns the string value of the given parameter, using the given default.- Parameters:
name- The name of the parameter.defaultValue- aStringobject- Returns:
- The string value of this parameter.
-
get
Returns the object value of the given parameter, using the given default.- Parameters:
name- The name of the parameter.defaultValue- aObjectobject- Returns:
- The object value of this parameter.
-
getValues
Returns the values set for the given parameter. Usually of length 1.- Parameters:
name- The name of the parameter.- Returns:
- The array of values.
-
set
Sets the value(s) of the given parameter to a list of strings.- Parameters:
name- The name of the parameter.n- A list of values for the parameter.
-
set
Sets the value(s) of the given parameter to a list of values.- Parameters:
name- The name of the parameter.s- A list of strings for the parameter.
-
getNumValues
Returns the number of values for the parameter.- Parameters:
name- The name of the parameter.- Returns:
- The number of values set for that parameter.
-
set
Sets the given parameter to the given value.- Parameters:
name- The name of the parameter.value- The value of the parameter (a single value).
-
set
Sets the given parameter to the given value.- Parameters:
name- The name of the parameter.value- The value of the parameter (a single value).
-
getParametersNames
getParametersNames.
- Returns:
- a
Setobject
-
remove
Removes the specified parameter from the list of parameters.- Parameters:
parameter- The parameter to remove.
-