Hub listener interface.
This listener responds to changes in the state or status of a hub.
An instance of it is created by each system domain and used to
notify the system domain's condition of a change in status.
Users of this library should rarely have to create an instance of
this class directly except possibly for instrumentation reasons.
Method Summary
Modifier and Type
Method
Description
void
hubChanged(Hub hub,
int need,
int excess,
int overflow)
Notify this listener that a hub changed.
Method Details
hubChanged
voidhubChanged(Hub hub,
int need,
int excess,
int overflow)
Notify this listener that a hub changed.
The values provided by the need and
excess arguments are the numbers needed to reach the
trigger values, not the nominal value.
Parameters:
hub - the hub that changed
need - the number of bicycles needed for the
preferred location of the hub to have enough
bicycles to reach its lower trigger value
excess - the number of bicycles stored at the hub's
preferred location beyond the number provided by
the hub's upper trigger value
overflow - the number of bicycles in the overflow area