@Internal public abstract class Resource extends Object implements Serializable
Modifier | Constructor and Description |
---|---|
protected |
Resource(String name,
BigDecimal value) |
protected |
Resource(String name,
double value) |
Modifier and Type | Method and Description |
---|---|
protected abstract Resource |
create(BigDecimal value)
Create a new instance of the sub resource.
|
Resource |
divide(BigDecimal by) |
Resource |
divide(int by) |
boolean |
equals(Object o) |
String |
getName() |
BigDecimal |
getValue() |
int |
hashCode() |
Resource |
merge(Resource other) |
Resource |
multiply(BigDecimal multiplier) |
Resource |
multiply(int multiplier) |
Resource |
subtract(Resource other) |
String |
toString() |
protected Resource(String name, double value)
protected Resource(String name, BigDecimal value)
public Resource multiply(BigDecimal multiplier)
public Resource multiply(int multiplier)
public Resource divide(BigDecimal by)
public Resource divide(int by)
public String getName()
public BigDecimal getValue()
protected abstract Resource create(BigDecimal value)
value
- The value of the resourceCopyright © 2014–2021 The Apache Software Foundation. All rights reserved.