Methods Summary |
---|
public void | childAdded(java.util.prefs.NodeChangeEvent e)
synchronized (addLock) {
switch (testNum) {
case TEST_GET_CHILD:
Preferences child = e.getChild();
if (child == null) {
addResult = false;
} else {
if (child.name() == "mock1") {
addResult = true;
}
}
break;
case TEST_GET_PARENT:
Preferences parent = e.getParent();
if (parent == null) {
addResult = false;
} else {
if (parent.name() == "mock") {
addResult = true;
}
}
break;
}
++added;
addLock.notifyAll();
}
|
public void | childRemoved(java.util.prefs.NodeChangeEvent e)
synchronized (removeLock) {
switch (testNum) {
case TEST_GET_CHILD:
Preferences child = e.getChild();
if (child == null) {
removeResult = false;
} else {
if (child.name() == "mock1") {
removeResult = true;
}
}
break;
case TEST_GET_PARENT:
Preferences parent = e.getParent();
if (parent == null) {
addResult = false;
} else {
if (parent.name() == "mock") {
addResult = true;
}
}
break;
}
removed++;
removeLock.notifyAll();
}
|
public boolean | getAddResult()
synchronized (addLock) {
return addResult;
}
|
public int | getAdded()
synchronized (addLock) {
return added;
}
|
public boolean | getRemoveResult()
synchronized (removeLock) {
return removeResult;
}
|
public int | getRemoved()
synchronized (removeLock) {
return removed;
}
|
public void | reset()
added = 0;
removed = 0;
|
public void | waitForEvent()
try {
synchronized (addLock) {
addLock.wait(500);
}
} catch (InterruptedException e) {
}
|