net.sf.asyncobjects.io.util
Class RepeatingInput<D extends BatchedData<D>,I extends AInput<D>>
java.lang.Object
   net.sf.asyncobjects.AsyncUnicastServer<I>
net.sf.asyncobjects.AsyncUnicastServer<I>
       net.sf.asyncobjects.io.util.GeneratingInput<D,I>
net.sf.asyncobjects.io.util.GeneratingInput<D,I>
           net.sf.asyncobjects.io.util.RepeatingInput<D,I>
net.sf.asyncobjects.io.util.RepeatingInput<D,I>
- Type Parameters:
- D- a batched data type
- I- a facet type
- All Implemented Interfaces: 
- ACloseable, AsyncObject, ExplicitSharing, AInput<D>
- Direct Known Subclasses: 
- RepeatingByteInput, RepeatingTextInput
- public class RepeatingInput<D extends BatchedData<D>,I extends AInput<D>> 
- extends GeneratingInput<D,I>
An input that repeats specified data over and over. Note that returns some
 subranges of the supplied batched data, so it never returns more than than
 lentgh of the supplied data.
- Author:
- const
 
 
 
| Method Summary | 
| protected  D | generate(int limit)Generate at most limit of the data
 | 
 
 
 
| Methods inherited from class java.lang.Object | 
| clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
 
 
RepeatingInput
public RepeatingInput(D repeatedData)
- A consructor
 
- Parameters:
- repeatedData- a data to repeat (must not be null)
 
RepeatingInput
public RepeatingInput(D repeatedData,
                      long toGenerate)
- A consructor
 
- Parameters:
- repeatedData- a data to repeat (must not be null)
- toGenerate- amount element to generate
 
generate
protected D generate(int limit)
- Description copied from class: GeneratingInput
- Generate at most limit of the data
 
- 
- Specified by:
- generatein class- GeneratingInput<D extends BatchedData<D>,I extends AInput<D>>
 
- 
- Parameters:
- limit- a limit on generated data
- Returns:
- a generated data
- See Also:
- GeneratingInput.generate(int)
 
Copyright © 2002-2007 Constantine Plotnikov. All Rights Reserved.