org.datanucleus.store.valuegenerator
Class ValueGenerationBlock

java.lang.Object
  extended by org.datanucleus.store.valuegenerator.ValueGenerationBlock
All Implemented Interfaces:
java.io.Serializable

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

Representation of a block of values.

See Also:
Serialized Form

Constructor Summary
ValueGenerationBlock(java.util.List vals)
          Constructor.
ValueGenerationBlock(java.lang.Object[] vals)
          Constructor.
 
Method Summary
 void addBlock(ValueGenerationBlock block)
          Method to append a block onto this block.
 org.datanucleus.store.valuegenerator.ValueGeneration current()
          Accessor for the current value.
 boolean hasNext()
          Accessor for whether there are more value remaining in the block.
 org.datanucleus.store.valuegenerator.ValueGeneration next()
          Accessor for the next value, or null if block values 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

ValueGenerationBlock

public ValueGenerationBlock(java.lang.Object[] vals)
Constructor.

Parameters:
vals - The block of objects that will be considered the "values"

ValueGenerationBlock

public ValueGenerationBlock(java.util.List vals)
Constructor.

Parameters:
vals - The list of objects that will be considered the "values"
Method Detail

current

public org.datanucleus.store.valuegenerator.ValueGeneration current()
Accessor for the current value.

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

next

public org.datanucleus.store.valuegenerator.ValueGeneration next()
Accessor for the next value, or null if block values exhausted

Returns:
The next value

hasNext

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

Returns:
True when has more value

addBlock

public void addBlock(ValueGenerationBlock block)
Method to append a block onto this block. This is used where we have some value 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.

Overrides:
toString in class java.lang.Object
Returns:
A string version of this object


Copyright © 2009. All Rights Reserved.