org.databene.benerator.engine.parser
Class String2DistributionConverter

java.lang.Object
  extended by org.databene.commons.converter.AbstractConverter<S,T>
      extended by org.databene.commons.converter.ThreadSafeConverter<java.lang.String,Distribution>
          extended by org.databene.benerator.engine.parser.String2DistributionConverter
All Implemented Interfaces:
java.lang.Cloneable, ContextAware, Converter<java.lang.String,Distribution>, ThreadAware

public class String2DistributionConverter
extends ThreadSafeConverter<java.lang.String,Distribution>
implements ContextAware

Parses a string and interprets it as a Distribution spec, supporting the predefined sequences, like 'random' and 'cumulated'.

Created: 04.05.2010 06:43:01

Since:
0.6.1
Author:
Volker Bergmann

Field Summary
 
Fields inherited from class org.databene.commons.converter.AbstractConverter
sourceType, targetType
 
Constructor Summary
String2DistributionConverter()
           
 
Method Summary
 Distribution convert(java.lang.String sourceValue)
          Concerts an object of type S to an object of type T
 void setContext(Context context)
           
 
Methods inherited from class org.databene.commons.converter.ThreadSafeConverter
clone, isParallelizable, isThreadSafe
 
Methods inherited from class org.databene.commons.converter.AbstractConverter
getSourceType, getTargetType
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

String2DistributionConverter

public String2DistributionConverter()
Method Detail

convert

public Distribution convert(java.lang.String sourceValue)
                     throws ConversionException
Description copied from interface: Converter
Concerts an object of type S to an object of type T

Specified by:
convert in interface Converter<java.lang.String,Distribution>
Parameters:
sourceValue - the object to convert
Returns:
the converted object
Throws:
ConversionException - if the conversion fails

setContext

public void setContext(Context context)
Specified by:
setContext in interface ContextAware


Copyright © 2010. All Rights Reserved.