public class DecimalDt extends BasePrimitive<BigDecimal> implements Comparable<DecimalDt>, IBaseDecimalDatatype
| Constructor and Description |
|---|
DecimalDt()
Constructor
|
DecimalDt(BigDecimal theValue)
Constructor
|
DecimalDt(double theValue)
Constructor
|
DecimalDt(long theValue)
Constructor
|
DecimalDt(String theValue)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
int |
compareTo(DecimalDt theObj) |
protected String |
encode(BigDecimal theValue)
Subclasses must override to convert a "coerced" value into an encoded one.
|
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
|
equals, getValue, getValueAsString, hashCode, hasValue, isEmpty, readExternal, setValue, setValueAsString, toString, updateStringValue, writeExternalgetElementSpecificId, getId, setElementSpecificId, setId, setIdaddUndeclaredExtension, addUndeclaredExtension, addUndeclaredExtension, getAllUndeclaredExtensions, getFormatCommentsPost, getFormatCommentsPre, getUndeclaredExtensions, getUndeclaredExtensionsByUrl, getUndeclaredModifierExtensions, hasFormatComment, isBaseEmptyclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetValue, getValueAsString, hasValue, setValue, setValueAsStringfhirType, getFormatCommentsPost, getFormatCommentsPre, hasFormatComment, isEmptypublic DecimalDt()
public DecimalDt(BigDecimal theValue)
public DecimalDt(double theValue)
public DecimalDt(long theValue)
public int compareTo(DecimalDt theObj)
compareTo in interface Comparable<DecimalDt>protected String encode(BigDecimal theValue)
BasePrimitiveencode in class BasePrimitive<BigDecimal>theValue - Will not be nullpublic int getValueAsInteger()
BigDecimal.intValue()public Number getValueAsNumber()
protected BigDecimal parse(String theValue)
BasePrimitiveparse in class BasePrimitive<BigDecimal>theValue - Will not be nullpublic void round(int thePrecision)
MathContext.getPrecision()public void round(int thePrecision, RoundingMode theRoundingMode)
public void setValueAsInteger(int theValue)
Copyright © 2014–2019 University Health Network. All rights reserved.