lejos.realtime
Class PriorityParameters

java.lang.Object
  extended by lejos.realtime.SchedulingParameters
      extended by lejos.realtime.PriorityParameters
All Implemented Interfaces:
Cloneable
Direct Known Subclasses:
ImportanceParameters

public class PriorityParameters
extends SchedulingParameters

Instances of this class should be assigned to schedulable objects that are by schedulers which use a single integer to determine execution order. The base scheduler required by this specification and represented by the class PriorityScheduler is such a scheduler.

Author:
Benoit Bousquet

Constructor Summary
PriorityParameters()
           
PriorityParameters(int priority)
           
 
Method Summary
 int getPriority()
          Gets the priority value.
 void setPriority(int priority)
          Sets the priority value.
 String toString()
          Converts the priority value to a string.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PriorityParameters

public PriorityParameters()

PriorityParameters

public PriorityParameters(int priority)
Method Detail

getPriority

public int getPriority()
Gets the priority value.

Returns:
The priority value.

setPriority

public void setPriority(int priority)
                 throws IllegalArgumentException
Sets the priority value.

Parameters:
priority - The value to which priority is set.
Throws:
IllegalArgumentException - Thrown if the given priority value is incompatible with the scheduler for any of the schedulable objects which are presently using this parameter object.

toString

public String toString()
Converts the priority value to a string.

Overrides:
toString in class Object
Returns:
A string representing the value of priority.