public class Parameter
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Parameter(java.lang.String name,
double value)
Create a scalar double-valued param.
|
Parameter(java.lang.String name,
double[] value)
Create a array double-valued param.
|
Parameter(java.lang.String name,
Parameter from)
Copy constructor, with new name.
|
Parameter(java.lang.String name,
java.lang.String val)
Create a String-valued param.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(java.lang.Object oo)
Instances which have same content are equal.
|
int |
getLength()
Get the number of values.
|
java.lang.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.
|
java.lang.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.
|
java.lang.String |
toString()
String representation
|
public Parameter(java.lang.String name, Parameter from)
name
- name of new Parameter.from
- copy values from here.public Parameter(java.lang.String name, java.lang.String val)
name
- name of new Parameter.val
- value of Parameterpublic Parameter(java.lang.String name, double value)
name
- name of new Parameter.value
- value of Parameterpublic Parameter(java.lang.String name, double[] value)
name
- name of new Parameter.value
- value of Parameterpublic java.lang.String getName()
public boolean isString()
public java.lang.String getStringValue()
public double getNumericValue()
getNumericValue(0)
public double getNumericValue(int i)
i
- indexpublic int getLength()
public double[] getNumericValues()
public boolean equals(java.lang.Object oo)
equals
in class java.lang.Object
oo
- compare to this Parameter.public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object