public class QuantityValueImpl extends ValueImpl implements QuantityValue
QuantityValue.JSON_VALUE_TYPE_ENTITY_ID, JSON_VALUE_TYPE_GLOBE_COORDINATES, JSON_VALUE_TYPE_MONOLINGUAL_TEXT, JSON_VALUE_TYPE_QUANTITY, JSON_VALUE_TYPE_STRING, JSON_VALUE_TYPE_TIME| Constructor and Description |
|---|
QuantityValueImpl(BigDecimal numericValue,
BigDecimal lowerBound,
BigDecimal upperBound,
ItemIdValue unit)
Constructor.
|
QuantityValueImpl(BigDecimal numericValue,
BigDecimal lowerBound,
BigDecimal upperBound,
String unit)
Deprecated.
supply the unit as an ItemIdValue instead
|
| Modifier and Type | Method and Description |
|---|---|
<T> T |
accept(ValueVisitor<T> valueVisitor)
Accept a ValueVisitor and return its output.
|
boolean |
equals(Object obj) |
BigDecimal |
getLowerBound()
Returns the upper bound for the numeric value of this quantity.
|
BigDecimal |
getNumericValue()
Returns the main numeric value of this quantity.
|
String |
getUnit()
Returns the unit of this quantity, or the string "1" if there is no
unit.
|
ItemIdValue |
getUnitItemId() |
BigDecimal |
getUpperBound()
Returns the upper bound for the numeric value of this quantity.
|
org.wikidata.wdtk.datamodel.implementation.QuantityValueImpl.JacksonInnerQuantity |
getValue()
Returns the inner value helper object.
|
int |
hashCode() |
String |
toString() |
public QuantityValueImpl(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound, ItemIdValue unit)
numericValue - the numeric value of this quantitylowerBound - the lower bound of the numeric value of this quantity or null
if not setupperBound - the upper bound of the numeric value of this quantity or null
if not setunit - the unit of this quantity, or null if there is no
unit@Deprecated public QuantityValueImpl(BigDecimal numericValue, BigDecimal lowerBound, BigDecimal upperBound, String unit)
numericValue - the numeric value of this quantitylowerBound - the lower bound of the numeric value of this quantity or null
if not setupperBound - the upper bound of the numeric value of this quantity or null
if not setunit - the unit of this quantity, or the empty string if there is no
unitpublic org.wikidata.wdtk.datamodel.implementation.QuantityValueImpl.JacksonInnerQuantity getValue()
public BigDecimal getNumericValue()
QuantityValuegetNumericValue in interface QuantityValuepublic BigDecimal getLowerBound()
QuantityValuegetLowerBound in interface QuantityValuepublic BigDecimal getUpperBound()
QuantityValuegetUpperBound in interface QuantityValuepublic String getUnit()
QuantityValuegetUnit in interface QuantityValuepublic ItemIdValue getUnitItemId()
getUnitItemId in interface QuantityValuepublic <T> T accept(ValueVisitor<T> valueVisitor)
ValueCopyright © 2014–2022 Wikidata Toolkit Developers. Generated from source code published under the Apache License 2.0. For more information, see the Wikidata Toolkit homepage