simpledb.record
Class RID

java.lang.Object
  extended by simpledb.record.RID

public class RID
extends Object

An identifier for a record within a file. A RID consists of the block number in the file, and the ID of the record in that block.

Author:
Edward Sciore

Constructor Summary
RID(int blknum, int id)
          Creates a RID for the record having the specified ID in the specified block.
 
Method Summary
 int blockNumber()
          Returns the block number associated with this RID.
 boolean equals(Object obj)
           
 int id()
          Returns the ID associated with this RID.
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

RID

public RID(int blknum,
           int id)
Creates a RID for the record having the specified ID in the specified block.

Parameters:
blknum - the block number where the record lives
id - the record's ID
Method Detail

blockNumber

public int blockNumber()
Returns the block number associated with this RID.

Returns:
the block number

id

public int id()
Returns the ID associated with this RID.

Returns:
the ID

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011. All Rights Reserved.