/* * NodeBehavior.java * Part of the BinSort problem set. * * Developed for "Rethinking CS101", a project of Lynn Andrea Stein's AP Group. * For more information, see http://www.ai.mit.edu/projects/cs101, the * CS101 homepage or email las@ai.mit.edu. * * Copyright (C) 1997 Massachusetts Institute of Technology. * Please do not redistribute without obtaining permission. */ package binsort; import java.util.Vector; /** * NodeBehavior is the interface you must implement in your code. It * defines a single method, act.

* * Copyright (c) 1998 Massachusetts Institute of Technology * * @author Todd C. Parnell, tparnell@ai.mit.edu * @version $Id: NodeBehavior.java,v 1.2 2002/06/17 17:44:05 gus Exp $ */ public interface NodeBehavior { /** * act is the method you will write for this lab. It has two * arguments, both of type java.util.Vector, * corresponding to the inputs and outputs available to you. Note * that the elements passed exist, but are perhaps disabled, full, or * empty. You will need to be aware of these conditions.

* * act is called repeatedly by a Node from within a * while (true) {} loop. You should deal with a * single task on each iteration. Failure to return prompty will * result in unpredictable behavior. */ public void act( Vector inputChannels, Vector outputChannels ); } /* * $Log: NodeBehavior.java,v $ * Revision 1.2 2002/06/17 17:44:05 gus * Fixed package statements. * * Revision 1.1 2002/06/14 19:50:49 gus * Moved files down into binsort package to match other problemsets. * * Revision 1.1.1.1 2002/06/05 21:56:26 root * CS101 comes to Olin finally. * * Revision 1.4 1998/08/12 19:29:39 tparnell * Another pass after comments from las & natashao. Added support to * dynamically add NodeBehaviors. Add keyboard shortcuts to menus. Added * workaround to jdk bug relating to lighweight components. Misc other * bugfixes. * * Revision 1.3 1998/08/10 17:45:50 tparnell * Revision to use JDK1.2 and Swing. Redesign of GUI. Removed old kludge * for file I/O and replaced with object serialization. Channel no longer * requires animacy. Removed unnessary dependencies between classes. * Added ability to configure channel's latency and capacity. Added * javadoc to all files. General code cleanup. * */