org.databene.benerator.util
Class FilteringGenerator<E>

java.lang.Object
  extended by org.databene.benerator.util.AbstractGenerator<P>
      extended by org.databene.benerator.wrapper.GeneratorWrapper<E,E>
          extended by org.databene.benerator.wrapper.GeneratorProxy<E>
              extended by org.databene.benerator.util.FilteringGenerator<E>
All Implemented Interfaces:
java.io.Closeable, Generator<E>, org.databene.commons.Resettable, org.databene.commons.ThreadAware

public class FilteringGenerator<E>
extends GeneratorProxy<E>

Generator proxy which takes the input of another Generator and only passes it if a boolean expression evaluates to true.

Created: 11.03.2010 14:23:53

Since:
0.6.0
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.wrapper.GeneratorWrapper
source
 
Fields inherited from class org.databene.benerator.util.AbstractGenerator
context, state
 
Constructor Summary
FilteringGenerator(Generator<E> source, org.databene.commons.Expression<java.lang.Boolean> filter)
           
 
Method Summary
 E generate()
          Returns an instance of the generic type E.
 
Methods inherited from class org.databene.benerator.wrapper.GeneratorProxy
getGeneratedType
 
Methods inherited from class org.databene.benerator.wrapper.GeneratorWrapper
close, equals, getSource, hashCode, init, isParallelizable, isThreadSafe, reset, setSource, toString
 
Methods inherited from class org.databene.benerator.util.AbstractGenerator
assertInitialized, assertNotInitialized, wasInitialized
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FilteringGenerator

public FilteringGenerator(Generator<E> source,
                          org.databene.commons.Expression<java.lang.Boolean> filter)
Method Detail

generate

public E generate()
Description copied from interface: Generator
Returns an instance of the generic type E.

Specified by:
generate in interface Generator<E>
Overrides:
generate in class GeneratorProxy<E>


Copyright © 2011. All Rights Reserved.