Enum PrimitiveColor
- java.lang.Object
-
- java.lang.Enum<PrimitiveColor>
-
- com.google.javascript.jscomp.colors.PrimitiveColor
-
- All Implemented Interfaces:
Color,java.io.Serializable,java.lang.Comparable<PrimitiveColor>
@Immutable public enum PrimitiveColor extends java.lang.Enum<PrimitiveColor> implements Color
Value types that are a) not user-defined and b) do not need individual classes
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description com.google.common.collect.ImmutableCollection<Color>getAlternates()booleanisInvalidating()booleanisObject()booleanisPrimitive()booleanisUnion()static PrimitiveColorvalueOf(java.lang.String name)Returns the enum constant of this type with the specified name.static PrimitiveColor[]values()Returns an array containing the constants of this enum type, in the order they are declared.
-
-
-
Enum Constant Detail
-
NUMBER
public static final PrimitiveColor NUMBER
-
STRING
public static final PrimitiveColor STRING
-
SYMBOL
public static final PrimitiveColor SYMBOL
-
NULL_OR_VOID
public static final PrimitiveColor NULL_OR_VOID
-
BIGINT
public static final PrimitiveColor BIGINT
-
BOOLEAN
public static final PrimitiveColor BOOLEAN
-
UNKNOWN
public static final PrimitiveColor UNKNOWN
-
-
Method Detail
-
values
public static PrimitiveColor[] 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 (PrimitiveColor c : PrimitiveColor.values()) System.out.println(c);
- Returns:
- an array containing the constants of this enum type, in the order they are declared
-
valueOf
public static PrimitiveColor 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
-
isPrimitive
public boolean isPrimitive()
- Specified by:
isPrimitivein interfaceColor
-
getAlternates
public com.google.common.collect.ImmutableCollection<Color> getAlternates()
- Specified by:
getAlternatesin interfaceColor
-
isInvalidating
public boolean isInvalidating()
- Specified by:
isInvalidatingin interfaceColor
-
-