BRUtil - Making Java a Kinder, Gentler, Place to be.

brutil
Class HandlePQ

java.lang.Object
  |
  +--brutil.HandlePQ

public class HandlePQ
extends java.lang.Object


Constructor Summary
HandlePQ(java.lang.Object obj, int value)
           
 
Method Summary
 void delete()
          Sets the boolean variable "deleted" to true
 int getKey()
          Returns the key value stored
 java.lang.Object getObj()
          Returns the object value
 int getPosition()
          Returns the array postion of this object
 boolean isDeleted()
          Returns the value of the "deleted" variable
 void setKey(int i)
          Sets the key value
 void setPosition(int i)
          Stores the array postion at which the object is stored
 java.lang.String toString()
          Return the toString values of the key and the object stored
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

HandlePQ

public HandlePQ(java.lang.Object obj,
                int value)
Method Detail

getKey

public int getKey()
Returns the key value stored
Returns:
the key value stored

getObj

public java.lang.Object getObj()
Returns the object value
Returns:
the object value stored

toString

public java.lang.String toString()
Return the toString values of the key and the object stored
Overrides:
toString in class java.lang.Object
Returns:
the String values of the key and the object stored

getPosition

public int getPosition()
Returns the array postion of this object
Returns:
the array position of this object

setPosition

public void setPosition(int i)
Stores the array postion at which the object is stored
Parameters:
the - array position of this object

setKey

public void setKey(int i)
Sets the key value
Parameters:
the - key value of this object

delete

public void delete()
Sets the boolean variable "deleted" to true

isDeleted

public boolean isDeleted()
Returns the value of the "deleted" variable
Returns:
true if this object is no longer in the heap.


BRUtil - Making Java a Kinder, Gentler, Place to be.