Enum EnvironmentVariable

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Comparable<EnvironmentVariable>, org.refcodes.mixin.KeyAccessor<java.lang.String>, org.refcodes.mixin.ValueAccessor<java.lang.String>, org.refcodes.mixin.ValueAccessor.ValueMutator<java.lang.String>, org.refcodes.mixin.ValueAccessor.ValueProperty<java.lang.String>

    public enum EnvironmentVariable
    extends java.lang.Enum<EnvironmentVariable>
    implements org.refcodes.mixin.KeyAccessor<java.lang.String>, org.refcodes.mixin.ValueAccessor.ValueProperty<java.lang.String>
    EnvironmentVariable for retrieving some common environment variables with ease.
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface org.refcodes.mixin.KeyAccessor

        org.refcodes.mixin.KeyAccessor.KeyBuilder<K extends java.lang.Object,B extends org.refcodes.mixin.KeyAccessor.KeyBuilder<K,B>>, org.refcodes.mixin.KeyAccessor.KeyMutator<K extends java.lang.Object>, org.refcodes.mixin.KeyAccessor.KeyProperty<K extends java.lang.Object>
      • Nested classes/interfaces inherited from interface org.refcodes.mixin.ValueAccessor

        org.refcodes.mixin.ValueAccessor.ValueBuilder<V extends java.lang.Object,B extends org.refcodes.mixin.ValueAccessor.ValueBuilder<V,B>>, org.refcodes.mixin.ValueAccessor.ValueMutator<V extends java.lang.Object>, org.refcodes.mixin.ValueAccessor.ValueProperty<V extends java.lang.Object>
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
      ANSICON
      The virtual and the physical console width height and environment variable.
      COMPUTERNAME
      The environment variable (on windows) holding the computer's name.
      CONSOLE_ANSI
      Set to "true" or "false", forces ANSI to be used / not used by REFCODES.ORG artifacts, no matter what capabilities were detected for the hosting terminal.
      CONSOLE_CONEMU_ANSI
      ConEmu's environment variable regarding ANSI support.
      CONSOLE_HEIGHT
      Stands for the lines per column to be taken by REFCODES.ORG artifacts.
      CONSOLE_LINE_BREAK
      The console's line-break property.
      CONSOLE_WIDTH
      Stands for the chars per row to be taken by REFCODES.ORG artifacts.
      HOST_SEED
      Environment variable "HOST_SEED" for the Host-Seed for host-related IDs.
      HOSTNAME
      The environment variable (on windows) holding the computer's name.
      HTTP_PROXY
      HTTP-Proxy setting in URL notation ("http://my.company.org:3128")
      HTTPS_PROXY
      HTTPS-Proxy setting in URL notation ("http://my.company.org:3128")
      LOGGER_LAYOUT
      Stands for the chosen layout for the REFCODES.ORG logger artifacts.
      LOGGER_STYLE
      Stands for the chosen style for the REFCODES.ORG logger artifacts.
      NO_PROXY
      No-Proxy settings for the HTTP_PROXY (HTTPS_PROXY) settings in a comma separated list ("localhost,127.0.0.0/8,127.0.1.1,127.0.1.1*,...")
      NUMBER_OF_PROCESSORS
      Number of processors.
      PROCESSOR_ARCHITECTURE
      Processor architecture on some systems (e.g.
      PROCESSOR_ARCHITEW6432
      Processor architecture on some systems (e.g.
      TERM
      Environment variable holding the current session's terminal.
      TERMINAL_HEIGHT
      The console height environment variable.
      TERMINAL_WIDTH
      The console width environment variable on *ix like shells.
      USER_HOME
      Environment variable holding the user's home folder path.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getKey()
      java.lang.String getValue()
      Retrieves the value, first the upper-case variant of the environment variable is tried out.
      void setValue​(java.lang.String aValue)
      Sets the value, first the upper-case variant of the environment variable is tried out.
      static EnvironmentVariable valueOf​(java.lang.String name)
      Returns the enum constant of this type with the specified name.
      static EnvironmentVariable[] 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

      • ANSICON

        public static final EnvironmentVariable ANSICON
        The virtual and the physical console width height and environment variable. E.g. ANSICON=80x19999 (80x25)
      • CONSOLE_CONEMU_ANSI

        public static final EnvironmentVariable CONSOLE_CONEMU_ANSI
        ConEmu's environment variable regarding ANSI support.
      • TERMINAL_HEIGHT

        public static final EnvironmentVariable TERMINAL_HEIGHT
        The console height environment variable.
      • TERMINAL_WIDTH

        public static final EnvironmentVariable TERMINAL_WIDTH
        The console width environment variable on *ix like shells.
      • CONSOLE_WIDTH

        public static final EnvironmentVariable CONSOLE_WIDTH
        Stands for the chars per row to be taken by REFCODES.ORG artifacts.
      • CONSOLE_HEIGHT

        public static final EnvironmentVariable CONSOLE_HEIGHT
        Stands for the lines per column to be taken by REFCODES.ORG artifacts.
      • CONSOLE_LINE_BREAK

        public static final EnvironmentVariable CONSOLE_LINE_BREAK
        The console's line-break property. Used to override any default line breaks for the REFCODES-ORG artifacts.
      • CONSOLE_ANSI

        public static final EnvironmentVariable CONSOLE_ANSI
        Set to "true" or "false", forces ANSI to be used / not used by REFCODES.ORG artifacts, no matter what capabilities were detected for the hosting terminal.
      • LOGGER_LAYOUT

        public static final EnvironmentVariable LOGGER_LAYOUT
        Stands for the chosen layout for the REFCODES.ORG logger artifacts.
      • LOGGER_STYLE

        public static final EnvironmentVariable LOGGER_STYLE
        Stands for the chosen style for the REFCODES.ORG logger artifacts.
      • COMPUTERNAME

        public static final EnvironmentVariable COMPUTERNAME
        The environment variable (on windows) holding the computer's name.
      • HOSTNAME

        public static final EnvironmentVariable HOSTNAME
        The environment variable (on windows) holding the computer's name.
      • USER_HOME

        public static final EnvironmentVariable USER_HOME
        Environment variable holding the user's home folder path.
      • TERM

        public static final EnvironmentVariable TERM
        Environment variable holding the current session's terminal.
      • NUMBER_OF_PROCESSORS

        public static final EnvironmentVariable NUMBER_OF_PROCESSORS
        Number of processors.
      • HOST_SEED

        public static final EnvironmentVariable HOST_SEED
        Environment variable "HOST_SEED" for the Host-Seed for host-related IDs.
      • HTTP_PROXY

        public static final EnvironmentVariable HTTP_PROXY
        HTTP-Proxy setting in URL notation ("http://my.company.org:3128")
      • HTTPS_PROXY

        public static final EnvironmentVariable HTTPS_PROXY
        HTTPS-Proxy setting in URL notation ("http://my.company.org:3128")
      • PROCESSOR_ARCHITECTURE

        public static final EnvironmentVariable PROCESSOR_ARCHITECTURE
        Processor architecture on some systems (e.g. "AMD64").
      • PROCESSOR_ARCHITEW6432

        public static final EnvironmentVariable PROCESSOR_ARCHITEW6432
        Processor architecture on some systems (e.g. "AMD64").
    • Method Detail

      • values

        public static EnvironmentVariable[] 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 (EnvironmentVariable c : EnvironmentVariable.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static EnvironmentVariable 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
      • getKey

        public java.lang.String getKey()
        Specified by:
        getKey in interface org.refcodes.mixin.KeyAccessor<java.lang.String>
      • getValue

        public java.lang.String getValue()
        Retrieves the value, first the upper-case variant of the environment variable is tried out. If not set or empty, then the lower-case variant is used.
        Specified by:
        getValue in interface org.refcodes.mixin.ValueAccessor<java.lang.String>
        Returns:
        The value of the environment variable.
      • setValue

        public void setValue​(java.lang.String aValue)
        Sets the value, first the upper-case variant of the environment variable is tried out. If not set or empty, then the lower-case variant is tried.
        Specified by:
        setValue in interface org.refcodes.mixin.ValueAccessor.ValueMutator<java.lang.String>
        Parameters:
        aValue - the new value