public class JacksonInnerQuantity
extends java.lang.Object
JacksonValue.JSON_VALUE_TYPE_QUANTITY.| Constructor | Description |
|---|---|
JacksonInnerQuantity() |
Constructor.
|
JacksonInnerQuantity(java.math.BigDecimal amount,
java.math.BigDecimal upperBound,
java.math.BigDecimal lowerBound,
java.lang.String unit) |
Constructor.
|
| Modifier and Type | Method | Description |
|---|---|---|
boolean |
equals(java.lang.Object o) |
|
java.math.BigDecimal |
getAmount() |
Returns the numeric value.
|
java.lang.String |
getAmountAsString() |
|
java.lang.String |
getJsonUnit() |
Returns the string to use for the "unit" field in JSON.
|
java.math.BigDecimal |
getLowerBound() |
Returns the lower bound.
|
java.lang.String |
getLowerBoundAsString() |
|
java.lang.String |
getUnit() |
Returns the unit to be used, converting JSON-specific encodings of
"no unit" to the one used in WDTK.
|
java.math.BigDecimal |
getUpperBound() |
Returns the upper bound.
|
java.lang.String |
getUpperBoundAsString() |
|
void |
setAmount(java.math.BigDecimal amount) |
Sets the numerical value to the given value.
|
void |
setJsonUnit(java.lang.String unit) |
Sets the lower bound to the given value.
|
void |
setLowerBound(java.math.BigDecimal lowerBound) |
Sets the lower bound to the given value.
|
void |
setUpperBound(java.math.BigDecimal upperBound) |
Sets the upper bound to the given value.
|
public JacksonInnerQuantity()
public JacksonInnerQuantity(java.math.BigDecimal amount,
java.math.BigDecimal upperBound,
java.math.BigDecimal lowerBound,
java.lang.String unit)
amount - upperBound - lowerBound - unit - public java.math.BigDecimal getAmount()
QuantityValue.getNumericValue()public void setAmount(java.math.BigDecimal amount)
amount - new valuepublic java.math.BigDecimal getUpperBound()
QuantityValue.getUpperBound()public void setUpperBound(java.math.BigDecimal upperBound)
upperBound - new valuepublic java.math.BigDecimal getLowerBound()
QuantityValue.getLowerBound()public void setLowerBound(java.math.BigDecimal lowerBound)
lowerBound - bound new valuepublic java.lang.String getAmountAsString()
public java.lang.String getUpperBoundAsString()
public java.lang.String getLowerBoundAsString()
public java.lang.String getJsonUnit()
public void setJsonUnit(java.lang.String unit)
unit - new unit value, the string "1" is used in JSON to denote that
there is no unit for a quantitypublic java.lang.String getUnit()
public boolean equals(java.lang.Object o)
equals in class java.lang.ObjectCopyright © 2014–2017 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage