Thymeleaf is a template engine designed with Java-application in mind. The engine comes with utility classes that can be used to format, process or transform variables on the template. In this article, we will showcase utility methods for
Aggregates. The implementation of
Aggregates utility methods can be found in the official Thymeleaf GitHub Repository.
2. Available utility methods for
Aggregates utility methods are used to compute sum or average value of the elements stored in collection or array. Items of the collection must implement one of the following interfaces:
||Compute sum||Returns null if array or collection is empty|
||Compute average||Returns null if array or collection is empty|
In this article, we presented Thymeleaf utility methods for
Aggregates. The utility should be helpful to sum all collection elements of present the average value.