Class ParameterizedIntegerFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>
- java.lang.Object
-
- org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableParameter<java.lang.Integer>
-
- org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableParameterInteger
-
- org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableIntegerFeature<T>
-
- org.processmining.models.graphbased.directed.petrinet.configurable.impl.ParameterizedIntegerFeature<T>
-
- Type Parameters:
T-
- All Implemented Interfaces:
ConfigurableFeature<T,java.lang.Integer>,ParameterizedFeature<ConfigurableParameter<java.lang.Integer>>
- Direct Known Subclasses:
ParameterizedArc,ParameterizedPlaceMarking
public abstract class ParameterizedIntegerFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement> extends ConfigurableIntegerFeature<T>
An abstract implementation of aParameterizedFeatureranging overInteger- Author:
- dfahland
-
-
Constructor Summary
Constructors Constructor Description ParameterizedIntegerFeature(java.lang.String id, T element, java.lang.Integer min, java.lang.Integer max, java.lang.String expression, java.util.List<ConfigurableParameter<java.lang.Integer>> inputParameters)Create a new parameterized feature for the given element.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract ConfigurableFeature<T,java.lang.Integer>cloneFor(T newElement)Create a clone of this feature using newElement asConfigurableFeature.getConfiguredElement().abstract voidexecuteConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)Executes the configuration onConfigurableFeature.getConfiguredElement().java.lang.StringgetExpression()java.util.List<ConfigurableParameter<java.lang.Integer>>getInputParameters()java.util.List<ConfigurableParameter<java.lang.Integer>>getInputParametersByName()java.lang.IntegergetValue()voidsetInputParameter(java.lang.String id, java.lang.Object value)Set value of a parameter in the expressionvoidsetValue(java.lang.Object value)Never set values directly for parameterized features, does nothing.voidupdateValue()Update the value of this configurable feature.-
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableIntegerFeature
getConfiguredElement, getId, getParameter
-
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableParameterInteger
isValidIntervalValue
-
Methods inherited from class org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableParameter
getDiscreteDomain, getIntervalMax, getIntervalMin, isIntervalDomain, isValidValue, setDiscreteDomain, setId, setIntervalDomain, updateParameter
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableFeature
clearElementVisualization, isStillExecutable, updateElementVisualization
-
-
-
-
Constructor Detail
-
ParameterizedIntegerFeature
public ParameterizedIntegerFeature(java.lang.String id, T element, java.lang.Integer min, java.lang.Integer max, java.lang.String expression, java.util.List<ConfigurableParameter<java.lang.Integer>> inputParameters) throws InvalidConfigurationException, de.congrace.exp4j.UnknownFunctionException, de.congrace.exp4j.UnparsableExpressionExceptionCreate a new parameterized feature for the given element. The value of the feature is computed from the given expression which contains the provided parameters with their default values. Values of variables may range between min and max.- Parameters:
element-min-max-expression-parameters-- Throws:
InvalidConfigurationExceptionde.congrace.exp4j.UnknownFunctionExceptionde.congrace.exp4j.UnparsableExpressionException
-
-
Method Detail
-
setValue
public final void setValue(java.lang.Object value) throws InvalidConfigurationExceptionNever set values directly for parameterized features, does nothing.- Overrides:
setValuein classConfigurableParameter<java.lang.Integer>- Throws:
InvalidConfigurationException- See Also:
org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableFeature#setValue(java.lang.Object)
-
getInputParameters
public java.util.List<ConfigurableParameter<java.lang.Integer>> getInputParameters()
- Specified by:
getInputParametersin interfaceConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,java.lang.Integer>- Specified by:
getInputParametersin interfaceParameterizedFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>- Overrides:
getInputParametersin classConfigurableIntegerFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>- Returns:
- all parameters of this feature together with their chosen value
-
getInputParametersByName
public java.util.List<ConfigurableParameter<java.lang.Integer>> getInputParametersByName()
- Specified by:
getInputParametersByNamein interfaceParameterizedFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>- Overrides:
getInputParametersByNamein classConfigurableIntegerFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>- Returns:
- input parameters that differ by their
ConfigurableParameter.getId(), i.e., from two input parameters with same id, only one will be included
-
updateValue
public void updateValue()
Description copied from interface:ConfigurableFeatureUpdate the value of this configurable feature. Has to be invoked whenever the value of this feature depends on several input parameters- Specified by:
updateValuein interfaceConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,java.lang.Integer>- Overrides:
updateValuein classConfigurableIntegerFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>
-
getExpression
public java.lang.String getExpression()
- Returns:
- expression of this feature
-
setInputParameter
public void setInputParameter(java.lang.String id, java.lang.Object value) throws InvalidConfigurationExceptionSet value of a parameter in the expression- Specified by:
setInputParameterin interfaceParameterizedFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>- Overrides:
setInputParameterin classConfigurableIntegerFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>- Parameters:
par-value-- Throws:
InvalidConfigurationException- if the parameter is unknown or the value is out of range
-
getValue
public java.lang.Integer getValue()
- Overrides:
getValuein classConfigurableParameter<java.lang.Integer>- Returns:
- value of this feature as computed by the assigned expression and the current parameter values
- See Also:
org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableFeature#getValue()
-
executeConfiguration
public abstract void executeConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)
Description copied from interface:ConfigurableFeatureExecutes the configuration onConfigurableFeature.getConfiguredElement(). The configuration itself may not be completely executable on {@link #getConfiguredElement(), but may require to change the parent object of #getConfiguredElement() as well.
-
cloneFor
public abstract ConfigurableFeature<T,java.lang.Integer> cloneFor(T newElement) throws InvalidConfigurationException
Description copied from interface:ConfigurableFeatureCreate a clone of this feature using newElement asConfigurableFeature.getConfiguredElement().- Throws:
InvalidConfigurationException
-
-