|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectstorage.UnitAddress
DbStorage.DbUnitAddress
A DbUnitAddress
represents a unit address
adapted for its storage and representation in semistructured database
structures.
Field Summary | |
static DbUnitAddress |
NULL
Represents a NULL (invalid) unit address. |
static int |
SIZE
The size in bytes of a DbUnitAddress . |
Constructor Summary | |
DbUnitAddress()
Constructs a NULL unit address. |
|
DbUnitAddress(byte[] b,
int off)
Contructs a unit address from its binary representation . |
|
DbUnitAddress(int spaceNumber,
long unitNumber)
Constructs a unit address whith specified space and unit numbers. |
Method Summary | |
void |
copyFrom(DbUnitAddress source)
Copies the content of a unit address in this one. |
boolean |
equals(DbUnitAddress addr)
Checks if this unit address is equals to other one. |
byte[] |
getContent()
Returns the binary representation of this unit address. |
int |
getSpaceNumber()
Returns the space number of this unit address. |
long |
getUnitNumber()
Returns the unit number of this unit address. |
boolean |
isNull()
Checks if a unit address has a NULL value. |
void |
set(byte[] b,
int off)
Sets a unit address from its binary representation . |
void |
set(int spaceNumber,
long unitNumber)
Sets the space and unit number of the unit address. |
void |
setNull()
Sets this unit address as NULL. |
Methods inherited from class storage.UnitAddress |
equals |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static final int SIZE
DbUnitAddress
.
public static final DbUnitAddress NULL
Constructor Detail |
public DbUnitAddress()
public DbUnitAddress(int spaceNumber, long unitNumber)
spaceNumber
- The space number of the unit address.unitNumber
- The unit number of the unit address.public DbUnitAddress(byte[] b, int off)
b
- The byte array from which the binary representation is got.off
- The position of b
from which the binary representation starts.Method Detail |
public int getSpaceNumber()
public long getUnitNumber()
public void set(int spaceNumber, long unitNumber)
spaceNumber
- The space number.unitNumber
- The unit number.public void set(byte[] b, int off)
b
- The byte array from which the binary representation is got.off
- The position of b
from which the binary representation starts.public void copyFrom(DbUnitAddress source)
source
- The unit address to copy.public void setNull()
public boolean isNull()
true
if this unit address is NULL, false
otherwise.public byte[] getContent()
public boolean equals(DbUnitAddress addr)
addr
- The unit address to compare.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |