Class URIValue

All Implemented Interfaces:
CSSPrimitiveValue2, ExtendedCSSPrimitiveValue, ExtendedCSSValue, Cloneable, CSSPrimitiveValue, CSSValue
Direct Known Subclasses:
URIValueWrapper

public class URIValue extends StringValue
URI primitive value.
  • Constructor Details

  • Method Details

    • getPrimitiveType

      public short getPrimitiveType()
      Specified by:
      getPrimitiveType in interface CSSPrimitiveValue
      Overrides:
      getPrimitiveType in class StringValue
    • setCssText

      public void setCssText(String cssText) throws DOMException
      Description copied from class: StyleValue
      Attempts to change this value to match the supplied css text.

      In css4j, it is not recommended to set property values using this method.

      Specified by:
      setCssText in interface CSSValue
      Overrides:
      setCssText in class StringValue
      Throws:
      DOMException - SYNTAX_ERR: Raised if the specified CSS string value has a syntax error (according to the attached property) or is unparsable.
      INVALID_MODIFICATION_ERR: Raised if the specified CSS string value represents a different type of values than the values allowed by the CSS property.
      NO_MODIFICATION_ALLOWED_ERR: Raised if this value is read-only.
    • setUnescapedCssText

      protected void setUnescapedCssText(String css)
      Overrides:
      setUnescapedCssText in class StringValue
    • getMinifiedCssText

      public String getMinifiedCssText(String propertyName)
      Description copied from interface: ExtendedCSSValue
      Gives a minified version of the css text of the property, for the given property name.
      Specified by:
      getMinifiedCssText in interface ExtendedCSSValue
      Overrides:
      getMinifiedCssText in class StringValue
      Parameters:
      propertyName - the property name.
      Returns:
      the minified css text.
    • getURLValue

      public URL getURLValue()
      Get the URL contained in this URI value, if it is absolute.
      Returns:
      the URL contained in this URI value if it is absolute, null otherwise.
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class StringValue
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class StringValue
    • isEquivalent

      public boolean isEquivalent(URIValue other)
    • clone

      public URIValue clone()
      Description copied from class: PrimitiveValue
      Creates and returns a copy of this object.

      The object will be the same except for the subproperty flag, that will be disabled in the clone object.

      Specified by:
      clone in interface ExtendedCSSValue
      Overrides:
      clone in class StringValue
      Returns:
      a copy of this object.
    • getCssText

      public String getCssText()
      Description copied from class: StyleValue
      Get a string representation of the current value.
      Specified by:
      getCssText in interface CSSValue
      Specified by:
      getCssText in class StyleValue
      Returns:
      the css text representing the value of this property.