Package de.dytanic.cloudnet.console
Enum ConsoleColor
- java.lang.Object
-
- java.lang.Enum<ConsoleColor>
-
- de.dytanic.cloudnet.console.ConsoleColor
-
- All Implemented Interfaces:
java.io.Serializable,java.lang.Comparable<ConsoleColor>
public enum ConsoleColor extends java.lang.Enum<ConsoleColor>
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull java.lang.StringgetAnsiCode()static @Nullable ConsoleColorgetByChar(char index)chargetIndex()static @Nullable ConsoleColorgetLastColour(char triggerChar, @NotNull java.lang.String text)@NotNull java.lang.StringgetName()static @NotNull java.lang.StringtoColouredString(char triggerChar, @NotNull java.lang.String text)@NotNull java.lang.StringtoString()static ConsoleColorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static ConsoleColor[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
DEFAULT
public static final ConsoleColor DEFAULT
-
BLACK
public static final ConsoleColor BLACK
-
DARK_BLUE
public static final ConsoleColor DARK_BLUE
-
GREEN
public static final ConsoleColor GREEN
-
CYAN
public static final ConsoleColor CYAN
-
DARK_RED
public static final ConsoleColor DARK_RED
-
PURPLE
public static final ConsoleColor PURPLE
-
ORANGE
public static final ConsoleColor ORANGE
-
GRAY
public static final ConsoleColor GRAY
-
DARK_GRAY
public static final ConsoleColor DARK_GRAY
-
BLUE
public static final ConsoleColor BLUE
-
LIGHT_GREEN
public static final ConsoleColor LIGHT_GREEN
-
AQUA
public static final ConsoleColor AQUA
-
RED
public static final ConsoleColor RED
-
PINK
public static final ConsoleColor PINK
-
YELLOW
public static final ConsoleColor YELLOW
-
WHITE
public static final ConsoleColor WHITE
-
-
Method Detail
-
values
public static ConsoleColor[] 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 (ConsoleColor c : ConsoleColor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static ConsoleColor 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 namejava.lang.NullPointerException- if the argument is null
-
toColouredString
@NotNull public static @NotNull java.lang.String toColouredString(char triggerChar, @NotNull @NotNull java.lang.String text)
-
getByChar
@Nullable public static @Nullable ConsoleColor getByChar(char index)
-
getLastColour
@Nullable public static @Nullable ConsoleColor getLastColour(char triggerChar, @NotNull @NotNull java.lang.String text)
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toStringin classjava.lang.Enum<ConsoleColor>
-
getName
@NotNull public @NotNull java.lang.String getName()
-
getAnsiCode
@NotNull public @NotNull java.lang.String getAnsiCode()
-
getIndex
public char getIndex()
-
-