org.databene.benerator.composite
Class ConditionalComponentBuilder<E>

java.lang.Object
  extended by org.databene.benerator.composite.ComponentBuilderProxy<E>
      extended by org.databene.benerator.composite.ConditionalComponentBuilder<E>
All Implemented Interfaces:
ComponentBuilder<E>, org.databene.commons.ThreadAware

public class ConditionalComponentBuilder<E>
extends ComponentBuilderProxy<E>

ComponentBuilder which executes only if a condition expression evaluates to 'true'.

Created: 11.10.2010 11:15:14

Since:
0.6.4
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.composite.ComponentBuilderProxy
context, source
 
Constructor Summary
ConditionalComponentBuilder(ComponentBuilder<E> source, org.databene.commons.Expression<java.lang.Boolean> condition)
           
 
Method Summary
 boolean buildComponentFor(E target)
          builds the related component of target
 
Methods inherited from class org.databene.benerator.composite.ComponentBuilderProxy
close, getGeneratedType, init, isParallelizable, isThreadSafe, reset
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ConditionalComponentBuilder

public ConditionalComponentBuilder(ComponentBuilder<E> source,
                                   org.databene.commons.Expression<java.lang.Boolean> condition)
Method Detail

buildComponentFor

public boolean buildComponentFor(E target)
Description copied from interface: ComponentBuilder
builds the related component of target

Specified by:
buildComponentFor in interface ComponentBuilder<E>
Overrides:
buildComponentFor in class ComponentBuilderProxy<E>
Returns:
false if no more data was available to build, otherwise true


Copyright © 2011. All Rights Reserved.