Skip to content

Data Types & Predefined Operations

Muhammad Hammad edited this page Sep 27, 2017 · 6 revisions

Data Types

The dvare framework has all common data types. Following is the table giving details about all the data types available in the dvare framework.

Sr.No Name Description Literal Syntax
1 StringType A sequence of Chars. 'dvare framework'
2 IntegerType 32 bit signed value. 10
3 FloatType 32 bit IEEE 754 single-precision float. 10.10
4 BooleanType Either the literal "true" or the literal "false". true or false
5 RegexType Java Regular Expressions for String comparison. {regex}
6 DateType Java Time LocalDate.(dd-MM-yyyy) or (yyyy-MM-dd) 30-12-2011 or 2011-12-30
7 DateTimeType Java Time LocalDateTime. (dd-MM-yyyy-HH:mm:ss) 30-12-2011-13:55:40
8 PairType org.apache.commons.lang3.tuple.Pair toPair(KeyLiteral,ValueLiteral)
9 NullType Empty Value. null or NULL
10 StringListType Java List of String values. ['dvare' , 'framework']
11 IntegerListType Java List of Integer values. [10, 20]
12 FloatListType Java List of Float values. [10.10 , 20.00]
13 BooleanListType Java List of Boolean values. [true , false]

Predefined Operations

The dare framework defines a number of operations on the data types. Following is the table giving details of the predefined operations on the data types.

Sr.No Name Predefined Operations Note
1 StringType length(), toInteger(), toDate(), append(X), append(X),prepend(X), contains(X), startsWith(X), endsWith(X), substring(Q, P) X = String Literal, Q = Integer Literal [start from 1] , P = Integer Literal
2 IntegerType toString()
3 FloatType toString(), toInteger()
4 BooleanType toString()
6 DateType toString(), getYears(), addDays(P), addMonths(P), addYears(P), setDay(P), setMonth(P), setYear(P) P = Integer Literal
6 DateTimeType toString()
7 PairType getKey(), getValue()

Clone this wiki locally