Nodenet Problem Set Javadocs

nodenet
Interface Counter


public interface Counter

An interface for NodeBehaviors that keep track of the number of objects they have seen. By implementing this interface, SimulationPanel will display the value returned by getCount() whenever the node is displayed. This class replaces CountingNodeBehavior

Version:
$Id: Counter.java,v 1.3 2004/01/14 21:43:17 gus Exp $
Author:
Patrick G. Heck gus.heck@olin.edu

Method Summary
 int getCount()
          Returns the number of packets generated, moved or recieved as appropriate.
 void resetCount()
          Resets the count.
 

Method Detail

getCount

public int getCount()
Returns the number of packets generated, moved or recieved as appropriate.

Returns:
The number of packets counted sofar.

resetCount

public void resetCount()
Resets the count.


Nodenet Problem Set Javadocs