Class ValueGenerationBlock<T>

  • Type Parameters:
    T - Type of the value (String, Long etc)
    All Implemented Interfaces:
    Serializable

    public class ValueGenerationBlock<T>
    extends Object
    implements Serializable
    Representation of a block of values.
    See Also:
    Serialized Form
    • Constructor Detail

      • ValueGenerationBlock

        public ValueGenerationBlock​(T[] values)
        Constructor.
        Parameters:
        values - The block of objects that will be considered the "values"
      • ValueGenerationBlock

        public ValueGenerationBlock​(List<T> oid)
        Constructor.
        Parameters:
        oid - The list of objects that will be considered the "values"
    • Method Detail

      • current

        public T current()
        Accessor for the current value.
        Returns:
        The current value
        Throws:
        NoSuchElementException - Thrown if no current value
      • next

        public T 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 values remaining in the block.
        Returns:
        True when has more values
      • addBlock

        public void addBlock​(ValueGenerationBlock<T> block)
        Method to append a block onto this block. This is used where we have some values left, and we want to allocate more to go into this block.
        Parameters:
        block - The other block
      • toString

        public String toString()
        Stringify method.
        Overrides:
        toString in class Object
        Returns:
        A string version of this object