edu.nrao.sss.model.project.scheduling.priority
Class PriorityMeasure

java.lang.Object
  extended by edu.nrao.sss.model.project.scheduling.priority.PriorityMeasure
Direct Known Subclasses:
PriorityMeasureSum

public abstract class PriorityMeasure
extends Object

Returns a single measure for the priority of a ScheduleBlock or a set of scheduling priorities.

Author:
slovelan

Field Summary
protected  PriorityMeasureType measureType
           
protected  Map<PriorityType,Float> priorityWeights
           
 
Constructor Summary
PriorityMeasure()
           
PriorityMeasure(PriorityMeasure pm)
           
 
Method Summary
 boolean equals(Object other)
           
 String getName()
          Returns a short description of this method of summarizing priorities.
abstract  double getPriority(List<Priority> thePriorities)
          Returns a number summarizing the priority of the set.
abstract  double getPriority(Schedulable theBlock)
          Returns a number summarizing the priority of the scheduling block.
 PriorityMeasureType getPriorityMeasureType()
          Returns the method that is being used to summarize priorities.
 float getWeight(PriorityType pt)
          Returns the relative importance of a particular type of priority with regard to this priority measure.
 int hashCode()
           
 void setWeight(PriorityType pt, float weight)
          Sets the relative importance of a particular type of priority with regard to this priority measure.
 String toSummaryString()
          Returns a detailed description of this method of summarizing priorities.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

measureType

protected PriorityMeasureType measureType

priorityWeights

protected Map<PriorityType,Float> priorityWeights
Constructor Detail

PriorityMeasure

public PriorityMeasure()

PriorityMeasure

public PriorityMeasure(PriorityMeasure pm)
Method Detail

getPriorityMeasureType

public PriorityMeasureType getPriorityMeasureType()
Returns the method that is being used to summarize priorities.

Returns:
the method used to summarize priorities.

setWeight

public void setWeight(PriorityType pt,
                      float weight)
Sets the relative importance of a particular type of priority with regard to this priority measure.

Parameters:
pt - a particular type of priority.
weight - the importance this measure should attach to the priority type.

getWeight

public float getWeight(PriorityType pt)
Returns the relative importance of a particular type of priority with regard to this priority measure.

Parameters:
pt - a particular type of priority.
Returns:
the relative importance this measurement will attach to the priority type.

getPriority

public abstract double getPriority(Schedulable theBlock)
Returns a number summarizing the priority of the scheduling block.

Parameters:
theBlock - a scheduling block for which a priority is needed.
Returns:
a number summarizing the priority of the scheduling block.

getPriority

public abstract double getPriority(List<Priority> thePriorities)
Returns a number summarizing the priority of the set.

Parameters:
thePriorities - a set of Priority indicating an importance with regard to a particular criteria.
Returns:
a number summarizing the priorities in the set.

getName

public String getName()
Returns a short description of this method of summarizing priorities.

Returns:
a short description of this method of summarizing priorities.

toSummaryString

public String toSummaryString()
Returns a detailed description of this method of summarizing priorities.

Returns:
a detailed description of this method of summarizing priorities.

equals

public boolean equals(Object other)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2009. All Rights Reserved.