Class Declaration

  • All Implemented Interfaces:
    Serializable

    public class Declaration
    extends Rule
    Object model for a declaration used to define css.
    Author:
    nhant01, GeorgeLuo
    See Also:
    Serialized Form
    • Constructor Detail

      • Declaration

        public Declaration​(@Nonnull
                           String name)
        Constructor of Declaration
        Parameters:
        name - to set for this declaration
    • Method Detail

      • getTokenType

        public TokenType getTokenType()
        Getter for token type
        Specified by:
        getTokenType in class Token
        Returns:
        the type of the token (declaration)
      • firstIdent

        public String firstIdent()
        For a declaration, if the first non-whitespace token is an identifier, returns its string value. Otherwise, returns the empty string.
        Returns:
        value of first non-whitespace identifier or empty string
      • getValue

        public List<com.steadystate.css.parser.Token> getValue()
        Getter for contents of declaration
        Overrides:
        getValue in class Token
        Returns:
        the value of Declaration as a list of its contents
      • getName

        @Nonnull
        public String getName()
        Getter for contents of name of declaration
        Returns:
        the name of a declaration
      • getImportant

        public boolean getImportant()
        Getter for important value
        Returns:
        the target value of important flag
      • setImportant

        public void setImportant​(boolean important)
        Parameters:
        important - the target value of important Setter for importance of declaration