public class ReconValue
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
protected java.lang.Object[] |
attributeUnits
optionally used internal storage for the attribute measurement units
|
protected java.lang.Object[] |
attributeValues
internal storage for the attribute values
|
protected ReconValue |
parentValue |
protected ReconExpression |
rule
a successful rule reference piggybacked on the ReconValue object (no need
for yet another cache, a successful match will always correspond to one
rule)
|
protected ReconValueSet |
valueSet |
Constructor and Description |
---|
ReconValue(ReconValueSet valueSet,
java.lang.Object[] values)
Copies all values contained in the parameter to an internal storage
|
ReconValue(ReconValueSet valueSet,
java.lang.Object[] values,
java.lang.Object[] units)
Copies all values and their units contained in the parameters to an
internal storage
|
Modifier and Type | Method and Description |
---|---|
int |
compareTo(ReconValue anotherReconValue)
Compares two ReconValue objects.
|
java.lang.Object[] |
getAllUnits()
Returns a reference to the measurement units
|
java.lang.Object[] |
getAllValues()
Returns a reference to the internal storage
|
java.lang.String |
getObjectName() |
ReconValue |
getParentValue() |
ReconExpression |
getRule() |
protected int |
getUniqueId()
Assuming the object's unique ID is an integer value, return it
|
java.lang.Object |
getUnit(int index) |
java.lang.Object |
getValue(int index) |
java.lang.Object |
getValue(java.lang.String attributeName) |
boolean |
hasUnit(int index)
Assumes that the object saved as units are String, or will throw bad cast
exception
|
boolean |
isDataSet1() |
protected void |
setAllUnits(java.lang.Object[] units)
Copies all unit valueds contained in the parameter to an internal storage
|
protected void |
setAllValues(java.lang.Object[] values)
Copies all values contained in the parameter to an internal storage
|
void |
setParentValue(ReconValue parentValue) |
void |
setRule(ReconExpression rule) |
void |
setUnit(java.lang.String unit,
int index) |
void |
setValue(java.lang.Object val,
int index) |
protected ReconValueSet valueSet
protected ReconValue parentValue
protected java.lang.Object[] attributeValues
protected java.lang.Object[] attributeUnits
protected ReconExpression rule
public ReconValue(ReconValueSet valueSet, java.lang.Object[] values)
valueSet
- values
- public ReconValue(ReconValueSet valueSet, java.lang.Object[] values, java.lang.Object[] units)
isDataSet1
- values
- units
- public java.lang.Object getValue(int index)
index
- public java.lang.Object getValue(java.lang.String attributeName)
public java.lang.Object getUnit(int index)
index
- public boolean hasUnit(int index)
index
- public java.lang.Object[] getAllValues()
public java.lang.Object[] getAllUnits()
protected void setAllValues(java.lang.Object[] values)
values
- protected void setAllUnits(java.lang.Object[] units)
This is really a patch on top of the ReconValue objct to allow storage and retrieval of units associated with values
units
- public void setValue(java.lang.Object val, int index)
public void setUnit(java.lang.String unit, int index)
public boolean isDataSet1()
public int compareTo(ReconValue anotherReconValue)
anotherReconValue
- the ReconValue
to be compared.0
if the argument ReconValue is equal to
this ReconValue; a value less than 0
if this
ReconValue is less than the ReconValue argument; and a value
greater than 0
if this ReconValue is greater than
the ReconValue argument.protected int getUniqueId()
public ReconExpression getRule()
public void setRule(ReconExpression rule)
rule
- The rule to set.public java.lang.String getObjectName()
public ReconValue getParentValue()
public void setParentValue(ReconValue parentValue)
rule
- The rule to set.