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
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods 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 Detail
-
Quantity
public Quantity()
No args constructor for use in serialization
-
Quantity
public Quantity(String amount)
Single argument constructor for setting amount.- Parameters:
amount- amount of quantity specified.
-
-
Method Detail
-
getAmount
public String getAmount()
-
setAmount
public void setAmount(String amount)
-
getFormat
public String getFormat()
-
setFormat
public void setFormat(String format)
-
getAmountInBytes
public static BigDecimal getAmountInBytes(Quantity quantity) throws ArithmeticException
- Throws:
ArithmeticException
-
-