Class PriorityImpl
java.lang.Object
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.priority.impl.PriorityImpl
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintReturns the priority value adjusted to a rage from 0..n.addBonus(int bonus) Returns the value of this priority plus the given bonus.clone()Creates a copy of this priority instance.decrease()Returns the current priority decreased by 1.intAbsolute distance between this priority and prio.booleanPriorityManager this priority instance belongs to.intgetValue()Returns the priority as an integer.booleangreaterThan(IPriority prio) True, if this priority is higher than prio, otherwise false.inthashCode()increase()Returns the current priority increased by 1.booleanlessOrEqual(IPriority prio) True, if this priority is lower or equal to prio, otherwise false.voidSets this priority to the same value as priority.voidsetValue(int value) Sets the value of the priority according to its original specification.toString()
-
Field Details
-
manager
-
value
protected int value -
absolute_value
protected int absolute_value
-
-
Constructor Details
-
PriorityImpl
-
-
Method Details
-
absoluteValue
public int absoluteValue()Description copied from interface:IPriorityReturns the priority value adjusted to a rage from 0..n. Whereby 0 represents the lowest and n the highest priority values.- Specified by:
absoluteValuein interfaceIPriority- Returns:
-
getManager
Description copied from interface:IPriorityPriorityManager this priority instance belongs to.- Specified by:
getManagerin interfaceIPriority- Returns:
-
greaterThan
Description copied from interface:IPriorityTrue, if this priority is higher than prio, otherwise false.- Specified by:
greaterThanin interfaceIPriority- Returns:
-
lessOrEqual
Description copied from interface:IPriorityTrue, if this priority is lower or equal to prio, otherwise false.- Specified by:
lessOrEqualin interfaceIPriority- Returns:
-
increase
Description copied from interface:IPriorityReturns the current priority increased by 1. -
decrease
Description copied from interface:IPriorityReturns the current priority decreased by 1. -
distance
Description copied from interface:IPriorityAbsolute distance between this priority and prio. -
getValue
public int getValue()Description copied from interface:IPriorityReturns the priority as an integer. Depends on the original specification. -
setValue
public void setValue(int value) Description copied from interface:IPrioritySets the value of the priority according to its original specification. -
setTo
Description copied from interface:IPrioritySets this priority to the same value as priority. -
addBonus
Description copied from interface:IPriorityReturns the value of this priority plus the given bonus. This method ensures that the new priority lies in the given borders (lowest and highest priority). -
hashCode
public int hashCode() -
equals
-
clone
Description copied from interface:IPriorityCreates a copy of this priority instance. -
toString
-