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

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

public class AlternativeComponentBuilder<E>
extends MultiComponentBuilder<E>

Creates one component from an arbitrary choice of different available ones.

Created at 09.05.2008 13:28:19

Since:
0.5.4
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.benerator.composite.MultiComponentBuilder
builders
 
Constructor Summary
AlternativeComponentBuilder(ComponentBuilder<E>[] alternatives)
           
 
Method Summary
 boolean buildComponentFor(E target)
          builds the related component of target
 boolean isParallelizable()
           
 boolean isThreadSafe()
           
 
Methods inherited from class org.databene.benerator.composite.MultiComponentBuilder
buildRandomComponentFor, close, getGeneratedType, init, reset, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AlternativeComponentBuilder

public AlternativeComponentBuilder(ComponentBuilder<E>[] alternatives)
Method Detail

buildComponentFor

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

Returns:
false if no more data was available to build, otherwise true

isParallelizable

public boolean isParallelizable()

isThreadSafe

public boolean isThreadSafe()


Copyright © 2011. All Rights Reserved.