public class WorkQueue {
-ArrayList needsCompileList;
-ArrayList compiledList;
+ ArrayList needsCompileList;
-public WorkQueue() {
- this.needsCompileList = new ArrayList(11);
- this.compiledList = new ArrayList(11);
-}
+ ArrayList compiledList;
-public void add(SourceFile element) {
- needsCompileList.add(element);
-}
+ public WorkQueue() {
+ this.needsCompileList = new ArrayList(11);
+ this.compiledList = new ArrayList(11);
+ }
-public void addAll(SourceFile[] elements) {
- for (int i = 0, l = elements.length; i < l; i++)
- add(elements[i]);
-}
+ public void add(SourceFile element) {
+ needsCompileList.add(element);
+ }
-public void clear() {
- this.needsCompileList.clear();
- this.compiledList.clear();
-}
+ public void addAll(SourceFile[] elements) {
+ for (int i = 0, l = elements.length; i < l; i++)
+ add(elements[i]);
+ }
-public void finished(SourceFile element) {
- needsCompileList.remove(element);
- compiledList.add(element);
-}
+ public void clear() {
+ this.needsCompileList.clear();
+ this.compiledList.clear();
+ }
-public boolean isCompiled(SourceFile element) {
- return compiledList.contains(element);
-}
+ public void finished(SourceFile element) {
+ needsCompileList.remove(element);
+ compiledList.add(element);
+ }
-public boolean isWaiting(SourceFile element) {
- return needsCompileList.contains(element);
-}
+ public boolean isCompiled(SourceFile element) {
+ return compiledList.contains(element);
+ }
-public String toString() {
- return "WorkQueue: " + needsCompileList; //$NON-NLS-1$
-}
+ public boolean isWaiting(SourceFile element) {
+ return needsCompileList.contains(element);
+ }
+
+ public String toString() {
+ return "WorkQueue: " + needsCompileList; //$NON-NLS-1$
+ }
}