muskel.util
Class IntegerStreamInputManager

java.lang.Object
  extended by muskel.util.IntegerStreamInputManager
All Implemented Interfaces:
InputManager

public class IntegerStreamInputManager
extends java.lang.Object
implements InputManager

Sample input manager. Delivers a nnumber of Integer items onto the input stream, when the next() method is invoked from within the manager


Constructor Summary
IntegerStreamInputManager(int i)
          creates a new IntegerStreamInputManager
 
Method Summary
 boolean hasNext()
          this is the method used to check whether there are other tasks available onto the input stream
 java.lang.Object next()
          delivers next item
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IntegerStreamInputManager

public IntegerStreamInputManager(int i)
creates a new IntegerStreamInputManager

Parameters:
i - the number of items to be delivered on the input stream upon Manager request.
Method Detail

next

public java.lang.Object next()
delivers next item

Specified by:
next in interface InputManager
Returns:
the new stream item (an Integer)

hasNext

public boolean hasNext()
Description copied from interface: InputManager
this is the method used to check whether there are other tasks available onto the input stream

Specified by:
hasNext in interface InputManager
Returns:
true if there are other items to be delivered onto the input stream, false otherwise