Package jmri.util

Class NamedBeanPreferNumericComparator<B extends NamedBean>

Type Parameters:
B - the type of NamedBean to compare
All Implemented Interfaces:

public class NamedBeanPreferNumericComparator<B extends NamedBean>
extends NamedBeanComparator<B>
Compare two NamedBeans using the PreferNumericComparator against NamedBean.getSystemName() for each NamedBean.

If the requirement is that, Object) return 0 for two numerically identical NamedBean System Names (i.e. IT42 == IT0042), use NamedBeanComparator, but if the requirement is that System Names should be numerically ordered, but that non-identical representations of numbers should be different, (i.e. IT42 != IT0042, but order should be IT3, IT4, IT5, IT42, IT0042, IT50), use this Comparator.