|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectbecker.xtras.comboLock.SampleComboLock
public final class SampleComboLock
A sample class implementing IComboLock interface. It simulates
a combonation lock.
Please see the package description for a more in-depth discussion of using this class.
| Constructor Summary | |
|---|---|
SampleComboLock(int num1,
int num2,
int num3)
|
|
| 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. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SampleComboLock(int num1,
int num2,
int num3)
| Method Detail |
|---|
public boolean isLocked()
IComboLock
isLocked in interface IComboLockpublic void lock()
IComboLock
lock in interface IComboLock
public void unlock(int num1,
int num2,
int num3)
IComboLock
unlock in interface IComboLocknum1 - The first number in the combinationnum2 - The second number in the combinationnum3 - The third number in the combinationpublic void addView(IView aView)
IComboLockupdateView
method must be called each time the lock's state changes.
addView in interface IComboLock
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||