Package org.cdlib.mrt.utility
Class TallyTable
java.lang.Object
org.cdlib.mrt.utility.TallyTable
Generalized counting queue
Copied - DLoy
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlong
addDiffTime
(String key, long from) Add difference in time from arg to nowvoid
increment a counter with this name by 1 and savevoid
increment a counter with this name and savevoid
bump
(TallyTable inCount) increment counts using another CountQueuevoid
clear()
dump()
increment a counter with this name and savedumpProp()
increment a counter with this name and savelong
Get the count for this keyString[]
Build sorted array of tally keyslong
getTime()
Add difference in time from arg to nowvoid
Load tally count from filevoid
void
set tally valueint
size()
number of tally items
-
Field Details
-
NAME
- See Also:
-
MESSAGE
- See Also:
-
LS
-
queue
-
-
Constructor Details
-
TallyTable
public TallyTable()
-
-
Method Details
-
bump
increment counts using another CountQueue- Parameters:
inCount
- CountQueue to be added
-
bump
increment a counter with this name by 1 and save- Parameters:
name
- of the counter to be incremented
-
bump
increment a counter with this name and save- Parameters:
name
- of the counter to be incrementedamount
- to bump counter
-
set
set tally value- Parameters:
name
- of the counter to be incrementedamount
- to bump counter
-
clear
public void clear() -
addDiffTime
Add difference in time from arg to now- Parameters:
key
- - name of key to be incrementedfrom
- start time value- Returns:
- current time
-
divide
-
getValue
-
getTime
public long getTime()Add difference in time from arg to now- Parameters:
key
- - name of key to be incrementedfrom
- start time value- Returns:
- current time
-
dump
increment a counter with this name and save- Parameters:
name
- of the counter to be incrementedamount
- to bump counter
-
dumpProp
increment a counter with this name and save- Parameters:
name
- of the counter to be incrementedamount
- to bump counter
-
getCountKeys
Build sorted array of tally keys- Returns:
-
getCount
Get the count for this key- Parameters:
key
- key used for extracting tally count- Returns:
- tally count
-
size
public int size()number of tally items- Returns:
- number of tally items
-
loadTable
Load tally count from file- Parameters:
loadFile
- file to be loaded for tally- Throws:
TException
-
getAsProperties
-
saveTable
- Throws:
TException
-
getTallyMap
-