Class CssFileImpl

  • All Implemented Interfaces:
    CssFile

    public class CssFileImpl
    extends Object
    implements CssFile
    Implementation of CssFile, the CSS is stored in a map.
    Author:
    redlab_b
    • Constructor Detail

      • CssFileImpl

        public CssFileImpl()
        Constructs a new CssFileImpl.
    • Method Detail

      • add

        public boolean add​(String selector,
                           Map<String,​String> props)
        Description copied from interface: CssFile
        Add CSS to this CssFile.
        Specified by:
        add in interface CssFile
        Parameters:
        selector - the CSS selector
        props - the properties for the given selector
      • get

        public List<CssRule> get​(Tag t)
        Description copied from interface: CssFile
        Return CSS declarations for the given tag.
        Specified by:
        get in interface CssFile
        Parameters:
        t - the tag for searching rules
        Returns:
        a list of maps with all CSS properties for this tag or an empty list if none found.
      • isPersistent

        public boolean isPersistent()
        Specified by:
        isPersistent in interface CssFile
        Returns:
        if this CSS file should never be thrown away. Used in CSSFilesImpl#clear
      • isPersistent

        public void isPersistent​(boolean isPeristent)
        Indicates that this file should be kept.
        Specified by:
        isPersistent in interface CssFile
        Parameters:
        isPeristent - set to true if this file should be kept.