Class PortalManager.CatDiscrimComparator

  • All Implemented Interfaces:
    java.util.Comparator<Category>
    Enclosing class:
    PortalManager

    public static class PortalManager.CatDiscrimComparator
    extends java.lang.Object
    implements java.util.Comparator<Category>
    This inner class compare two categories. It is used to order a Category set in the same order than an array of root category and an array of contextual category. Each category gets point: - 1pt by RoutNavigate Level (First RootNavigate = +3 , Second RootNavigate = +2, Second RootNavigate = +1) - x2 for each contextual categories
    Since:
    jcms-5.5.0
    Author:
    Jean-Philippe Encausse
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(Category c1, Category c2)  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • Methods inherited from interface java.util.Comparator

        equals, reversed, thenComparing, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
    • Constructor Detail

      • CatDiscrimComparator

        public CatDiscrimComparator​(Category[] discrim,
                                    Category[] rootNav)
    • Method Detail

      • compare

        public int compare​(Category c1,
                           Category c2)
        Specified by:
        compare in interface java.util.Comparator<Category>