// 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:   NotBox.java

package drm.signal.logic;

import drm.signal.*;
import java.util.Vector;

// Referenced classes of package drm.signal.logic:
//			LogicValue

public class NotBox extends AbstractBox
{

	public NotBox()
	{
	}

	protected void update()
	{
		Signal s = ((Connector)in.get(0)).getSignal();
		int val = 3;
		if(s != null)
			val = ((LogicValue)s.getValue()).value;
		LogicValue rez = new LogicValue(3);
		if(val == 2)
			rez.value = 1;
		else
		if(val == 1)
			rez.value = 2;
		s = new SimpleSignal(rez);
		s.setStep(step + 1L);
		setOutSignal(s);
	}
}
