Class Flag

java.lang.Object
  extended by Flag

public class Flag
extends java.lang.Object

This class represents a flag. It can be used to check whether the simulation program has finished.

Version:
1.0(02/2006)
Author:
Yin Xiong

Field Summary
private  int buffer
          Shared by two or more threads.
 
Constructor Summary
Flag()
           
 
Method Summary
 int get()
          Returns the value got from buffer.
 void set(int value)
          Places value into the buffer.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

buffer

private int buffer
Shared by two or more threads.

Constructor Detail

Flag

public Flag()
Method Detail

set

public void set(int value)
Places value into the buffer.

Parameters:
value - int representing the value to be put into the buffer.

get

public int get()
Returns the value got from buffer.