public final class DatatypeDefinitionReal extends DatatypeDefinition
The specific form of a DatatypeDefinitionReal
in a ReqIF file is as follows:
<DATATYPE-DEFINITION-REAL ACCURACY="accuracy" DESC="desc" IDENTIFIER="identifier" LAST-CHANGE="lastChange" LONG-NAME="longName" MAX="max" MIN="min">
The following is the common list of XML attributes:
@ACCURACY
required xsd:integer
specifies the number of decimal places to keep for this datatype@DESC
optional xsd:string
description@IDENTIFIER
required xsd:ID
@LAST-CHANGE
required xsd:dateTime
@LONG-NAME
optional xsd:string
@MAX
required xsd:double
specifies the maximum value allowed to be specified for this datatype@MIN
required xsd:double
specifies the minimum value allowed to be specified for this datatypeTruncation occurs for attribute values based on this datatype definition when the ReqIF is saved.
Modifier and Type | Method and Description |
---|---|
long |
getAccuracy()
Gets the
@ACCURACY attribute value for this DatatypeDefinitionReal object. |
java.lang.String |
getAccuracyText()
Returns the String representation for the
ACCURACY attribute. |
double |
getMax()
Gets the
@MAX attribute value for this DatatypeDefinitionReal object. |
java.lang.String |
getMaxText()
Returns the String representation for the
MAX attribute. |
double |
getMin()
Gets the
@MIN attribute value for this DatatypeDefinitionReal object |
java.lang.String |
getMinText()
Returns the String representation for the
MIN attribute. |
void |
setAccuracy(long accuracy)
Sets the
accuracy property for this DatatypeDefinitionReal object. |
void |
setMax(double max)
Sets the
@MAX attribute for this DatatypeDefinitionReal object. |
void |
setMin(double min)
Sets the
@MIN attribute for this DatatypeDefinitionReal object. |
getDatatypeName, toString
equals, getAlternativeID, getChildren, getDesc, getIdentifier, getLastChange, getLastChangeText, getLongName, getPathToRoot, getReqIFContent, hashCode, isUsed, isValidIdentifier, setAlternativeID, setDesc, setLastChange, setLongName, whereUsed
public java.lang.String getMaxText()
MAX
attribute.MAX
attribute.public java.lang.String getMinText()
MIN
attribute.MIN
attribute.public java.lang.String getAccuracyText()
ACCURACY
attribute.ACCURACY
attribute.public long getAccuracy()
@ACCURACY
attribute value for this DatatypeDefinitionReal
object.@ACCURACY
attribute, not negativepublic void setAccuracy(long accuracy) throws InvalidValueException, NotFoundException
accuracy
property for this DatatypeDefinitionReal
object.accuracy
- the positive number to set for the @ACCURACY
attributeInvalidValueException
- if the specified value is negativeNotFoundException
- if the DatatypeDefinitionReal
is not in the Datatypes
collectionpublic double getMax()
@MAX
attribute value for this DatatypeDefinitionReal
object.@MAX
attributepublic void setMax(double max) throws InvalidValueException, NotFoundException
@MAX
attribute for this DatatypeDefinitionReal
object.
When setting this value, consider any existing AttributeDefinitionReal
objects associated with a
SpecType
subclasses that may have specified a default double
value based on this DatatypeDefinitionReal
object
that is greater than this value. Similarly there may be existing AttributeValueReal
objects also with
double
values greater than this value. Any attempt to set this value exceeding any existing instance will cause an
InvalidValueException
to be raised.
max
- the value to set for the @MAX
attributeInvalidValueException
- if the value is lower than the current @MIN
attribute or any existing
attribute values or default values that are linked to this DatatypeDefinitionReal
objectNotFoundException
- if the DatatypeDefinitionReal
is not in the Datatypes
collectionpublic double getMin()
@MIN
attribute value for this DatatypeDefinitionReal
object@MIN
attributepublic void setMin(double min) throws InvalidValueException, NotFoundException
@MIN
attribute for this DatatypeDefinitionReal
object.
When setting this value, consider any existing AttributeDefinitionReal
objects associated with a
SpecType
subclasses that may have specified a default double
value based on this DatatypeDefinitionReal
object
that is less than this value. Similarly there may be existing AttributeValueReal
objects also with
double
values lower than this value. Any attempt to set this value lower than any existing instance will cause an
InvalidValueException
to be raised.
min
- the value to set for the @MIN
attributeInvalidValueException
- if the value is higher than the current @MAX
attribute or any existing
attribute values or default values that are linked to this DatatypeDefinitionReal
objectNotFoundException
- if the DatatypeDefinitionReal
is not in the Datatypes
collection