Enum 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 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 name
        java.lang.NullPointerException - if the argument is null
      • isPrimitive

        public boolean isPrimitive()
        Specified by:
        isPrimitive in interface Color
      • isUnion

        public boolean isUnion()
        Specified by:
        isUnion in interface Color
      • isObject

        public boolean isObject()
        Specified by:
        isObject in interface Color
      • getAlternates

        public com.google.common.collect.ImmutableCollection<Color> getAlternates()
        Specified by:
        getAlternates in interface Color
      • isInvalidating

        public boolean isInvalidating()
        Specified by:
        isInvalidating in interface Color