Class 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 Detail

      • GroupingStrategy

        public GroupingStrategy()
    • 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 interface SortingStrategy
        Parameters:
        headModel -
        childModel -
        Returns:
        Position of the end of the matching element group.