org.xhtmlrenderer.css.sheet.Ruleset elementStyling = getElementStyle(e); String fingerprint = null; if(elementStyling == null) { StringBuffer sb = new StringBuffer(); for(java.util.Iterator i = getMatchedRulesets(e); i.hasNext();) { sb.append(i.next().hashCode()); sb.append(":"); } fingerprint = sb.toString(); if(_csCache == null) _csCache = new java.util.HashMap(); cs = (CascadedStyle) _csCache.get(fingerprint); }  if(cs == null) { java.util.List propList = new java.util.LinkedList(); for(java.util.Iterator i = getMatchedRulesets(e); i.hasNext();) { org.xhtmlrenderer.css.sheet.Ruleset rs = (org.xhtmlrenderer.css.sheet.Ruleset) i.next(); for(java.util.Iterator j = rs.getPropertyDeclarations(); j.hasNext();) { propList.add((org.xhtmlrenderer.css.sheet.PropertyDeclaration) j.next()); } } if(elementStyling != null) { for(java.util.Iterator j = elementStyling.getPropertyDeclarations(); j.hasNext();) { propList.add((org.xhtmlrenderer.css.sheet.PropertyDeclaration) j.next()); } } cs = new CascadedStyle(propList.iterator() );  if(elementStyling == null) { _csCache.put(fingerprint, cs); } } _csMap.put(e, cs);
cs = createCascadedStyle(e);
    public CascadedStyle getCascadedStyle(org.w3c.dom.Element e) {        if(_csMap == null) _csMap = new java.util.HashMap();        CascadedStyle cs = (CascadedStyle)_csMap.get(e);        if(cs != null) return cs;                org.xhtmlrenderer.css.sheet.Ruleset elementStyling = getElementStyle(e);        String fingerprint = null;        if(elementStyling == null) {//try to re-use a CascadedStyle            StringBuffer sb = new StringBuffer();            for(java.util.Iterator i = getMatchedRulesets(e); i.hasNext();) {                sb.append(i.next().hashCode());                sb.append(":");            }            fingerprint = sb.toString();            if(_csCache == null) _csCache = new java.util.HashMap();            cs = (CascadedStyle) _csCache.get(fingerprint);        }                if(cs == null) {            java.util.List propList = new java.util.LinkedList();            for(java.util.Iterator i = getMatchedRulesets(e); i.hasNext();) {                org.xhtmlrenderer.css.sheet.Ruleset rs = (org.xhtmlrenderer.css.sheet.Ruleset) i.next();                for(java.util.Iterator j = rs.getPropertyDeclarations(); j.hasNext();) {                    propList.add((org.xhtmlrenderer.css.sheet.PropertyDeclaration) j.next());                }            }            if(elementStyling != null) {                for(java.util.Iterator j = elementStyling.getPropertyDeclarations(); j.hasNext();) {                    propList.add((org.xhtmlrenderer.css.sheet.PropertyDeclaration) j.next());                }            }            cs = new CascadedStyle(propList.iterator() );                    if(elementStyling == null) {                _csCache.put(fingerprint, cs);            }        }        _csMap.put(e, cs);                return cs;}