public class Counter extends StatisticsObject implements nl.tudelft.simulation.event.EventListenerInterface
(c) copyright 2002-2005-2004 Delft
University of Technology , the Netherlands.
See for project information www.simulation.tudelft.nl
License of use: Lesser
General Public License (LGPL) , no warranty.
| Modifier and Type | Field and Description |
|---|---|
protected long |
count
count represents the value of the counter
|
static nl.tudelft.simulation.event.EventType |
COUNT_EVENT
COUNT_EVENT is fired whenever setCount() is invoked
|
protected String |
description
description refers to the title of this counter
|
protected long |
n
n represents the number of measurements
|
static nl.tudelft.simulation.event.EventType |
N_EVENT
N_EVENT is fired on every new measurement
|
filter| Constructor and Description |
|---|
Counter(String description)
constructs a new CounterTest
|
| Modifier and Type | Method and Description |
|---|---|
long |
getCount()
Returns the current counter value
|
String |
getDescription()
returns the description of the counter
|
long |
getN()
Returns the current number of observations
|
TableModel |
getTable()
represents the statistics object as Table.
|
void |
initialize()
initializes the counter
|
boolean |
isInitialized()
is the counter initialized?
|
void |
notify(nl.tudelft.simulation.event.EventInterface event) |
String |
toString() |
getSwingPaneladdListener, addListener, addListener, addListener, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, fireEvent, getEventTypes, removeAllListeners, removeAllListeners, removeListenerpublic static final nl.tudelft.simulation.event.EventType COUNT_EVENT
public static final nl.tudelft.simulation.event.EventType N_EVENT
protected long count
protected long n
protected String description
public Counter(String description)
description - the description for this counterpublic long getCount()
public long getN()
public void notify(nl.tudelft.simulation.event.EventInterface event)
notify in interface nl.tudelft.simulation.event.EventListenerInterface#notify(nl.tudelft.simulation.event.EventInterface)public String toString()
toString in class ObjectObject.toString()public void initialize()
public boolean isInitialized()
public String getDescription()
public TableModel getTable()
StatisticsObjectgetTable in class StatisticsObject#getTable()Copyright © 2002-2012 Delft University of Technology, the Netherlands. All Rights Reserved.