package org.lucci.madhoc.simulation;
import java.util.Collection;
import java.util.Vector;
public class Lock
{
private Thread threadToLock;
private Collection<Thread> threads = new Vector<Thread>();
private Collection<Thread> runningThreads = new Vector<Thread>();
public void startThreads()
{
for (Thread t : this.threads)
{
t.start();
this.runningThreads.add(t);
}
}
public Thread getThreadToLock()
{
return threadToLock;
}
public void setThreadToLock(Thread threadToLock)
{
this.threadToLock = threadToLock;
}
public Collection<Thread> getRunningThreads()
{
return runningThreads;
}
public void setRunningThreads(Collection<Thread> runningThreads)
{
this.runningThreads = runningThreads;
}
public Collection<Thread> getThreads()
{
return threads;
}
public void setThreads(Collection<Thread> threads)
{
this.threads = threads;
}
}