001package jmri.jmrix;
002
003import java.util.Comparator;
004import java.util.ResourceBundle;
005import jmri.NamedBean;
006import jmri.util.NamedBeanPreferNumericComparator;
007
008/**
009 * A SystemConnectionMemo that does not get registered its prefix registered
010 * with the {@link jmri.InstanceManager} and is likely to have a system prefix
011 * and user name that conflict with the default values of another, user
012 * controllable, manager. This SystemConnectionMemo is not intended to be
013 * invoked on any system connection that is configurable by the user, and should
014 * only be used to maintain backwards compatibility with incorrectly prefixed
015 * NamedBeans defined in JMRI 4.16.
016 *
017 * @author Randall Wood Copyright 2019
018 * @deprecated used only to maintain backwards compatibility with JMRI 4.16;
019 * remove immediately when no longer used
020 */
021@Deprecated
022public class ConflictingSystemConnectionMemo extends DefaultSystemConnectionMemo {
023
024    public ConflictingSystemConnectionMemo(String prefix, String userName) {
025        super(prefix, userName);
026    }
027
028    @Override
029    protected ResourceBundle getActionModelResourceBundle() {
030        return null; // no resource bundle
031    }
032
033    @Override
034    public <B extends NamedBean> Comparator<B> getNamedBeanComparator(Class<B> type) {
035        return new NamedBeanPreferNumericComparator<>();
036    }
037
038    @Override
039    public void register() {
040        // do nothing
041    }
042}