joeq.Allocator
Class HeapAllocator.HeapPointer

java.lang.Object
  extended by joeq.Allocator.HeapAllocator.HeapPointer
All Implemented Interfaces:
Comparable
Enclosing class:
HeapAllocator

public static class HeapAllocator.HeapPointer
extends Object
implements Comparable

An object of this class represents a pointer to a heap address. It is a wrapped version of HeapAddress, so it can be used like an object.


Constructor Summary
HeapAllocator.HeapPointer(HeapAddress ip)
          Create a new heap pointer.
 
Method Summary
 int compareTo(HeapAllocator.HeapPointer that)
          Compare this heap pointer to another heap pointer.
 int compareTo(Object that)
          Compares this heap pointer to the given object.
 boolean equals(HeapAllocator.HeapPointer that)
          Returns true if this heap pointer refers to the same location as the given heap pointer, false otherwise.
 boolean equals(Object that)
          Compares this heap pointer with the given object.
 HeapAddress get()
          Extract the address of this heap pointer.
 int hashCode()
          Returns the hash code of this heap pointer.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HeapAllocator.HeapPointer

public HeapAllocator.HeapPointer(HeapAddress ip)
Create a new heap pointer.

Parameters:
ip - heap pointer value
Method Detail

get

public HeapAddress get()
Extract the address of this heap pointer.

Returns:
address of this heap pointer

compareTo

public int compareTo(HeapAllocator.HeapPointer that)
Compare this heap pointer to another heap pointer.

Parameters:
that - heap pointer to compare against
Returns:
-1 if this ip is before the given ip, 0 if it is equal to the given ip, 1 if it is after the given ip

compareTo

public int compareTo(Object that)
Compares this heap pointer to the given object.

Specified by:
compareTo in interface Comparable
Parameters:
that - object to compare to
Returns:
-1 if this is less than, 0 if this is equal, 1 if this is greater than

equals

public boolean equals(HeapAllocator.HeapPointer that)
Returns true if this heap pointer refers to the same location as the given heap pointer, false otherwise.

Parameters:
that - heap pointer to compare to
Returns:
true if the heap pointers are equal, false otherwise

equals

public boolean equals(Object that)
Compares this heap pointer with the given object.

Overrides:
equals in class Object
Parameters:
that - object to compare with
Returns:
true if these objects are equal, false otherwise

hashCode

public int hashCode()
Returns the hash code of this heap pointer.

Overrides:
hashCode in class Object
Returns:
hash code


Copyright © 2001-2005 John Whaley. All Rights Reserved.