JavaScript is disabled on your browser.
Method Summary
All Methods Instance Methods Abstract Methods
int
Returns the priority value adjusted to a rage from 0..n.
Returns the value of this priority plus the given
bonus.
Creates a copy of this priority instance.
Returns the current priority decreased by 1.
int
Absolute distance between this priority and prio.
PriorityManager this priority instance belongs to.
int
Returns the priority as an integer.
boolean
True, if this priority is higher than prio, otherwise false.
Returns the current priority increased by 1.
boolean
True, if this priority is lower or equal to prio, otherwise false.
void
Sets this priority to the same value as priority.
void
Sets the value of the priority according to its original specification.
Method Details
getManager
PriorityManager this priority instance belongs to.
Returns:
distance
Absolute distance between this priority and prio.
Parameters:
prio
-
Returns:
absoluteValue
int absoluteValue ()
Returns the priority value adjusted to a rage from 0..n. Whereby 0
represents the lowest and n the highest priority values.
Returns:
getValue
int getValue ()
Returns the priority as an integer. Depends on the original specification.
Returns:
setValue
void setValue (int value)
Sets the value of the priority according to its original specification.
Parameters:
value
-
increase
Returns the current priority increased by 1.
decrease
Returns the current priority decreased by 1.
lessOrEqual
True, if this priority is lower or equal to prio, otherwise false.
Parameters:
prio
-
Returns:
greaterThan
True, if this priority is higher than prio, otherwise false.
Parameters:
prio
-
Returns:
clone
Creates a copy of this priority instance.
Returns:
setTo
Sets this priority to the same value as priority.
Parameters:
priority
-
addBonus
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).
Parameters:
bonus
-