simpledb
Class RecordId

java.lang.Object
  extended by simpledb.RecordId

public class RecordId
extends java.lang.Object

A RecordId is a reference to a specific tuple on a specific page of a specific table.


Constructor Summary
RecordId(PageId pid, int tupleno)
          Creates a new RecordId referring to the specified PageId and tuple number.
 
Method Summary
 boolean equals(java.lang.Object o)
          Two RecordId objects are considered equal if they represent the same tuple.
 PageId getPageId()
           
 int hashCode()
          You should implement the hashCode() so that two equal RecordId instances (with respect to equals()) have the same hashCode().
 int tupleno()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RecordId

public RecordId(PageId pid,
                int tupleno)
Creates a new RecordId referring to the specified PageId and tuple number.

Parameters:
pid - the pageid of the page on which the tuple resides
tupleno - the tuple number within the page.
Method Detail

tupleno

public int tupleno()
Returns:
the tuple number this RecordId references.

getPageId

public PageId getPageId()
Returns:
the page id this RecordId references.

equals

public boolean equals(java.lang.Object o)
Two RecordId objects are considered equal if they represent the same tuple.

Overrides:
equals in class java.lang.Object
Returns:
True if this and o represent the same tuple

hashCode

public int hashCode()
You should implement the hashCode() so that two equal RecordId instances (with respect to equals()) have the same hashCode().

Overrides:
hashCode in class java.lang.Object
Returns:
An int that is the same for equal RecordId objects.