Package jmri.util

Class NamedBeanUserNameComparator<B extends NamedBean>

java.lang.Object
jmri.util.NamedBeanUserNameComparator<B>
Type Parameters:
B - supported type of NamedBean
All Implemented Interfaces:
Comparator<B>

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

If the User Names are both non-null and the AlphanumComparator tells them apart, uses that order, otherwise uses the beans' own NamedBean.compareTo(jmri.NamedBean) order. The AlphanumComparator treats names such as "Siding 7" and "Siding 07" as equal, so those also fall back to the beans' own order.