The sort function for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through templates.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted
fieldName
java.lang.String
A fieldName to be sorted and the sort direction.
Return
-
java.util.Collection
A sorted collection.
For example:
Code Block
language
text
#foreach ($rel in $sorter.sort($package, "name"))
$rel.name
#end
$package is the collection to be sorted.
"name:desc" is separated by ":" in two parts:
The first part is to identify fieldName to be sorted.
The second part is the option to identify the sorting direction. Sometimes, the direction is not identified. It is ascending by default.
This is the The sort function for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through the templates.This function allows case-sensitive sorting.
Name
Type
Description
Name
Type
Description
Parameter(s)
collection collection
javajava.util.Collection
A collection to be sorted.
ReturnfieldName
-
java.utillang.Collection String
A fieldName to be sorted collection.
For example:
Code Block
language
text
#foreach ($rel in
and the sort direction.
isCaseInsensitive
boolean
True if case-insensitive sorting.
Return
-
java.util.Collection
A sorted collection.
$sorter.sort(
$package))
$rel.name
#end
collection)
This is the sort function for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through the templates.
Name
Type
Description
Parameter(s)
collection
java
$package is a collection to be sorted.
Tip
The collection will be sorted by name, in ascending order, by default.
This sort function allows specifying more than one field name to be sorted. The priority of fields is ranked by the sequence in the fieldNameCollection parameter.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
Return
fieldNameCollection
-
java.util.
Collection
Collection
A
collection of field names, sorted by the priority of field name order in the collection.
direction
java.lang.String
Sorting direction. It is either "asc" or "desc". If this field is not entered, "asc" is used by default.
Return
-
java.util.Collection
A sorted collection.
For example:
Code Block
language
text
#foreach ($p in $sorter.sort($Package, ["version", "name"], "desc"))
$p.name
#end
$sorter.sortByFirstNumber(collection, fieldName)
The sortByFirstNumber function is for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through templates.
sorted collection.
For example:
Code Block
language
text
#foreach ($rel in $sorter.sort($package))
$rel.name
#end
$package is a collection to be sorted.
Tip
The collection will be sorted by name, in ascending order, by default.
This sort function allows specifying more than one field name to be sorted. The priority of fields is ranked by the sequence in the fieldNameCollection parameter.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldNameCollection
java.util.Collection
A collection of field names, sorted by the priority of field name order in the collection.
direction
java.lang.String
Sorting direction. It is either "asc" or "desc". If this field is not entered, "asc" is used by default.
Return
-
java.util.Collection
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldName
java.lang.String
A fieldName to be sorted and the sorting direction.
Return
-
java.util.Collection
A sorted collection.
For example:
Code Block
language
text
#foreach ($rel$p in $sorter.sortByFirstNumbersort($package$Package, ["name:version", "name"], "desc"))
$rel$p.name
#end
This sort function allows specifying more than one field name to be sorted
by FirstNumber.
. The priority of fields is ranked by the sequence in the fieldNameCollection parameter. This function allows case-sensitive sorting.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldName
java.lang.String
A fieldName to be sorted and the sort direction.
direction
java.lang.String
Sorting direction. It is either "asc" or "desc". If this field is not entered, "asc" is used by default.
isCaseInsensitive
boolean
True if case-insensitive sorting.
Return
-
java.util.Collection
A sorted collection.
$sorter.sortByFirstNumber(collection, fieldName)
The sortByFirstNumber function is
"name:desc" is separated by ":" in two parts:
The first part is to identify fieldName to be sorted.
The second part is the option to identify the sorting direction. Sometimes, the direction is not identified. It is ascending by default.
$sorter.sortByFirstNumber(collection)
The sortByFirstNumber function for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through templates.
Name
Type
Description
Parameter(s)
collection collection
java.util.CollectionCollection
A collection to be sorted.
Return fieldName
-
java.utillang.Collection String
A fieldName to be sorted and collection. the sorting direction.
Return
-
java.util.Collection
A sorted collection.
For For example:
Code Block
language
text
#foreach ($rel in $sorter.sortByFirstNumber($package, "name:desc"))
$rel.name
#end
$package is a collection to be sorted by FirstNumber.
$sorter.sortByLocale(collection, String)
This is a function to sort for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through templates. To sort a given collection by a particular language, identify the country code to specify the language.
"name:desc" is separated by ":" in two parts:
The first part is to identify fieldName to be sorted.
The second part is the option to identify the sorting direction. Sometimes, the direction is not identified. It is ascending by default.
$sorter.sortByFirstNumber(collection)
The sortByFirstNumber function for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through templates.
Name
Name
Type
Description
Parameter(s)
collection
java java.util.Collection Collection
A collection to be sorted.
ReturncountryCode
-
java.langutil.String
The country code to specify a language to perform sorting.
Return
-
java.util.Collection
A sorted collection.
Collection
A sorted collection.
For example:
Code Block
language
text
#foreach ($p$rel in $sorter.sortByLocalesortByFirstNumber($package, "DE"))$p$rel.name
#end
$package is a collection to be sorted by country codeFirstNumber."DE" is the country code for GERMANY (ISO country code).
Tip
This method sorts a collection by “name” attribute of each element by default.
$sorter.sortByLocale(collection, String, String)
$sorter.sortByLocale(collection, String)
This is a function to sort for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through templates. To sort a given collection by a particular language, identify the country code to specify the languageby identifying the country code and field name.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldNamecountryCode
java.lang.String
The country code
A fieldName to b 0e sorted.
countryCode
java.lang.String
The country code to specify to specify a language to perform sorting.
Return
-
java.util.Collection
A sorted collection.
For example:
Code Block
language
text
#foreach ($p in $sorter.sortByLocale($package, "name", "DE"))
$p.name
#end
$package is the a collection to be sorted by country code.
“name” is the field name to be sorted.
"DE" is the country code for GERMANY (ISO country code).
$sorter.humanSort(collection, fieldName)
Tip
This method sorts a collection by “name” attribute of each element by default.
$sorter.sortByLocale(collection, String, String)
This is a function to sort for report templates. The context name of this class is "sorter". Use $sorter to access public functions of this class through templates. To sort a given collection by a particular language, specify the language by identifying the country code and field name.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldName
java.lang.String
A fieldName to b 0e sorted.
countryCode
java.lang.String
The country code to specify a language to perform sorting.
Return
-
java.util.Collection
A sorted collection.
For example:
Code Block
language
text
#foreach ($p in $sorter.sortByLocale($package, "name", "DE"))
$p.name
#end
$package is the collection to be sorted.
“name” is the field name to be sorted.
"DE" is the country code for GERMANY (ISO country code).
$sorter.humanSort(collection, fieldName)
This is a special function to sort text in a human-like order. It splits text into numeric and non-numeric chunks and sorts them in numerical order. For example, "foo10" is ordered after "foo2".
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldName
java.lang.String
A fieldName to be sorted and the sorting direction.
Return
-
java.util.Collection
A sorted collection.
For example:
Code Block
language
text
#foreach ($rel in $sorter.humanSort($package, "name:desc"))
$rel.name
#end
$package is the collection to be sorted.
"name:desc" is separated by ":" in two parts:
The first part is to identify fieldName to be sorted.
The second part is the option to identify the sorting scheme. Sometimes, the order is not identified. It is ascending by default.
This is a special function to sort text in a human-like order. It splits text into numeric and non-numeric chunks and sorts them in numerical order. For example, "foo10" is ordered after "foo2". This function allows case-sensitive sorting.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldName
java.lang.String
A fieldName to be sorted and the sorting direction.
isCaseInsensitive
boolean
True if case-insensitive sorting.
Return
-
java.util.Collection
A sorted collection.
$sorter.humanSort(collection)
This is a special function is a special function to sort text in a human-like order. It splits text into numeric and non-numeric chunks and sorts them in numerical order. For example, "foo10" is ordered after "foo2".
Name
Type
Description
Parameter
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldName
java.lang.String
java.util.Collection
A collection to be sortedA fieldName to be sorted and the sorting direction.
Return
-
java.util.CollectionCollection
A sorted collection.
For example:
Code Block
language
text
#foreach ($rel in $sorter.humanSort($package, "name:desc"))
$rel.name
#end
This humanSort function allows specifying more than one field name to be sorted. The priority of fields is ranked by the sequence in the fieldNameCollection parameter.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldNameCollection
java.util.Collection
A collection of field names, sorted by the priority of field name order in the collection.
direction
java.lang.String
Sorting direction. It is either "asc" or "desc". If this field is not entered, "asc" is used by default.
Return
-
java.util.Collection
A sorted collection.
"name:desc" is separated by ":" in two parts:
The first part is to identify fieldName to be sorted.
The second part is the option to identify the sorting scheme. Sometimes, the order is not identified. It is ascending by default.
$sorter.humanSort(collection)
This is a special function to sort text in a human-like order. It splits text into numeric and non-numeric chunks and sorts them in numerical order. For example, "foo10" is ordered after "foo2".
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
Return
-
java.util.Collection
A sorted collection.
For example:
Code Block
language
text
#foreach ($rel$p in $sorter.humanSort($package$Package, ["version", "name"], "desc"))
$rel$p.name
#end
$package is the collection to be sorted.
$sorter.humanSort(collection,
fieldNameCollection
fieldName, direction, isCaseInsensitive)
This humanSort function allows specifying more than one field name to be sorted. The priority of fields is ranked by the sequence in the fieldNameCollection parameter. This function allows case-sensitive sorting.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
fieldNameCollection
fieldName
java.
util
lang.
Collection
String
A
collection of field names, sorted by the priority of field name order in the collection.
fieldName to be sorted and the sorting direction.
direction
java.lang.String
Sorting direction. It is either "asc" or "desc". If this field is not entered, "asc"
is used by default
is used by default.
isCaseInsensitive
boolean
True if case-insensitive sorting.
Return
-
java.util.Collection
A sorted collection
.
For example:
Code Block
language
text
#foreach ($p in $sorter.humanSort($Package, ["version", "name"], "desc"))
$p
.
name
#end
$sorter.containmentTreeSort(collection)
This function is for sorting elements that match the Containment tree order.
This function is for sorting a collection item by specifying an applied stereotype name and tag name and forcing a tag value to convert to a numeric before sorting.
Name
Type
Description
Parameter(s)
collection
java.util.Collection
A collection to be sorted.
stereotypeName
java.lang.String
An applied stereotype name.
tagName
java.lang.String
A tag name of the applied stereotype and the sorting direction.
forceNumber
boolean
True if a tag value is converted to a numeric before sorting.
This function is for sorting a collection item by specifying an applied stereotype object and tag name and forcing a tag value to convert to a numeric before sorting.