Methods Summary |
---|
public void | init()Initialize
stopRequested = false;
|
protected void | pause()Pause for a while.
if (stopRequested) {
throw new Exception("Sort Algorithm");
}
parent.pause(parent.h1, parent.h2);
|
protected void | pause(int H1)Pause for a while and mark item 1.
if (stopRequested) {
throw new Exception("Sort Algorithm");
}
parent.pause(H1, parent.h2);
|
protected void | pause(int H1, int H2)Pause for a while and mark item 1 & 2.
if (stopRequested) {
throw new Exception("Sort Algorithm");
}
parent.pause(H1, H2);
|
public void | setParent(SortItem p)Set the parent.
parent = p;
|
void | sort(int[] a)This method will be called to
sort an array of integers.
|
public void | stop()Stop sorting.
stopRequested = true;
|