jdbm.recman
Class Location

java.lang.Object
  extended by jdbm.recman.Location

final class Location
extends java.lang.Object

This class represents a location within a file. Both physical and logical rowids are based on locations internally - this version is used when there is no file block to back the location's data.


Constructor Summary
Location(long blockOffset)
          Creates a location from a combined block/offset long, as used in the external representation of logical rowids.
Location(long block, short offset)
          Creates a location from a (block, offset) tuple.
Location(PhysicalRowId src)
          Creates a location based on the data of the physical rowid.
 
Method Summary
 boolean equals(java.lang.Object o)
           
(package private)  long getBlock()
          Returns the file block of the location
(package private)  short getOffset()
          Returns the offset within the block of the location
(package private)  long toLong()
          Returns the external representation of a location when used as a logical rowid, which combines the block and the offset in a single long.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Location

Location(long block,
         short offset)
Creates a location from a (block, offset) tuple.


Location

Location(long blockOffset)
Creates a location from a combined block/offset long, as used in the external representation of logical rowids.

See Also:
toLong()

Location

Location(PhysicalRowId src)
Creates a location based on the data of the physical rowid.

Method Detail

getBlock

long getBlock()
Returns the file block of the location


getOffset

short getOffset()
Returns the offset within the block of the location


toLong

long toLong()
Returns the external representation of a location when used as a logical rowid, which combines the block and the offset in a single long.


equals

public boolean equals(java.lang.Object o)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Cees de Groot (C) 2000-2001. All rights reserved http://jdbm.sourceforge.net