Package org.aspectj.org.eclipse.jdt.internal.core.builder

Source Code of org.aspectj.org.eclipse.jdt.internal.core.builder.WorkQueue

/*******************************************************************************
* Copyright (c) 2000, 2006 IBM Corporation and others.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
*     IBM Corporation - initial API and implementation
*******************************************************************************/
package org.aspectj.org.eclipse.jdt.internal.core.builder;

import org.aspectj.org.eclipse.jdt.internal.compiler.util.SimpleSet;

public class WorkQueue {

private SimpleSet needsCompileList;
private SimpleSet compiledList;

public WorkQueue() {
  this.needsCompileList = new SimpleSet();
  this.compiledList = new SimpleSet();
}

public void add(SourceFile element) {
  needsCompileList.add(element);
}

public void addAll(SourceFile[] elements) {
  for (int i = 0, l = elements.length; i < l; i++)
    add(elements[i]);
}

public void clear() {
  this.needsCompileList.clear();
  this.compiledList.clear();

public void finished(SourceFile element) {
  needsCompileList.remove(element);
  compiledList.add(element);
}

public boolean isCompiled(SourceFile element) {
  return compiledList.includes(element);
}

public boolean isWaiting(SourceFile element) {
  return needsCompileList.includes(element);
}

public String toString() {
  return "WorkQueue: " + needsCompileList; //$NON-NLS-1$
}
}
TOP

Related Classes of org.aspectj.org.eclipse.jdt.internal.core.builder.WorkQueue

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.