public interface StatisticExpressionFactory
Modifier and Type | Method and Description |
---|---|
StatisticExpression |
createConstant(double value)
Create a constant float expression.
|
StatisticExpression |
createConstant(long value)
Create a constant long expression.
|
StatisticExpression |
createDivision(StatisticExpression numerator,
StatisticExpression denominator)
Create a division.
|
StatisticExpression |
createExpression(String expression)
Parse an expression.
|
ExpressionView |
createExpressionView(String displayName,
StatisticExpression expression)
Creates a new
ExpressionView instance. |
ExpressionView |
createExpressionView(String displayName,
String expressionString,
boolean showForCompositeStatistics)
Creates a new
ExpressionView instance. |
StatisticExpression |
createMinus(StatisticExpression firstOperand,
StatisticExpression[] otherOperands)
Create a minus expression.
|
StatisticExpression |
createNegation(StatisticExpression operand)
Create a negation.
|
PeakStatisticExpression |
createPeak(StatisticsIndexMap.DoubleIndex peakIndex,
StatisticExpression monitoredStatistic)
Create a peak double statistic.
|
PeakStatisticExpression |
createPeak(StatisticsIndexMap.LongIndex peakIndex,
StatisticExpression monitoredStatistic)
Create a peak long statistic.
|
StatisticExpression |
createPrimitive(StatisticsIndexMap.DoubleIndex index)
Create a primitive double expression.
|
StatisticExpression |
createPrimitive(StatisticsIndexMap.LongIndex index)
Create a primitive long expression.
|
StatisticExpression |
createProduct(StatisticExpression[] operands)
Create a product.
|
StatisticExpression |
createSquareRoot(StatisticExpression operand)
Create a square root.
|
StatisticExpression |
createSum(StatisticExpression[] operands)
Create a sum.
|
String |
normaliseExpressionString(String expression)
Apply standard formatting to an expression.
|
String normaliseExpressionString(String expression) throws StatisticsException
expression
- The expression.StatisticsException
- If the expression is invalid.StatisticExpression createExpression(String expression) throws StatisticsException
expression
- The expression.StatisticsException
- If the expression is invalid.StatisticExpression createConstant(long value)
value
- The value.StatisticExpression
.StatisticExpression createConstant(double value)
value
- The value.StatisticExpression
.StatisticExpression createPrimitive(StatisticsIndexMap.DoubleIndex index)
index
- The expression index.StatisticExpression
.StatisticExpression createPrimitive(StatisticsIndexMap.LongIndex index)
index
- The expression index.StatisticExpression
.StatisticExpression createSum(StatisticExpression[] operands)
operands
- The things to add.StatisticExpression createNegation(StatisticExpression operand)
operand
- The thing to negate.StatisticExpression createMinus(StatisticExpression firstOperand, StatisticExpression[] otherOperands)
firstOperand
- The first argument.otherOperands
- The remaining arguments.StatisticExpression createProduct(StatisticExpression[] operands)
operands
- The things to multiply.StatisticExpression createDivision(StatisticExpression numerator, StatisticExpression denominator)
numerator
- The numerator.denominator
- The denominator.StatisticExpression createSquareRoot(StatisticExpression operand)
operand
- The operand.PeakStatisticExpression createPeak(StatisticsIndexMap.DoubleIndex peakIndex, StatisticExpression monitoredStatistic)
peakIndex
- Index of a slot to store peak information in.monitoredStatistic
- Statistic to monitor.PeakStatisticExpression createPeak(StatisticsIndexMap.LongIndex peakIndex, StatisticExpression monitoredStatistic)
peakIndex
- Index of a slot to store peak information in.monitoredStatistic
- Statistic to monitor.ExpressionView createExpressionView(String displayName, String expressionString, boolean showForCompositeStatistics) throws StatisticsException
ExpressionView
instance.displayName
- A display name. In the console, this is converted to a key for an
internationalised resource bundle look up by prefixing the string
with "statistic." and replacing any whitespace with underscores.expressionString
- An expression string, used to create the
StatisticExpression
for the ExpressionView
.showForCompositeStatistics
- Whether the expression applies to composite statistics.StatisticsException
- If the expression is invalid.ExpressionView createExpressionView(String displayName, StatisticExpression expression)
ExpressionView
instance.
This method takes a StatisticExpression
, and is used to by
the console to construct a view around expressions that have no string
representation (namely, those involving peak statistics).
displayName
- A common display name.expression
- A StatisticExpression
.Copyright © 2000-2014. All Rights Reserved.