|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.haphazard.character.inventory.BestFit
Algorithm that puts an item into the best container with no rearranging
Constructor Summary | |
BestFit()
Creates a new instance of BestFit |
Method Summary | |
boolean |
add(Item item,
java.util.Vector containers)
Adds an item to a container |
boolean |
canHold(Item item,
java.util.Vector containers)
Checks if the specified containers can hold the specified item |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public BestFit()
Method Detail |
public boolean add(Item item, java.util.Vector containers)
add
in interface InventoryAlgorithm
item
- The item to addcontainers
- The number of containers to use for adding
public boolean canHold(Item item, java.util.Vector containers)
canHold
in interface InventoryAlgorithm
item
- The item to holdcontainers
- The containers to use to store the item
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |