org.jwall.audit.script.utils
Class Counter

java.lang.Object
  extended by org.jwall.audit.script.utils.Counter

public class Counter
extends Object

This is a very simple counter class that is provided to all scripts and can be used to track the count of event properties when iterating over multiple events.

Author:
Christian Bockermann <chris@jwall.org>

Constructor Summary
Counter()
           
 
Method Summary
 void count(String value)
           
 Double get(String value)
           
 Double getTotal()
           
 void reset()
           
 void set(String value, Double count)
           
 Double sum(Collection<String> keys)
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Counter

public Counter()
Method Detail

reset

public void reset()

count

public void count(String value)

get

public Double get(String value)

set

public void set(String value,
                Double count)

getTotal

public Double getTotal()

sum

public Double sum(Collection<String> keys)


Copyright © 2012 jwall.org. All Rights Reserved.