FileDocCategorySizeDatePackage
TargetNotify.javaAPI DocExample1026Tue Jan 28 17:14:42 GMT 1997None

TargetNotify

public class TargetNotify extends Object

Fields Summary
private Object[]
Targets
Constructors Summary
public TargetNotify(int numberOfTargets)


        
        Targets = new Object[numberOfTargets];

        for (int i = 0; i < numberOfTargets; i++) {
            Targets[i] = new Object();
        }
    
Methods Summary
public voidnotify(int targetNumber)

        synchronized (Targets[targetNumber]) {
            Targets[targetNumber].notify();
        }
    
public voidwait(int targetNumber)

        synchronized (Targets[targetNumber]) {
            try {
                Targets[targetNumber].wait();
            } catch (Exception e) {}
        }