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 theIInfluenceclass.- 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 StringgetCategory()Returns the category defined in the constructor of this class.LevelIdentifiergetTargetLevel()Returns the target level defined in the constructor of this class.SimulationTimeStampgetTimeLowerBound()Gets the lower bound of the transitory period during which this influence was created.SimulationTimeStampgetTimeUpperBound()Gets the upper bound of the transitory period during which this influence was created.StringtoString()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:
getCategoryin 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:
getTargetLevelin 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:
getTimeLowerBoundin 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:
getTimeUpperBoundin interfaceIInfluence- Returns:
- The upper bound of the transitory period during which this influence was created.
-
-