public abstract static class MovAvgModel.AbstractModelParser
extends java.lang.Object
Constructor | Description |
---|---|
AbstractModelParser() |
Modifier and Type | Method | Description |
---|---|---|
protected void |
checkUnrecognizedParams(java.util.Map<java.lang.String,java.lang.Object> settings) |
|
abstract MovAvgModel |
parse(java.util.Map<java.lang.String,java.lang.Object> settings,
java.lang.String pipelineName,
int windowSize) |
Parse a settings hash that is specific to this model
|
protected boolean |
parseBoolParam(java.util.Map<java.lang.String,java.lang.Object> settings,
java.lang.String name,
boolean defaultValue) |
Extracts a boolean from the settings map, otherwise throws an exception
|
protected double |
parseDoubleParam(java.util.Map<java.lang.String,java.lang.Object> settings,
java.lang.String name,
double defaultValue) |
Extracts a 0-1 inclusive double from the settings map, otherwise throws an exception
|
protected int |
parseIntegerParam(java.util.Map<java.lang.String,java.lang.Object> settings,
java.lang.String name,
int defaultValue) |
Extracts an integer from the settings map, otherwise throws an exception
|
public abstract MovAvgModel parse(@Nullable java.util.Map<java.lang.String,java.lang.Object> settings, java.lang.String pipelineName, int windowSize) throws java.text.ParseException
settings
- Map of settings, extracted from the requestpipelineName
- Name of the parent pipeline aggwindowSize
- Size of the window for this moving avgjava.text.ParseException
protected double parseDoubleParam(@Nullable java.util.Map<java.lang.String,java.lang.Object> settings, java.lang.String name, double defaultValue) throws java.text.ParseException
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- Default value to be used if value does not exist in mapjava.text.ParseException
protected int parseIntegerParam(@Nullable java.util.Map<java.lang.String,java.lang.Object> settings, java.lang.String name, int defaultValue) throws java.text.ParseException
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- Default value to be used if value does not exist in mapjava.text.ParseException
protected boolean parseBoolParam(@Nullable java.util.Map<java.lang.String,java.lang.Object> settings, java.lang.String name, boolean defaultValue) throws java.text.ParseException
settings
- Map of settings provided to this modelname
- Name of parameter we are attempting to extractdefaultValue
- Default value to be used if value does not exist in mapjava.text.ParseException
protected void checkUnrecognizedParams(@Nullable java.util.Map<java.lang.String,java.lang.Object> settings) throws java.text.ParseException
java.text.ParseException