org.processmining.models.graphbased.directed.petrinet.configurable.impl
Class ParameterizedIntegerFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement>

java.lang.Object
  extended by org.processmining.models.graphbased.directed.petrinet.configurable.ConfigurableParameter<java.lang.Integer>
      extended by org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableParameterInteger
          extended by org.processmining.models.graphbased.directed.petrinet.configurable.impl.ConfigurableIntegerFeature<T>
              extended by 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 a ParameterizedFeature ranging over Integer

Author:
dfahland

Constructor Summary
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
abstract  ConfigurableFeature<T,java.lang.Integer> cloneFor(T newElement)
          Create a clone of this feature using newElement as ConfigurableFeature.getConfiguredElement().
abstract  void executeConfiguration(ConfigurablePetrinet<? extends PetrinetGraph> parent)
          Executes the configuration on ConfigurableFeature.getConfiguredElement().
 java.lang.String getExpression()
           
 java.util.List<ConfigurableParameter<java.lang.Integer>> getInputParameters()
           
 java.util.List<ConfigurableParameter<java.lang.Integer>> getInputParametersByName()
           
 java.lang.Integer getValue()
           
 void setInputParameter(java.lang.String id, java.lang.Object value)
          Set value of a parameter in the expression
 void setValue(java.lang.Object value)
          Never set values directly for parameterized features, does nothing.
 void updateValue()
          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.UnparsableExpressionException
Create 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:
InvalidConfigurationException
de.congrace.exp4j.UnknownFunctionException
de.congrace.exp4j.UnparsableExpressionException
Method Detail

setValue

public final void setValue(java.lang.Object value)
                    throws InvalidConfigurationException
Never set values directly for parameterized features, does nothing.

Overrides:
setValue in class ConfigurableParameter<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:
getInputParameters in interface ConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,java.lang.Integer>
Specified by:
getInputParameters in interface ParameterizedFeature<ConfigurableParameter<java.lang.Integer>>
Overrides:
getInputParameters in class ConfigurableIntegerFeature<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:
getInputParametersByName in interface ParameterizedFeature<ConfigurableParameter<java.lang.Integer>>
Overrides:
getInputParametersByName in class ConfigurableIntegerFeature<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: ConfigurableFeature
Update the value of this configurable feature. Has to be invoked whenever the value of this feature depends on several input parameters

Specified by:
updateValue in interface ConfigurableFeature<T extends org.processmining.models.graphbased.directed.DirectedGraphElement,java.lang.Integer>
Overrides:
updateValue in class ConfigurableIntegerFeature<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 InvalidConfigurationException
Set value of a parameter in the expression

Specified by:
setInputParameter in interface ParameterizedFeature<ConfigurableParameter<java.lang.Integer>>
Overrides:
setInputParameter in class ConfigurableIntegerFeature<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:
getValue in class ConfigurableParameter<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: ConfigurableFeature
Executes the configuration on ConfigurableFeature.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: ConfigurableFeature
Create a clone of this feature using newElement as ConfigurableFeature.getConfiguredElement().

Throws:
InvalidConfigurationException