@Immutable
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 an 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 o) |
int |
getLength()
Get the number of double 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.
|
int |
hashCode() |
boolean |
isString()
True if value is a String.
|
java.lang.String |
toString() |
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()
@Nullable public java.lang.String getStringValue()
public double getNumericValue()
getNumericValue(0)
public double getNumericValue(int i)
i
- indexpublic int getLength()
@Nullable public double[] getNumericValues()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
public int hashCode()
hashCode
in class java.lang.Object
public java.lang.String toString()
toString
in class java.lang.Object