|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.TeamHEC.LocomotionCommotion.Resource.Resource
public abstract class Resource
Constructor Summary | |
---|---|
Resource(int value,
java.lang.String type)
The initialiser for Resource. |
Method Summary | |
---|---|
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. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Resource(int value, java.lang.String type)
value
- The initial value of the object.type
- The type of resource as a String.Method Detail |
---|
public int getValue()
public java.lang.String getType()
public void setValue(int value)
value
- the new value that the resource will be set topublic void subValue(int subVal)
subVal
- An integer representing the amount to subtract from value.public void subValue(Resource subResource)
subResource
- 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |