Search in sources :

Example 1 with DefaultSignalGroup

use of jmri.implementation.DefaultSignalGroup in project JMRI by JMRI.

the class DefaultSignalGroupManager method newSignalGroup.

@Override
public SignalGroup newSignalGroup(String sys) {
    SignalGroup g;
    g = new DefaultSignalGroup(sys);
    register(g);
    return g;
}
Also used : DefaultSignalGroup(jmri.implementation.DefaultSignalGroup) SignalGroup(jmri.SignalGroup) DefaultSignalGroup(jmri.implementation.DefaultSignalGroup)

Example 2 with DefaultSignalGroup

use of jmri.implementation.DefaultSignalGroup in project JMRI by JMRI.

the class DefaultSignalGroupManager method provideSignalGroup.

@Override
public SignalGroup provideSignalGroup(String systemName, String userName) {
    SignalGroup r;
    r = getByUserName(systemName);
    if (r != null) {
        return r;
    }
    r = getBySystemName(systemName);
    if (r != null) {
        return r;
    }
    // Group does not exist, create a new group
    r = new DefaultSignalGroup(systemName, userName);
    // save in the maps
    register(r);
    return r;
}
Also used : DefaultSignalGroup(jmri.implementation.DefaultSignalGroup) SignalGroup(jmri.SignalGroup) DefaultSignalGroup(jmri.implementation.DefaultSignalGroup)

Aggregations

SignalGroup (jmri.SignalGroup)2 DefaultSignalGroup (jmri.implementation.DefaultSignalGroup)2