Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## com.fujitsu.iflow.model.util
Interface IflowEnumeration

public interface IflowEnumeration

The `IflowEnumeration` interface allows the access to a series of elements, one at a time. Successive calls to the `nextElement` method return successive elements of the series.

For example, to print all elements of a vector v:

     for (Enumeration e = v.elements() ; e.hasMoreElements() ;) {
         System.out.println(e.nextElement());
     }

Methods are provided to enumerate through the elements of a `Vector`, the keys of a `Hashtable`, and the values in a `Hashtable`. Enumerations are also used to specify the input streams to a `SequenceInputStream`.

Exceptions. One kind of exception is commonly thrown within this class: `WFServerException`. It is an instance of `ModelException`. For future compatibility it is recommended to catch the exception as `ModelException`. `WFServerException` indicates that the server failed to continue normal operation.

See Also:
  `Vector`, `Hashtable`, `SequenceInputStream`

Method Summary
`java.util.Hashtable[]` | `getPreviousBatch(long endId, int howMany)` Gets the previous batch of objects, ending at the supplied endId.
`boolean` | `hasMoreElements()` Tests, if there are more elements in this enumeration.
`java.lang.Object` | `nextElement()` Returns the next element of this enumeration.

Method Detail

### hasMoreElements

    public boolean hasMoreElements()
                            throws WFServerException

  Tests, if there are more elements in this enumeration.

  Returns:
    `true` if there are more elements; `false` otherwise.
  Throws:
    `WFServerException`

### nextElement

    public java.lang.Object nextElement()
                                 throws WFServerException

  Returns the next element of this enumeration.

  Returns:
    The next element.
  Throws:
    `WFServerException`

### getPreviousBatch

    public java.util.Hashtable[] getPreviousBatch(long endId,
                                                  int howMany)
                                           throws WFServerException

  Gets the previous batch of objects, ending at the supplied endId.

  The batch size is restricted to 1-2000.

  Parameters:
    `endId` - The ID of the last element to be returned.
    `howMany` - The maximum number of elements to be returned.
  Returns:
    Array of `Hashtable`s of the iterator elements.
  Throws:
    `WFServerException` - Thrown when the batch size (supplied value `howMany`) exceeds the specified limits. Should be caught as `ModelException` for future compatibility.

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD