public class XFrequency extends Object implements Serializable
Modifier and Type | Field and Description |
---|---|
protected String |
description
description refers to the title of this counter
|
protected SortedMap<String,Long> |
frequency
count represents the values of the counters
|
protected long |
n
n represents the number of measurements
|
Constructor and Description |
---|
XFrequency(String description) |
Modifier and Type | Method and Description |
---|---|
void |
count(String key)
count 1
|
void |
count(String key,
long value)
count frequency
|
String |
getDescription()
returns the description of the counter
|
SortedMap<String,Long> |
getFrequencies()
Returns all counters
|
long |
getFrequency(String key)
Returns the current counter value for a key
|
long |
getN()
Returns the current number of observations
|
void |
initialize()
initializes the counter
|
boolean |
isInitialized()
is the counter initialized?
|
String |
toString() |
int |
writeToExcel(Sheet sheet,
int startRow)
Write statistics to an excel spreadsheet, starting on row "startRow"
|
protected long n
protected String description
public XFrequency(String description)
description
- the description of the statisticpublic long getFrequency(String key)
key
- the string key for the counterpublic SortedMap<String,Long> getFrequencies()
public long getN()
public void count(String key, long value)
key
- the key to count the value undervalue
- the valuepublic void count(String key)
key
- keypublic String toString()
toString
in class Object
Object.toString()
public void initialize()
public boolean isInitialized()
public String getDescription()
public int writeToExcel(Sheet sheet, int startRow)
sheet
- the excel sheet to write tostartRow
- the first row of writingCopyright © 2014–2018 Delft University of Technology. All rights reserved.