storage
Class UnitAddress

java.lang.Object
  extended bystorage.UnitAddress

public class UnitAddress
extends java.lang.Object

This class is used to reference a unit inside a segment. A unit address is formed by a space number and a unit number.


Constructor Summary
UnitAddress()
          Constructs a new unit address with space and unit numbers in -1.
UnitAddress(int spaceNumber, long unitNumber)
          Constructs a new unit address with specified space and unit number.
 
Method Summary
 boolean equals(UnitAddress addr)
          Checks if two unit address have the same values.
 int getSpaceNumber()
          Returns the space number.
 long getUnitNumber()
          Returns the unit number.
 void set(int spaceNumber, long unitNumber)
          Sets the space and unit numbers of the address.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

UnitAddress

public UnitAddress()
Constructs a new unit address with space and unit numbers in -1.


UnitAddress

public UnitAddress(int spaceNumber,
                   long unitNumber)
Constructs a new unit address with specified space and unit number.

Method Detail

getSpaceNumber

public int getSpaceNumber()
Returns the space number.


getUnitNumber

public long getUnitNumber()
Returns the unit number.


set

public void set(int spaceNumber,
                long unitNumber)
Sets the space and unit numbers of the address.


equals

public boolean equals(UnitAddress addr)
Checks if two unit address have the same values.