rabbit.util
Class Counter

java.lang.Object
  extended by rabbit.util.Counter

public class Counter
extends Object

This class counts different messages


Constructor Summary
Counter()
           
 
Method Summary
 int get(String key)
          Get the current count for an event.
 void inc(String log)
          Increase a logentry.
 Set<String> keys()
          Get all events
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Counter

public Counter()
Method Detail

inc

public void inc(String log)
Increase a logentry.

Parameters:
log - the event to increase

keys

public Set<String> keys()
Get all events

Returns:
an Set of all events

get

public int get(String key)
Get the current count for an event.

Parameters:
key - the event were intrested in
Returns:
the current count of event.