ExtendedFormula

ExtendedFormula

Special. This generator is aware of lists. If subgenerators contain lists of values (constraint: all lists must be of equal length), then this generator also returns a list as result and executes the user specified formula for each list item. In java pseudocode the logic would look like this: if (generator[0] instanceOf List){ operand[0]=((List)generator[0]).get(i) } else {operand[0]=generator[0]}. Besides that, it behaves the same as the default Formula

Attributes
Name Description Required Min Max Allowed Values
seed Random number generator seed of this Element. Overrides default seeding behavior. no 0 1
name (Class)Name of this element. Used to identify plugin Class. Full name is required. Example: com.en.myPluginPackage.myPuginClass no 0 1
id Identification String of this element. May be used to uniquely identify a field within the children of an Element. no 0 1
listName Content type: String
Name of the generated list. List will be of type pdgf.util.io.generator.NamedArrayList extends java.util.ArrayList and has a getName() method which you can use in your custom output to get easy access to this specific list.
no 0 1
ignoreInvalidValues tells this generator to ignore invalid values from other generators. Instead of throwing an exception, the invalid value for generator[] is to: Double.NaN no 0 1
  • true
  • false
  • 0
  • 1
Nodes
Name Description Required Min Max Allowed Values
staticValue Content type: Java code
Here you can specify static values to be available to use. Especially useful if "heavy initalization" should be avoided for every generated dataset.
Example: <staticValue>new int{1,2,3,4,5}</staticValue>
no 0 1
format no 0 1
formula Content type: Java code
The formula to evaluate. Example: (300 * ( generator[1] + 4 ))/ generator[0]. Any number of sub-generator nodes may be specified within the Formula which can be accessed in the formula. If the formula contains characters of the xml structure (like '<', '>', ...), the formula has to be wrapped into '<![CDATA[ ... ]]'.
yes 1 1
locale Content type: String
Locale to use. A locale defines the formatting rules for numbers, e.g what symbol to use as the decimal point and the thousand separator.
Examples: 'en-US', 'en-GB'. 'de-DE'
'Default is: 'us'
no 0 1
  • und
  • ar-AE
  • ar-JO
  • ar-SY
  • hr-HR
  • fr-BE
  • es-PA
  • mt-MT
  • es-VE
  • bg
  • zh-TW
  • it
  • ko
  • uk
  • lv
  • da-DK
  • es-PR
  • vi-VN
  • en-US
  • sr-ME
  • sv-SE
  • es-BO
  • en-SG
  • ar-BH
  • pt
  • ar-SA
  • sk
  • ar-YE
  • hi-IN
  • ga
  • en-MT
  • fi-FI
  • et
  • sv
  • cs
  • sr-Latn-BA
  • el
  • uk-UA
  • hu
  • fr-CH
  • id
  • es-AR
  • ar-EG
  • ja-JP-u-ca-japanese-x-lvariant-JP
  • es-SV
  • pt-BR
  • be
  • is-IS
  • cs-CZ
  • es
  • pl-PL
  • tr
  • ca-ES
  • sr-CS
  • ms-MY
  • hr
  • lt
  • es-ES
  • es-CO
  • bg-BG
  • sq
  • fr
  • ja
  • sr-BA
  • is
  • es-PY
  • de
  • es-EC
  • es-US
  • ar-SD
  • en
  • ro-RO
  • en-PH
  • ca
  • ar-TN
  • sr-Latn-ME
  • es-GT
  • sl
  • ko-KR
  • el-CY
  • es-MX
  • ru-RU
  • es-HN
  • zh-HK
  • nn-NO
  • hu-HU
  • th-TH
  • ar-IQ
  • es-CL
  • fi
  • ar-MA
  • ga-IE
  • mk
  • tr-TR
  • et-EE
  • ar-QA
  • sr-Latn
  • pt-PT
  • fr-LU
  • ar-OM
  • th
  • sq-AL
  • es-DO
  • es-CU
  • ar
  • ru
  • en-NZ
  • sr-RS
  • de-CH
  • es-UY
  • ms
  • el-GR
  • he-IL
  • en-ZA
  • th-TH-u-nu-thai-x-lvariant-TH
  • hi
  • fr-FR
  • de-AT
  • nl
  • no-NO
  • en-AU
  • vi
  • nl-NL
  • fr-CA
  • lv-LV
  • de-LU
  • es-CR
  • ar-KW
  • sr
  • ar-LY
  • mt
  • it-CH
  • da
  • de-DE
  • ar-DZ
  • sk-SK
  • lt-LT
  • it-IT
  • en-IE
  • zh-SG
  • ro
  • en-CA
  • nl-BE
  • no
  • pl
  • zh-CN
  • ja-JP
  • de-GR
  • sr-Latn-RS
  • he
  • en-IN
  • ar-LB
  • es-NI
  • zh
  • mk-MK
  • be-BY
  • sl-SI
  • es-PE
  • id-ID
  • en-GB
