Package jmri.util

Class NamedBeanUserNameComparator<B extends NamedBean>

  • Type Parameters:
    B - supported type of NamedBean
    All Implemented Interfaces:

    public class NamedBeanUserNameComparator<B extends NamedBean>
    extends java.lang.Object
    implements java.util.Comparator<B>
    Comparator for JMRI NamedBeans via their User Names.

    If the User Names are both non-null and are not equal, uses the AlphanumComparator, otherwise uses the NamedBeanComparator.

    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      int compare​(B n1, B n2)  
      • 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