|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--uk.ac.man.cs.rainbow.simulator.ThreadSet
"Unordered" collection of threads, where a thread can only belong at most once.
Constructor Summary | |
ThreadSet()
Create a new set of threads. |
Method Summary | |
void |
add(RainbowThread t)
Add a thread to the set. |
Object |
clone()
Produce a copy of the set of threads. |
protected RainbowThread |
elementAt(int locn)
Report the thread at the given location. |
RainbowThread |
get()
Obtain a thread from the set. |
RainbowThread |
get(int where)
Obtain a thread from the set. |
RainbowThread |
get(Random randomGenerator)
Obtain a thread from the set. |
RainbowThread |
getAt(int locn)
Get and remove the thread at the given location. |
boolean |
isEmpty()
Tests if this set is empty. |
boolean |
isPresent(RainbowThread t)
Tests if the given thread is in the set. |
void |
remove(RainbowThread t)
Remove a given thread from the set. |
int |
size()
Return the size of the set. |
Methods inherited from class java.lang.Object |
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public ThreadSet()
Method Detail |
public boolean isEmpty()
public boolean isPresent(RainbowThread t)
public int size()
public void add(RainbowThread t)
public void remove(RainbowThread t)
public RainbowThread get()
public RainbowThread get(int where)
Simulator.ORDERING_QUEUE
,
Simulator.ORDERING_STACK
public RainbowThread get(Random randomGenerator)
public RainbowThread getAt(int locn)
protected RainbowThread elementAt(int locn)
public Object clone()
clone
in class Object
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |