org.jpox.store.poid
Class PoidBlock

java.lang.Object
  extended byorg.jpox.store.poid.PoidBlock
All Implemented Interfaces:
java.io.Serializable

public class PoidBlock
extends java.lang.Object
implements java.io.Serializable

Representation of a block of ids.

Version:
$Revision: 1.2 $
See Also:
Serialized Form

Constructor Summary
PoidBlock(java.util.List oid)
          Constructor for PoIdBlock.
PoidBlock(java.lang.Object[] oid)
          Constructor for PoidBlock.
 
Method Summary
 void addBlock(PoidBlock block)
          Method to append a block onto this block.
 org.jpox.store.poid.Poid current()
          Accessor for the current Poid.
 boolean hasNext()
          Accessor for whether there are more elements remaining in the block.
 org.jpox.store.poid.Poid next()
          Accessor for the next Poid, or null if block ids exhausted
 java.lang.String toString()
          Stringify method.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

PoidBlock

public PoidBlock(java.lang.Object[] oid)
Constructor for PoidBlock.

Parameters:
oid - The block of objects that will be considered the "IDs"

PoidBlock

public PoidBlock(java.util.List oid)
Constructor for PoIdBlock.

Parameters:
oid - The list of objects that will be considered the "IDs"
Method Detail

current

public org.jpox.store.poid.Poid current()
Accessor for the current Poid.

Returns:
The current poid
Throws:
java.util.NoSuchElementException - Thrown if no current poid

next

public org.jpox.store.poid.Poid next()
Accessor for the next Poid, or null if block ids exhausted

Returns:
The next POID

hasNext

public boolean hasNext()
Accessor for whether there are more elements remaining in the block.

Returns:
True when has more elements

addBlock

public void addBlock(PoidBlock block)
Method to append a block onto this block. This is used where we have some ids left, and we want to allocate more to go into this block.

Parameters:
block - The other block

toString

public java.lang.String toString()
Stringify method.

Returns:
A string version of this object


Copyright © -2007 . All Rights Reserved.