public class GCRealValue extends GCValue
GCVs of type "real" may be either unrestricted or range-restricted.
Unrestricted real GCVs may have values ranging from
-java.lang.Double.MAX_VALUE to java.lang.Double.MAX_VALUE.
Range-restricted real GCVs may have a lower bound, an upper bound, or both. If
the lower bound is not specified the minimum value is -java.lang.Double.MAX_VALUE.
If the upper bound is not specified the maximum value isjava.lang.Double.MAX_VALUE.
The GCV value must fall within the inclusive range specified by the bound(s).
Lexical value representations of "real" GCVs must match the following production:
Real ::= Integer | ('-'? Digit+ '.' Digit+)
Integer ::= '-'? Digit+
Digit ::= '0'|'1'|'2'|'3'|'4'|'5'|'6'|'7'|'8'|'9'
The default value of a newly-constructed GCRealValue object is 0.0.
GCValue.IllegalCloneStateException, GCValue.XmlComment, GCValue.XmlItem, GCValue.XmlProcessingInstructionmodified, parent, TYPE_BOOLEAN, TYPE_DN, TYPE_DN_REF, TYPE_ENUM, TYPE_GCV_REF, TYPE_GROUP, TYPE_HEADER, TYPE_INTEGER, TYPE_LIST, TYPE_PASSWORD_REF, TYPE_REAL, TYPE_STRING, TYPE_STRUCTURED, TYPE_SUBORDINATES, xmlItems| Modifier and Type | Method and Description |
|---|---|
GCValue |
cloneValue(java.lang.String name)
Clone this
GCValue instance and return the cloned instance. |
double |
getRangeHi()
Return the high end of any restrictive range that has been set.
|
double |
getRangeLo()
Return the low end of any restrictive range that has been set.
|
double |
getRealValue()
Return the value of this instance as a
double. |
java.lang.String |
getValue()
Return the current value of this instance.
|
void |
parseValue(java.lang.String value)
Parse the passed value based on the type and instance rules
for this "real" GCV.
|
void |
setRangeHi(double rHi)
Set the high end of a restrictive range for this real value.
|
void |
setRangeHi(java.lang.String rHi)
Set the high end of a restrictive range for this real value.
|
void |
setRangeLo(double rLo)
Set the low end of a restrictive range for this real value.
|
void |
setRangeLo(java.lang.String rLo)
Set the low end of a restrictive range for this real value.
|
void |
setValue(java.lang.String strValue)
Set the value for this instance.
|
addXmlComment, addXmlItems, addXmlProcessingInstruction, cloneCommon, construct, construct, constructGCVRef, constructGCVRef, constructGroup, constructHeader, constructStructuredValue, constructSubordinates, getDescription, getDescriptionRef, getDisplayName, getDisplayNameRef, getHidden, getMandatory, getName, getOwner, getParent, getType, getTypeString, getXmlItemsIterator, getXMLValue, hasBeenModified, localize, resetModified, setDescription, setDescriptionRef, setDisplayName, setDisplayNameRef, setHidden, setMandatory, toXML, typeFromStringpublic GCValue cloneValue(java.lang.String name)
GCValue instance and return the cloned instance.cloneValue in class GCValuethe - name for the cloned value.public void parseValue(java.lang.String value)
throws GCVException
The passed value must conform to the lexical rules specified in the description of this class.
In addition, the value must fall within the
range restriction if set, or, if no range has been set, the value must be greater than or
equal to -java.lang.Double.MAX_VALUE and less than or equal to
java.lang.Double.MAX_VALUE.
parseValue in class GCValuevalue - Value String to parseGCVException - thrown if value does not match "real" or instance constraints.public java.lang.String getValue()
public void setValue(java.lang.String strValue)
throws GCVException
The passed value must conform to the rules noted under parseValue().
setValue in class GCValuestrValue - Value String for this instance.GCVException - thrown if value is doesn't not parse correctly.parseValue(java.lang.String)public double getRealValue()
double.public double getRangeLo()
If no low end has been set the return is -java.lang.Double.MAX_VALUE.
-java.lang.Double.MAX_VALUE.public void setRangeLo(double rLo)
throws GCVException
If the passed value in rLo is greater than the high end of the
restrictive range then the high end is set equal to the new low end.
To remove the low end of a restrictive range pass
-java.lang.Double.MAX_VALUE for rLo.
rLo - new low end of restrictive range.GCVExceptionpublic void setRangeLo(java.lang.String rLo)
throws GCVException
If the passed value in rLo is greater than the high end of the
restrictive range then the high end is set equal to the new low end.
To remove the low end of a restrictive range pass
-java.lang.Double.MAX_VALUE for rLo.
The passed string value must match the lexical rules for "real" values.
rLo - new low end of restrictive range.GCVException - thrown if passed rLo string value is not a valid
lexical representation of an "real" value.public double getRangeHi()
If no high end has been set the return is java.lang.Double.MAX_VALUE.
java.lang.Double.MAX_VALUE.public void setRangeHi(double rHi)
throws GCVException
If the passed value in rHi is less than the low end of the
restrictive range then the low end is set equal to the new high end.
To remove the high end of a restrictive range pass
java.lang.Double.MAX_VALUE for rHi.
rHi - new high end of restrictive range.GCVExceptionpublic void setRangeHi(java.lang.String rHi)
throws GCVException
If the passed value in rHi is less than the low end of the
restrictive range then the low end is set equal to the new high end.
To remove the high end of a restrictive range pass
java.lang.Double.MAX_VALUE for rHi.
The passed string value must match the lexical rules for "real" values.
rHi - new high end of restrictive range.GCVException - thrown if passed rHi string value is not a valid
lexical representation of an "real" value.