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.boolean
getBoolean
(String name) Returns the boolean value of the given parameter, looking up its default in the ParamDescriptions map.boolean
getBoolean
(String name, boolean defaultValue) Returns the boolean value of the given parameter, using the given default.double
Returns the double value of the given parameter, looking up its default in the ParamDescriptions map.double
Returns the object value of the given parameter, using the given default.int
Returns the integer value of the given parameter, looking up its default in the ParamDescriptions map.int
Returns the integer value of the given parameter, looking up its default in the ParamDescriptions map.long
Returns the long value of the given parameter, looking up its default in the ParamDescriptions map.long
Returns the long value of the given parameter, looking up its default in the ParamDescriptions map.int
getNumValues
(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.void
putAll
(Parameters parameters) putAll.void
Removes the specified parameter from the list of parameters.static Parameters
serializableInstance.void
Sets the given parameter to the given value.void
Sets the value(s) of the given parameter to a list of strings.void
Sets the given parameter to the given value.void
Sets 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
- aParameters
object
-
-
Method Details
-
serializableInstance
-
putAll
-
toString
-
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
-
get
-
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
-
get
-
getValues
-
set
-
set
-
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
-
set
-
getParametersNames
-
remove
Removes the specified parameter from the list of parameters.- Parameters:
parameter
- The parameter to remove.
-