Enum Class CSSValue.CssType

java.lang.Object
java.lang.Enum<CSSValue.CssType>
io.sf.carte.doc.style.css.CSSValue.CssType
All Implemented Interfaces:
Serializable, Comparable<CSSValue.CssType>, java.lang.constant.Constable
Enclosing interface:
CSSValue

public static enum CSSValue.CssType extends Enum<CSSValue.CssType>
The main categories of values.
  • Enum Constant Details

    • KEYWORD

      public static final CSSValue.CssType KEYWORD
      A CSS-wide keyword like inherit.
    • PROXY

      public static final CSSValue.CssType PROXY

      A vehicle towards a final value, of a CSS type that cannot be anticipated.

      Example: var() or attr().

      (note that attr() has two components, a main one whose type could be anticipated, and a fallback that could be of a different type).

      PROXY values can be cast to a CSSPrimitiveValue.

    • TYPED

      public static final CSSValue.CssType TYPED
      A typed primitive value, includes numbers and identifiers.

      You can cast to CSSTypedValue (interface) or TypedValue (base implementation class).

    • LIST

      public static final CSSValue.CssType LIST
      A list of values.

      You can always cast to CSSValueList but, unless you are dealing with the argument list of a FUNCTION, it is better to cast directly to a ValueList.

    • SHORTHAND

      public static final CSSValue.CssType SHORTHAND
      A shorthand property.

      Declared shorthands can be retrieved from style declarations.

      Cast it to CSSShorthandValue to have access to the set of longhand property names set by the shorthand.

  • Method Details

    • values

      public static CSSValue.CssType[] values()
      Returns an array containing the constants of this enum class, in the order they are declared.
      Returns:
      an array containing the constants of this enum class, in the order they are declared
    • valueOf

      public static CSSValue.CssType valueOf(String name)
      Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (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:
      IllegalArgumentException - if this enum class has no constant with the specified name
      NullPointerException - if the argument is null