Enum BasicColor

    • Field Detail

      • index

        private final int index
      • name

        private final java.lang.String name
      • highIntensity

        private final boolean highIntensity
    • Constructor Detail

      • BasicColor

        private BasicColor​(int index,
                           java.lang.String name)
      • BasicColor

        private BasicColor​(int index,
                           java.lang.String name,
                           boolean highIntensity)
    • Method Detail

      • values

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

        public static BasicColor 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
      • getAnsiForegroundControlCode

        public java.lang.String getAnsiForegroundControlCode()
        Description copied from interface: AnsiColorProvider
        Gets the ANSI control code for setting the foreground colour
        Specified by:
        getAnsiForegroundControlCode in interface AnsiColorProvider
        Returns:
        Foreground control code
      • getAnsiBackgroundControlCode

        public java.lang.String getAnsiBackgroundControlCode()
        Description copied from interface: AnsiColorProvider
        Gets the ANSI control code for setting the background colour
        Specified by:
        getAnsiBackgroundControlCode in interface AnsiColorProvider
        Returns:
        Background control code
      • usesExtendedColors

        public boolean usesExtendedColors()
        Description copied from interface: AnsiColorProvider
        Gets whether extended colours are used as this will affect the ANSI reset sequence that needs to be used
        Specified by:
        usesExtendedColors in interface AnsiColorProvider
        Returns:
        True if extended colours are used, false otherwise
      • getAnsiControlCode

        private java.lang.String getAnsiControlCode​(int base)
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Enum<BasicColor>