tauZaman
v0.1

tauzaman.calendricsystem.granularitylattice.minpriorityqueue
Class MPQElement

java.lang.Object
  |
  +--tauzaman.calendricsystem.granularitylattice.minpriorityqueue.MPQElement

public class MPQElement
extends java.lang.Object

Title: Minimum Priority Queue Element

Description: A class that is composed of a priority with a particular element that can be put into a priority queue.

Copyright: Copyright (c) 2003


Constructor Summary
MPQElement(java.lang.Comparable priority, java.lang.Object value)
          Constructs a minimum priority queue element.
 
Method Summary
 boolean equals(java.lang.Object o)
          Evaluates whether the given object is equivalent to this MPQElement.
 java.lang.Comparable getPriority()
          Returns the priority of this element.
 java.lang.Object getValue()
          Returns the value of this element.
 java.lang.Comparable setPriority(java.lang.Comparable priority)
          Sets the priority of this element to be something new.
 java.lang.Object setValue(java.lang.Object value)
          Sets the value of this element to be something new.
 java.lang.String toString()
          Returns a string representation of this MPQElement.
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MPQElement

public MPQElement(java.lang.Comparable priority,
                  java.lang.Object value)
Constructs a minimum priority queue element.

Parameters:
priority - the priority of the element
value - the element associated with the priority
Method Detail

equals

public boolean equals(java.lang.Object o)
Evaluates whether the given object is equivalent to this MPQElement.

Overrides:
equals in class java.lang.Object
Parameters:
o - the object to compare this element to
Returns:
whether or not the two object are equivalent

getPriority

public java.lang.Comparable getPriority()
Returns the priority of this element.

Returns:
the priority of this element

getValue

public java.lang.Object getValue()
Returns the value of this element.

Returns:
the value of this element

setPriority

public java.lang.Comparable setPriority(java.lang.Comparable priority)
Sets the priority of this element to be something new.

Parameters:
priority - the new priority of this element
Returns:
the old priority of this element

setValue

public java.lang.Object setValue(java.lang.Object value)
Sets the value of this element to be something new.

Returns:
the old value of this element

toString

public java.lang.String toString()
Returns a string representation of this MPQElement.

Overrides:
toString in class java.lang.Object
Returns:
a string representation of this MPQElement

tauZaman
v0.1

Submit a bug or feature

tauZaman is an open-source, publicly avaliable project