decimalPlaces Content type: Integer
Used to specify the precision of the calculation result.
Example: calculation raw result 3.644345345;
decimalPlaces<0: result -> 3.644345345 //unmodified (default)
decimalPlaces=2: result -> 3.64
decimalPlaces=3: result -> 3.642
decimalPlaces=36 <-max precision
Default: -1
no 0 1
gen Value Generator for this field no 0
  • pdgf.generator.MarkovChainText
  • pdgf.generator.AsReferenceChoice
  • pdgf.generator.WeightedListItem
  • pdgf.generator.DetailFromDate
  • pdgf.generator.BuildList
  • pdgf.generator.InsertIntoString
  • pdgf.generator.UUID
  • pdgf.generator.Probability
  • pdgf.generator.RandomString
  • pdgf.generator.Sequential
  • pdgf.generator.ConvertNumberToString
  • pdgf.generator.WeightedSubListItem
  • pdgf.generator.RandomListItems
  • pdgf.generator.Email
  • pdgf.generator.ActionDeleteIsAlsoUpdate
  • pdgf.generator.DoubleNumber
  • pdgf.generator.Permutation
  • pdgf.generator.Switch
  • pdgf.generator.ReferenceValue
  • pdgf.generator.ForFormula
  • pdgf.generator.PrePostfix
  • pdgf.generator.StaticValue
  • pdgf.generator.Hash
  • pdgf.generator.Padding
  • pdgf.generator.FormatString
  • pdgf.generator.DateTime
  • pdgf.generator.Id
  • pdgf.generator.LastChoice
  • pdgf.generator.MaskString
  • pdgf.generator.Null
  • pdgf.generator.AddRandomSeconds
  • pdgf.generator.RandomStringInRange
  • pdgf.generator.Formula
  • pdgf.generator.AbstractDecimal
  • pdgf.generator.FormatFloatingPoint
  • pdgf.generator.OtherFieldValue
  • pdgf.generator.RandomSentence
  • pdgf.generator.FormatNumber
  • pdgf.generator.Template
  • pdgf.generator.BigBenchReview
  • pdgf.generator.UpperLowerCase
  • pdgf.generator.For
  • pdgf.generator.Relative
  • pdgf.generator.RandomUniqeString
  • pdgf.generator.PermutationReference
  • pdgf.generator.UpdateActionType
  • pdgf.generator.FormatNumberAsDate
  • pdgf.generator.OldReferenceGeneratorDeprecated
  • pdgf.generator.DictList
  • pdgf.generator.ExtendedFormula
  • pdgf.generator.FormatDateAsNumber
  • pdgf.generator.If
  • pdgf.generator.GlobalRowNumber
  • pdgf.generator.LongNumber
  • pdgf.generator.UnsafeDistinct
Sub-Attributes
Parent Name Description Required Min Max Allowed Values
staticValue unlockFullAccess Content type: Boolean
Omits complexity restriction. This allows to enter ';' into the formula and staticValue elements to be able to enter multiple commands into one line.
no 0 1
  • true
  • false
  • 0
  • 1
decimalPlaces roundingMode Content type: String
Sets the rounding mode used to round numbers.
Default: HALF_EVEN
Possible values: [UP, DOWN, CEILING, FLOOR, HALF_UP, HALF_DOWN, HALF_EVEN, UNNECESSARY]
no 0 1
  • UP
  • DOWN
  • CEILING
  • FLOOR
  • HALF_UP
  • HALF_DOWN
  • HALF_EVEN
  • UNNECESSARY
decimalPlaces roundPlainValue Content type: Boolean
Round generated raw value to specified 'decimalPlaces'
If true : other generators will work with the rounded value.
If false: still round the value during 'toString()' but retain full precision for other generators using this generator's output, e.g., by reference or another computational generator.
Only available if 'decimalPlaces' parameter is >=0.
Default: true
no 0 1
  • true
  • false
  • 0
  • 1
formula unlockFullAccess Content type: Boolean
Omits complexity restriction. This allows to enter ';' into the formula and staticValue elements to be able to enter multiple commands into one line.
no 0 1
  • true
  • false
  • 0
  • 1
2.6_#1486_b758 | 2016-05-24