public class DecimalType extends PrimitiveType<BigDecimal> implements Comparable<DecimalType>, org.hl7.fhir.instance.model.api.IBaseDecimalDatatype
| Constructor and Description |
|---|
DecimalType()
Constructor
|
DecimalType(BigDecimal theValue)
Constructor
|
DecimalType(double theValue)
Constructor
|
DecimalType(long theValue)
Constructor
|
DecimalType(String theValue)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(DecimalType theObj) |
DecimalType |
copy() |
protected String |
encode(BigDecimal theValue)
Subclasses must override to convert a "coerced" value into an encoded one.
|
String |
fhirType() |
int |
getValueAsInteger()
Gets the value as an integer, using
BigDecimal.intValue() |
Number |
getValueAsNumber() |
protected BigDecimal |
parse(String theValue)
Subclasses must override to convert an encoded representation of this datatype into a "coerced" one
|
void |
round(int thePrecision)
Rounds the value to the given prevision
|
void |
round(int thePrecision,
RoundingMode theRoundingMode)
Rounds the value to the given prevision
|
void |
setValueAsInteger(int theValue)
Sets a new value using an integer
|
asStringValue, equalsDeep, equalsShallow, fromStringValue, getValue, getValueAsString, hashCode, hasValue, isEmpty, isPrimitive, primitiveValue, setValue, setValueAsString, toString, typedCopy, updateStringValueaddChild, addExtension, addExtension, copyValues, getExtension, getExtensionsByUrl, getExtensionString, getId, getIdElement, hasExtension, hasExtension, hasId, hasIdElement, listChildren, setId, setIdElement, setPropertycastToAddress, castToAnnotation, castToAttachment, castToBase64Binary, castToBoolean, castToCode, castToCodeableConcept, castToCoding, castToContactPoint, castToDate, castToDateTime, castToDecimal, castToDuration, castToElementDefinition, castToExtension, castToHumanName, castToId, castToIdentifier, castToInstant, castToInteger, castToMarkdown, castToMeta, castToMoney, castToNarrative, castToOid, castToPeriod, castToPositiveInt, castToQuantity, castToRange, castToRatio, castToReference, castToResource, castToSampledData, castToSignature, castToSimpleQuantity, castToString, castToTime, castToTiming, castToUnsignedInt, castToUri, children, compareDeep, compareDeep, compareDeep, compareValues, compareValues, equals, getChildByName, getFormatCommentsPost, getFormatCommentsPre, getUserData, getUserInt, getUserString, hasFormatComment, hasType, hasUserData, isMetadataBased, listChildrenByName, setUserData, setUserDataINNclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitgetValue, getValueAsString, setValue, setValueAsStringpublic DecimalType()
public DecimalType(BigDecimal theValue)
public DecimalType(double theValue)
public DecimalType(long theValue)
public DecimalType(String theValue)
public int compareTo(DecimalType theObj)
compareTo in interface Comparable<DecimalType>protected String encode(BigDecimal theValue)
PrimitiveTypeencode in class PrimitiveType<BigDecimal>theValue - Will not be nullpublic int getValueAsInteger()
BigDecimal.intValue()public Number getValueAsNumber()
protected BigDecimal parse(String theValue)
PrimitiveTypeparse in class PrimitiveType<BigDecimal>theValue - Will not be nullpublic void round(int thePrecision)
MathContext.getPrecision()public void round(int thePrecision, RoundingMode theRoundingMode)
public void setValueAsInteger(int theValue)
public DecimalType copy()
copy in class PrimitiveType<BigDecimal>Copyright © 2014–2018 University Health Network. All rights reserved.