Package jmri.util
Class ConnectionNameFromSystemName
- java.lang.Object
-
- jmri.util.ConnectionNameFromSystemName
-
public class ConnectionNameFromSystemName extends java.lang.Object
Common utility method for returning the System Connection Name from the System Name Prefix
-
-
Constructor Summary
Constructors Constructor Description ConnectionNameFromSystemName()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.String
getConnectionName(java.lang.String prefix)
Locates the connected systems name from a given prefix.static java.lang.String
getPrefixFromName(java.lang.String name)
Locates the connected systems prefix from a given System name.static SystemConnectionMemo
getSystemConnectionMemoFromSystemPrefix(java.lang.String systemPrefix)
Get theSystemConnectionMemo
for a given system prefix.static SystemConnectionMemo
getSystemConnectionMemoFromUserName(java.lang.String userName)
Get theSystemConnectionMemo
for a given user name.
-
-
-
Constructor Detail
-
ConnectionNameFromSystemName
public ConnectionNameFromSystemName()
-
-
Method Detail
-
getConnectionName
@CheckForNull public static java.lang.String getConnectionName(@Nonnull java.lang.String prefix)
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
@CheckForNull public static java.lang.String getPrefixFromName(@Nonnull java.lang.String name)
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 java.lang.String systemPrefix)
Get theSystemConnectionMemo
for 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 java.lang.String userName)
Get theSystemConnectionMemo
for a given user name.- Parameters:
userName
- the user name- Returns:
- the SystemConnectionMemo or null if no memo exists
-
-