public class Parameter extends Object implements Serializable
Constructor and Description |
---|
Parameter(String name,
double value)
Create a scalar double-valued param.
|
Parameter(String name,
double[] value)
Create a array double-valued param.
|
Parameter(String name,
Parameter from)
Copy constructor, with new name.
|
Parameter(String name,
String val)
Create a String-valued param.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object oo)
Instances which have same content are equal.
|
int |
getLength()
Get the number of values.
|
String |
getName()
Get the name of this Parameter.
|
double |
getNumericValue()
Retrieve numeric value, use if isString() is false.
|
double |
getNumericValue(int i)
Get the ith numeric value.
|
double[] |
getNumericValues()
Get array of numeric values as doubles.
|
String |
getStringValue()
Retrieve String value; only call if isString() is true.
|
int |
hashCode()
Override Object.hashCode() to implement equals.
|
boolean |
isString()
True if value is a String.
|
String |
toString()
String representation
|
public Parameter(String name, Parameter from)
name
- name of new Parameter.from
- copy values from here.public Parameter(String name, String val)
name
- name of new Parameter.val
- value of Parameterpublic Parameter(String name, double value)
name
- name of new Parameter.value
- value of Parameterpublic Parameter(String name, double[] value)
name
- name of new Parameter.value
- value of Parameterpublic String getName()
public boolean isString()
public String getStringValue()
public double getNumericValue()
getNumericValue(0)
public double getNumericValue(int i)
i
- indexpublic int getLength()
public double[] getNumericValues()
public boolean equals(Object oo)
public int hashCode()