BellaDati supports all Arrays from https://docs.oracle.com/javase/7/docs/api/java/util/Arrays.html and ArrayUtils from https://commons.apache.org/proper/commons-lang/javadocs/api-2.6/org/apache/commons/lang/ArrayUtils.html.
Syntax: first define name of the package, then use desired method.
def int a = [1,2,3]
a = ArrayUtils.add(a, 0)
The transformation script has built-in support for two important data types, lists and maps (Lists can be operated as arrays in Java language). Lists are used to store ordered collections of data. For example an integer list of your favorite integers might look like this:
Another native data structure is called a map. A map is used to store "associative arrays" or "dictionaries". That is unordered collections of heterogeneous, named data. For example, let's say we wanted to store names with IQ scores we might have:
To add data to a map, the syntax is similar to adding values to an list. For example, if Pete re-took the IQ test and got a 3, we might:
To get the size of the collection, you can use the size() function:
Looping is provided using the
Convert bank account number to bank name
Let the column cell contains a full bank account number (eg. "54-123456789/0100") and we transform it to the bank name according to last 4 digits. The script is: