Package jmri.util
Class ConnectionNameFromSystemName
java.lang.Object
jmri.util.ConnectionNameFromSystemName
Common utility method for returning the System Connection Name from the
System Name Prefix
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgetConnectionName(String prefix) Locates the connected systems name from a given prefix.static StringgetPrefixFromName(String name) Locates the connected systems prefix from a given System name.static SystemConnectionMemogetSystemConnectionMemoFromSystemPrefix(String systemPrefix) Get theSystemConnectionMemofor a given system prefix.static SystemConnectionMemogetSystemConnectionMemoFromUserName(String userName) Get theSystemConnectionMemofor a given user name.
-
Constructor Details
-
ConnectionNameFromSystemName
public ConnectionNameFromSystemName()
-
-
Method Details
-
getConnectionName
Locates the connected systems name from a given prefix.- Parameters:
prefix- the system prefix- Returns:
- The Connection System Name or null if no connection has the given prefix
-
getPrefixFromName
Locates the connected systems prefix from a given System name.- Parameters:
name- The user name- Returns:
- The system prefix or null if no connection has the given name
-
getSystemConnectionMemoFromSystemPrefix
@CheckForNull public static SystemConnectionMemo getSystemConnectionMemoFromSystemPrefix(@Nonnull String systemPrefix) Get theSystemConnectionMemofor a given system prefix.- Parameters:
systemPrefix- the system prefix- Returns:
- the SystemConnectionMemo or null if no memo exists
-
getSystemConnectionMemoFromUserName
@CheckForNull public static SystemConnectionMemo getSystemConnectionMemoFromUserName(@Nonnull String userName) Get theSystemConnectionMemofor a given user name.- Parameters:
userName- the user name- Returns:
- the SystemConnectionMemo or null if no memo exists
-