Package minpq
Class PriorityNode<T>
- java.lang.Object
- 
- minpq.PriorityNode<T>
 
- 
- Type Parameters:
- T- the type of element represented by this node.
 
 class PriorityNode<T> extends Object Represents the item-priority pair for use inExtrinsicMinPQimplementations.- See Also:
- ExtrinsicMinPQ
 
- 
- 
Constructor SummaryConstructors Constructor Description PriorityNode(T item, double priority)Constructs a pair with the given item and priority.
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)inthashCode()(package private) Titem()Returns the item.(package private) doublepriority()Returns the priority value.(package private) voidsetPriority(double priority)Reassigns the priority value for this pair.StringtoString()
 
- 
- 
- 
Field Detail- 
itemprivate final T item 
 - 
priorityprivate double priority 
 
- 
 - 
Constructor Detail- 
PriorityNodePriorityNode(T item, double priority) Constructs a pair with the given item and priority.- Parameters:
- item- the item in this pair.
- priority- the priority value associated with the item.
 
 
- 
 - 
Method Detail- 
itemT item() Returns the item.- Returns:
- the item.
 
 - 
prioritydouble priority() Returns the priority value.- Returns:
- the priority value.
 
 - 
setPriorityvoid setPriority(double priority) Reassigns the priority value for this pair.- Parameters:
- priority- the priority value to be assigned.
 
 
- 
 
-