/**This class represents a flag. It can be used to check whether the simulation *program has finished. *@author Yin Xiong *@version 1.0(02/2006) */ public class Flag { /**Shared by two or more threads.*/ private int buffer = 0; /**Places value into the buffer. *@param value int representing the value to be put into the buffer. */ public void set( int value ) { buffer = value; } // end method set /**Returns the value got from buffer. */ public int get() { return buffer; } // end method get } // end class UnsynchronizedBuffer