// Decompiled by Jad v1.5.8e. Copyright 2001 Pavel Kouznetsov.
// Jad home page: http://www.geocities.com/kpdus/jad.html
// Decompiler options: packimports(3) fieldsfirst 
// Source File Name:   Job.java

package lt.ktu.gmj.tasks;


// Referenced classes of package lt.ktu.gmj.tasks:
//			Step

class Job
{

	private final int NUMBER_OF_STEPS = 40;
	private Step stp[];
	private int number_of_steps;
	private boolean used;

	public Job()
	{
		stp = new Step[40];
		number_of_steps = 0;
		used = false;
	}

	public void Add(double t)
	{
		stp[number_of_steps++] = new Step(t);
	}

	public void Init()
	{
		used = false;
	}

	public boolean IsFinished()
	{
		return used;
	}

	public double Length()
	{
		double sum = 0.0D;
		for(int i = 0; i < number_of_steps; i++)
			sum += stp[i].getTime();

		return sum;
	}

	public void Use()
	{
		used = true;
	}

	public Step getStep(int i)
	{
		return stp[i];
	}
}
