Package io.fabric8.kubernetes.api.model
Class Quantity
java.lang.Object
io.fabric8.kubernetes.api.model.Quantity
- All Implemented Interfaces:
Serializable
public class Quantity extends Object implements Serializable
Quantity is fixed point representation of a number.
It provides convenient marshalling/unmarshalling in JSON or YAML,
in addition to String or getAmountInBytes accessors.
- See Also:
- Serialized Form
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classQuantity.Deserializerstatic classQuantity.Serializer -
Constructor Summary
-
Method Summary
Modifier and Type Method Description booleanequals(Object o)Map<String,Object>getAdditionalProperties()StringgetAmount()static BigDecimalgetAmountInBytes(Quantity quantity)StringgetFormat()inthashCode()static Quantityparse(String quantityAsString)voidsetAdditionalProperty(String name, Object value)voidsetAmount(String amount)voidsetFormat(String format)StringtoString()
-
Constructor Details
-
Quantity
public Quantity()No args constructor for use in serialization -
Quantity
Single argument constructor for setting amount.- Parameters:
amount- amount of quantity specified.
-
Quantity
Double argument constructor for setting amount along with format.- Parameters:
amount- amount of quantity specifiedformat- format for the amount.
-
-
Method Details
-
getAmount
-
setAmount
-
getFormat
-
setFormat
-
getAmountInBytes
- Throws:
ArithmeticException
-
equals
-
hashCode
public int hashCode() -
toString
-
parse
-
getAdditionalProperties
-
setAdditionalProperty
-