ThinkUI Data Generator 1.0.2 API

thinkui.datagen.generators
Class StringGenerator

java.lang.Object
  extended bythinkui.datagen.AbstractAttributeValueGenerator
      extended bythinkui.datagen.generators.StringGenerator
All Implemented Interfaces:
AttributeValueGenerator, java.lang.Cloneable
Direct Known Subclasses:
PasswordGenerator

public class StringGenerator
extends AbstractAttributeValueGenerator

Implements an AttributeValueGenerator for generating String values. If the attribute specified has a preferred width, that value will be configured as the mean length. The actual length of the generated values will be distributed based on the specified probability model and will be bounded between the optional minimum and maximum length of the attribute string length constraints. Otherwise, a default minimum and maximum string length will be used.


Field Summary
 
Fields inherited from interface thinkui.datagen.AttributeValueGenerator
ALL_MODES, BERNOULLI_MODE, BINOMIAL_MODE, CONSTANT_MODE, DEFAULT_MODE, EXPONENTIAL_MODE, MILLIS_PER_DAY, MILLIS_PER_HOUR, MILLIS_PER_MINUTE, MILLIS_PER_SECOND, NORMAL_MODE, POISON_MODE, SEQUENTIAL_MODE, UNIFORM_MODE
 
Constructor Summary
StringGenerator()
          StringGenerator constructor.
StringGenerator(Attribute attribute)
          StringGenerator constructor.
 
Method Summary
 java.lang.Object generateValue()
          Generate a value for the attribute.
 java.lang.String getAlphabet()
           
 AttributeType getMinMaxAttributeType()
          Override to return AttributeType.DOUBLE.
 double getStdDevLength()
           
 void setAlphabet(java.lang.String alphabet)
          Sets the alphabet to use for generating strings.
 
Methods inherited from class thinkui.datagen.AbstractAttributeValueGenerator
copy, createGenerator, getAttribute, getConstantValue, getCount, getCountAsInt, getDataObject, getDataObjectMap, getGeneratorMode, getMaxValue, getMeanIndex, getMeanIndexAsDouble, getMeanLength, getMeanLengthAsDouble, getMeanValue, getMeanValueAsDouble, getMinValue, getParameterData, getParentDataObject, getProbability, getProbabilityAsDouble, getProbabilityNull, getStdDevValue, getStdDevValueAsDouble, getValueAttributeName, initGenerator, isDataDependent, isMultiValued, isParentDataDependent, setAttribute, setConstantValue, setCount, setDataDependent, setDataObject, setDataObjectMap, setGeneratorMode, setMaxValue, setMeanIndex, setMeanLength, setMeanValue, setMinValue, setMultiValued, setParentDataDependent, setParentDataObject, setProbability, setProbabilityNull, setStdDevValue
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StringGenerator

public StringGenerator()
StringGenerator constructor.


StringGenerator

public StringGenerator(Attribute attribute)
StringGenerator constructor.

Method Detail

generateValue

public final java.lang.Object generateValue()
                                     throws java.lang.Exception
Generate a value for the attribute.

Specified by:
generateValue in interface AttributeValueGenerator
Specified by:
generateValue in class AbstractAttributeValueGenerator
Throws:
java.lang.Exception

getAlphabet

public final java.lang.String getAlphabet()
Returns:
the alphabet to use for generating strings.

getMinMaxAttributeType

public final AttributeType getMinMaxAttributeType()
Override to return AttributeType.DOUBLE.

Specified by:
getMinMaxAttributeType in interface AttributeValueGenerator
Overrides:
getMinMaxAttributeType in class AbstractAttributeValueGenerator

getStdDevLength

public final double getStdDevLength()
Returns:
the standard deviation length of the generated string.

setAlphabet

public final void setAlphabet(java.lang.String alphabet)
Sets the alphabet to use for generating strings.


ThinkUI Data Generator 1.0.2 API

Copyright © 2007-2009. ThinkUI Software Inc. All rights reserved.