|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object wyvern.kernel.commands.GroupManager
This class provides some static methods for managing Groupable objects.
Method Summary | |
static boolean |
canGroup(GameObject first,
GameObject second)
Compares two objects for grouping equality. |
static GameObject |
makeGroup(GameObject one,
GameObject two)
Takes two groupable GameObjects and makes them a single object with the combined quantity. |
static java.lang.String |
quantifyName(GameObject obj,
int qty)
Takes a quantity and a description, and produces a quantified description. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public static boolean canGroup(GameObject first, GameObject second)
Several checks are done. The objects must have the same class and the same short description. This predicate doesn't check to see if the objects both have the "groupable" property; it's assumed that the caller ascertains this before passing the objects to the predicate.
first
- one of the two objectssecond
- the other object
public static GameObject makeGroup(GameObject one, GameObject two)
public static java.lang.String quantifyName(GameObject obj, int qty)
obj
- the object to describeqty
- the number
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |