Class CalculatorFactoryImpl
- java.lang.Object
-
- de.fzi.power.interpreter.calculator.expressionoasis.CalculatorFactoryImpl
-
- All Implemented Interfaces:
CalculatorFactory
public class CalculatorFactoryImpl extends Object implements CalculatorFactory
Implementation of theCalculatorFactory
which is able to create calculators forDeclarativePowerModelSpecification
s.
-
-
Constructor Summary
Constructors Constructor Description CalculatorFactoryImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getPriority()
Gets the priority.AbstractDistributionPowerModelCalculator
instantiateDistributionPowerModelCalculator(DistributionPowerBinding binding)
Instantiate distribution power model calculator.IResourcePowerModelCalculator
instantiateResourcePowerModelCalculator(ResourcePowerBinding binding)
Instantiate resource power model calculator.boolean
isCompatibleWith(PowerModelSpecification specification)
Determines whether this instance can handle the given power model.
-
-
-
Method Detail
-
isCompatibleWith
public boolean isCompatibleWith(PowerModelSpecification specification)
Determines whether this instance can handle the given power model.- Specified by:
isCompatibleWith
in interfaceCalculatorFactory
- Parameters:
specification
- APowerModelSpecification
instance.- Returns:
true
iff the given power model is aDeclarativePowerModelSpecification
,false
otherwise.- Throws:
NullPointerException
- In casespecification == null
.
-
getPriority
public int getPriority()
Description copied from interface:CalculatorFactory
Gets the priority.- Specified by:
getPriority
in interfaceCalculatorFactory
- Returns:
- the priority
-
instantiateDistributionPowerModelCalculator
public AbstractDistributionPowerModelCalculator instantiateDistributionPowerModelCalculator(DistributionPowerBinding binding)
Description copied from interface:CalculatorFactory
Instantiate distribution power model calculator.- Specified by:
instantiateDistributionPowerModelCalculator
in interfaceCalculatorFactory
- Returns:
- the abstract distribution power model calculator
-
instantiateResourcePowerModelCalculator
public IResourcePowerModelCalculator instantiateResourcePowerModelCalculator(ResourcePowerBinding binding)
Description copied from interface:CalculatorFactory
Instantiate resource power model calculator.- Specified by:
instantiateResourcePowerModelCalculator
in interfaceCalculatorFactory
- Returns:
- the abstract resource power model calculator
-
-