Class AbstractInfluence
- java.lang.Object
-
- fr.univ_artois.lgi2a.similar.microkernel.influences.AbstractInfluence
-
- All Implemented Interfaces:
IInfluence
- Direct Known Subclasses:
RegularInfluence
,SystemInfluence
public abstract class AbstractInfluence extends Object implements IInfluence
Provides a default behavior of the generic methods of theIInfluence
class.- Author:
- Yoann Kubera
-
-
Constructor Summary
Constructors Constructor Description AbstractInfluence(String category, LevelIdentifier targetLevel, SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound)
Builds an influence having a specific category and a specific target level.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getCategory()
Returns the category defined in the constructor of this class.LevelIdentifier
getTargetLevel()
Returns the target level defined in the constructor of this class.SimulationTimeStamp
getTimeLowerBound()
Gets the lower bound of the transitory period during which this influence was created.SimulationTimeStamp
getTimeUpperBound()
Gets the upper bound of the transitory period during which this influence was created.String
toString()
Uses the category and the target level of the influence to build a printable version of this object.-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface fr.univ_artois.lgi2a.similar.microkernel.influences.IInfluence
isSystem
-
-
-
-
Constructor Detail
-
AbstractInfluence
public AbstractInfluence(String category, LevelIdentifier targetLevel, SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound)
Builds an influence having a specific category and a specific target level.- Parameters:
category
- The category of the influence, as described in theIInfluence.getCategory()
method.targetLevel
- The identifier of the level whose reaction will process this influence.timeLowerBound
- The lower bound of the transitory period during which this influence was created.timeUpperBound
- The upper bound of the transitory period during which this influence was created.- Throws:
IllegalArgumentException
- If one of the arguments isnull
.
-
-
Method Detail
-
getCategory
public String getCategory()
Returns the category defined in the constructor of this class.- Specified by:
getCategory
in interfaceIInfluence
- Returns:
- The category of the influence, as defined in the public static field declared in the concrete influence class.
- See Also:
IInfluence.getCategory()
-
getTargetLevel
public LevelIdentifier getTargetLevel()
Returns the target level defined in the constructor of this class.- Specified by:
getTargetLevel
in interfaceIInfluence
- Returns:
- The identifier of the level whose reaction will process this influence.
- See Also:
IInfluence.getTargetLevel()
-
getTimeLowerBound
public SimulationTimeStamp getTimeLowerBound()
Gets the lower bound of the transitory period during which this influence was created.}- Specified by:
getTimeLowerBound
in interfaceIInfluence
- Returns:
- The lower bound of the transitory period during which this influence was created.
-
getTimeUpperBound
public SimulationTimeStamp getTimeUpperBound()
Gets the upper bound of the transitory period during which this influence was created.}- Specified by:
getTimeUpperBound
in interfaceIInfluence
- Returns:
- The upper bound of the transitory period during which this influence was created.
-
-