Class GroupingStrategy
- java.lang.Object
-
- nz.net.ultraq.thymeleaf.layoutdialect.decorators.strategies.GroupingStrategy
-
- All Implemented Interfaces:
SortingStrategy
public class GroupingStrategy extends Object implements SortingStrategy
The<head>
merging strategy which groups like elements together.- Since:
- 2.4.0
- Author:
- zhanhb, Emanuel Rabina
-
-
Constructor Summary
Constructors Constructor Description GroupingStrategy()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
findPositionForModel(IModel headModel, IModel childModel)
Returns the index of the last set of elements that are of the same 'type' as the content node.
-
-
-
Method Detail
-
findPositionForModel
public int findPositionForModel(IModel headModel, IModel childModel)
Returns the index of the last set of elements that are of the same 'type' as the content node. eg: groups scripts with scripts, stylesheets with stylesheets, and so on.- Specified by:
findPositionForModel
in interfaceSortingStrategy
- Parameters:
headModel
-childModel
-- Returns:
- Position of the end of the matching element group.
-
-