Package jmri

Enum NamedBean.DisplayOptions

    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      DISPLAYNAME
      Display the user name; if the user name is null or empty, display the system name.
      QUOTED_DISPLAYNAME
      Display the user name in quotes; if the user name is null or empty, display the system name in quotes.
      QUOTED_SYSTEMNAME
      Display the system name in quotes.
      QUOTED_USERNAME
      Display the user name in quotes; if the user name is null or empty, display the system name in quotes.
      QUOTED_USERNAME_SYSTEMNAME
      Display the user name in quotes followed by the system name in parenthesis.
      SYSTEMNAME
      Display the system name.
      USERNAME
      Display the user name; if the user name is null or empty, display the system name.
      USERNAME_SYSTEMNAME
      Display the user name followed by the system name in parenthesis.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static NamedBean.DisplayOptions valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static NamedBean.DisplayOptions[] values()
      Returns an array containing the constants of this enum type, in the order they are declared.
      • Methods inherited from class java.lang.Enum

        clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Enum Constant Detail

      • SYSTEMNAME

        public static final NamedBean.DisplayOptions SYSTEMNAME
        Display the system name. This should be used only when the context would cause displaying the user name to be more confusing than not or in text input fields for editing the system name.
      • QUOTED_SYSTEMNAME

        public static final NamedBean.DisplayOptions QUOTED_SYSTEMNAME
        Display the system name in quotes. This should be used only when the context would cause displaying the user name to be more confusing than not or in text input fields for editing the system name.
      • USERNAME_SYSTEMNAME

        public static final NamedBean.DisplayOptions USERNAME_SYSTEMNAME
        Display the user name followed by the system name in parenthesis. If the user name is null or empty, display the system name without parenthesis.
    • Method Detail

      • values

        public static NamedBean.DisplayOptions[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (NamedBean.DisplayOptions c : NamedBean.DisplayOptions.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static NamedBean.DisplayOptions valueOf​(java.lang.String name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        java.lang.IllegalArgumentException - if this enum type has no constant with the specified name
        java.lang.NullPointerException - if the argument is null