blob: 01c83db324dc384c41069893039d90e7e30f97a7 [file] [log] [blame]
/**********************************************************************
* Copyright (c) 2003, 2004 IBM Corporation and others. All rights reserved. This
* program and the accompanying materials are made available under the terms of
* the Common Public License v1.0 which accompanies this distribution, and is
* available at http://www.eclipse.org/legal/cpl-v10.html
*
* Contributors:
* IBM - Initial API and implementation
**********************************************************************/
package org.eclipse.core.tests.runtime.jobs;
import org.eclipse.core.tests.harness.TestJob;
/**
* A test job that belongs to a particular family.
*/
class FamilyTestJob extends TestJob {
private int familyType = TestJobFamily.TYPE_NONE;
public FamilyTestJob(String name, int type) {
super(name);
familyType = type;
}
public FamilyTestJob(String name, int ticks, int tickLength, int type) {
super(name, ticks, tickLength);
familyType = type;
}
public boolean belongsTo(Object family) {
return ((family instanceof TestJobFamily) && (((TestJobFamily) family).getType() == familyType));
}
}