T
- the class of objects that this address points topublic final class IntAddress<T> extends java.lang.Object implements Address<T>
Address
for a storage that uses int addresses.Storage
,
Serialized FormConstructor and Description |
---|
IntAddress(IntStorage<T> storage,
int address)
Creates a new instance of IntAddress on the specified int storage.
|
Modifier and Type | Method and Description |
---|---|
int |
getAddress()
Returns the associated int address into the storage.
|
T |
read()
Reads the object stored at this address from the associated storage.
|
void |
remove()
Removes the object stored at this address from the associated storage.
|
public IntAddress(IntStorage<T> storage, int address)
storage
- the storage on which this address is validaddress
- the int address in the storage this IntAddress points topublic int getAddress()
public T read() throws BucketStorageException
Address
read
in interface Address<T>
BucketStorageException
- if there was an error reading the datapublic void remove() throws BucketStorageException, java.lang.UnsupportedOperationException
Address
remove
in interface Address<T>
BucketStorageException
- if there was an error deleting an objectjava.lang.UnsupportedOperationException
- if this storage does not support removal of objects