public class ProblemCatalog extends Object implements Calculator, Serializable, Observable
| Constructor and Description |
|---|
ProblemCatalog(ProblemCatalogSchema schema) |
| Modifier and Type | Method and Description |
|---|---|
void |
addObserver(Observer observer)
Add an observer object to the subject.
|
void |
deleteObserver(Observer observer)
Removes an observer object from the list of registered observers.
|
String |
getCalculatorName()
Get the name of the calculator.
|
String |
getCsv(boolean withLabels,
CompressionLevel compressionLevel)
Get result as comma separated string.
|
List<String> |
getHeader()
Get header (the name of metrics) as a list.
|
Object |
getJsonDocument() |
String |
getJsonString() |
Map<String,Map<String,? extends Object>> |
getLabelledResultMap()
Get hierarchical result map.
|
List<String> |
getList(boolean withLabels,
CompressionLevel compressionLevel) |
Map<String,? extends Object> |
getResultMap()
Get results as a simple map.
|
ProblemCatalogSchema |
getSchema() |
void |
measure(PathCache cache)
Measure something from the JSON input object.
|
void |
notifyObservers()
Notify observers about a change.
|
public ProblemCatalog(ProblemCatalogSchema schema)
public String getCalculatorName()
CalculatorgetCalculatorName in interface Calculatorpublic String getJsonString()
public Object getJsonDocument()
public void addObserver(Observer observer)
ObservableaddObserver in interface Observableobserver - An observer objectpublic void deleteObserver(Observer observer)
ObservabledeleteObserver in interface Observableobserver - An observer objectpublic void notifyObservers()
ObservablenotifyObservers in interface Observablepublic void measure(PathCache cache)
Calculatormeasure in interface Calculatorcache - The JSON cache objectpublic Map<String,? extends Object> getResultMap()
CalculatorgetResultMap in interface Calculatorpublic Map<String,Map<String,? extends Object>> getLabelledResultMap()
CalculatorgetLabelledResultMap in interface Calculatorpublic String getCsv(boolean withLabels, CompressionLevel compressionLevel)
CalculatorgetCsv in interface CalculatorwithLabels - Flag whether the individal parts should contain the
metric or not.compressionLevel - If the value is a double, it is possible to
remove the zeroes from the end, so make the
value a bit compressed.public List<String> getList(boolean withLabels, CompressionLevel compressionLevel)
getList in interface Calculatorpublic List<String> getHeader()
CalculatorgetHeader in interface Calculatorpublic ProblemCatalogSchema getSchema()
Copyright © 2020. All rights reserved.