|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface IComboLock
An interface for a combination lock object. A combination lock is either
locked or unlocked. If unlocked, it may be locked again with the
lock()
command. If locked, it may be unlocked by specifying a
combination of three numbers with the unlock
command. Each
combination lock has its own sequence of three numbers that will unlock it.
This sequence is specified when the lock is constructed.
Please see the package description for a more in-depth discussion of using this class.
Method Summary | |
---|---|
void |
addView(IView aView)
Add a view (graphical user interface) to the lock. |
boolean |
isLocked()
Test whether or not the lock is locked. |
void |
lock()
Lock the combination lock, assuming it is currently unlocked. |
void |
unlock(int num1,
int num2,
int num3)
Attempt to unlock the combination lock, assuming it is currently locked. |
Method Detail |
---|
boolean isLocked()
void unlock(int num1, int num2, int num3)
num1
- The first number in the combinationnum2
- The second number in the combinationnum3
- The third number in the combinationvoid lock()
void addView(IView aView)
updateView
method must be called each time the lock's state changes.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |