public class Quantity extends Object implements Serializable
Modifier and Type | Class and Description |
---|---|
static class |
Quantity.Deserializer |
static class |
Quantity.Serializer |
Constructor and Description |
---|
Quantity()
No args constructor for use in serialization
|
Quantity(String amount)
Single argument constructor for setting amount.
|
Quantity(String amount,
String format)
Double argument constructor for setting amount along with format.
|
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object o) |
Map<String,Object> |
getAdditionalProperties() |
String |
getAmount() |
static BigDecimal |
getAmountInBytes(Quantity quantity) |
String |
getFormat() |
int |
hashCode() |
static Quantity |
parse(String quantityAsString) |
void |
setAdditionalProperty(String name,
Object value) |
void |
setAmount(String amount) |
void |
setFormat(String format) |
public Quantity()
public Quantity(String amount)
amount
- amount of quantity specified.public String getAmount()
public void setAmount(String amount)
public String getFormat()
public void setFormat(String format)
public static BigDecimal getAmountInBytes(Quantity quantity) throws ArithmeticException
ArithmeticException
Copyright © 2015–2020 Red Hat. All rights reserved.