|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.util.Observable | +--Space
A location in a warehouse.
Field Summary | |
protected int |
hits
Number of times this space has been "hit". |
protected Parcel |
parcel
Parcel contained in this space. |
protected static int |
totalHits
Number of spaces "hit" in the course of the simulation. |
Constructor Summary | |
Space()
Constructs a new space. |
Method Summary | |
double |
getHitPercentage()
Returns the percentage of total hits that this space has received. |
Parcel |
getParcel()
Returns the parcel contained in this space, or null if this space is empty. |
void |
hit()
"Hits" this space. |
boolean |
isEmpty()
Returns whether or not this space is empty. |
void |
reset()
Resets this space. |
void |
setParcel(Parcel p)
Sets the parcel contained in this space to the given parcel. |
Methods inherited from class java.util.Observable |
addObserver, clearChanged, countObservers, deleteObserver, deleteObservers, hasChanged, notifyObservers, notifyObservers, setChanged |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected static int totalHits
protected int hits
protected Parcel parcel
Constructor Detail |
public Space()
Method Detail |
public void reset()
public void setParcel(Parcel p)
p
- the parcel to contain in this spacepublic Parcel getParcel()
null
if this space is empty.
public boolean isEmpty()
public void hit()
public double getHitPercentage()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |