Class PriorityImpl
java.lang.Object
edu.kit.ipd.sdq.pcm.simulation.scheduler.exact.priority.impl.PriorityImpl
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionint
Returns 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.int
Absolute distance between this priority and prio.boolean
PriorityManager this priority instance belongs to.int
getValue()
Returns the priority as an integer.boolean
greaterThan
(IPriority prio) True, if this priority is higher than prio, otherwise false.int
hashCode()
increase()
Returns the current priority increased by 1.boolean
lessOrEqual
(IPriority prio) True, if this priority is lower or equal to prio, otherwise false.void
Sets this priority to the same value as priority.void
setValue
(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:IPriority
Returns the priority value adjusted to a rage from 0..n. Whereby 0 represents the lowest and n the highest priority values.- Specified by:
absoluteValue
in interfaceIPriority
- Returns:
-
getManager
Description copied from interface:IPriority
PriorityManager this priority instance belongs to.- Specified by:
getManager
in interfaceIPriority
- Returns:
-
greaterThan
Description copied from interface:IPriority
True, if this priority is higher than prio, otherwise false.- Specified by:
greaterThan
in interfaceIPriority
- Returns:
-
lessOrEqual
Description copied from interface:IPriority
True, if this priority is lower or equal to prio, otherwise false.- Specified by:
lessOrEqual
in interfaceIPriority
- Returns:
-
increase
Description copied from interface:IPriority
Returns the current priority increased by 1. -
decrease
Description copied from interface:IPriority
Returns the current priority decreased by 1. -
distance
Description copied from interface:IPriority
Absolute distance between this priority and prio. -
getValue
public int getValue()Description copied from interface:IPriority
Returns the priority as an integer. Depends on the original specification. -
setValue
public void setValue(int value) Description copied from interface:IPriority
Sets the value of the priority according to its original specification. -
setTo
Description copied from interface:IPriority
Sets this priority to the same value as priority. -
addBonus
Description copied from interface:IPriority
Returns 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:IPriority
Creates a copy of this priority instance. -
toString
-