Constructor and Description |
---|
Resource(int value,
java.lang.String type)
The initialiser for Resource.
|
Modifier and Type | Method and Description |
---|---|
void |
addValue(int addVal)
Adds to value using an integer
|
void |
addValue(Resource addResource)
Adds to value using another Resource object.
|
java.lang.String |
getType() |
int |
getValue() |
void |
setValue(int value) |
void |
subValue(int subVal)
Subtracts from value using an integer
|
void |
subValue(Resource subResource)
Subtracts from value using another Resource object.
|
public Resource(int value, java.lang.String type)
value
- The initial value of the object.type
- The type of resource as a String.public int getValue()
public java.lang.String getType()
public void setValue(int value)
public void subValue(int subVal)
subVal
- An integer representing the amount to subtract from value.public void subValue(Resource subResource)
subVal
- A Resource object whose value is subtracted from this object's value.public void addValue(int addVal)
addVal
- An integer representing the amount to add to value.public void addValue(Resource addResource)
addResource
- A Resource object whose value is added to this object's value.