public NodeData push(Declaration d) { Map<String,CSSProperty> properties = new HashMap<String,CSSProperty>(COMMON_DECLARATION_SIZE); Map<String,Term<?>> terms = new HashMap<String, Term<?>>(COMMON_DECLARATION_SIZE); boolean result = transformer.parseDeclaration(d, properties, terms); // in case of false do not insert anything if(!result) return this; for(String key: properties.keySet()) { Quadruple q = map.get(key); if(q==null) q = new Quadruple(); q.curProp = properties.get(key); q.curValue = terms.get(key); // remove operator if(q.curValue!=null) q.curValue = q.curValue.setOperator(null); map.put(key, q); } return this; }
@Override public Object clone() { SingleMapNodeData clone; { try { clone = (SingleMapNodeData)super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError("coding error"); } } clone.map = new HashMap<String,Quadruple>(css.getTotalProperties(), 1.0f); for (String key : map.keySet()) clone.map.put(key, (Quadruple)map.get(key).clone()); return clone; }
public NodeData push(Declaration d) { Map<String,CSSProperty> properties = new HashMap<String,CSSProperty>(COMMON_DECLARATION_SIZE); Map<String,Term<?>> terms = new HashMap<String, Term<?>>(COMMON_DECLARATION_SIZE); boolean result = transformer.parseDeclaration(d, properties, terms); // in case of false do not insert anything if(!result) return this; for(String key: properties.keySet()) { Quadruple q = map.get(key); if(q==null) q = new Quadruple(); q.curProp = properties.get(key); q.curValue = terms.get(key); q.curSource = d; // remove operator if((q.curValue!=null) && (q.curValue.getOperator() != null)) { q.curValue = q.curValue.shallowClone().setOperator(null); } map.put(key, q); } return this; }
public NodeData push(Declaration d) { Map<String,CSSProperty> properties = new HashMap<String,CSSProperty>(COMMON_DECLARATION_SIZE); Map<String,Term<?>> terms = new HashMap<String, Term<?>>(COMMON_DECLARATION_SIZE); boolean result = transformer.parseDeclaration(d, properties, terms); // in case of false do not insert anything if(!result) return this; for(Entry<String, CSSProperty> entry : properties.entrySet()) { final String key = entry.getKey(); Quadruple q = map.get(key); if(q==null) q = new Quadruple(); q.curProp = entry.getValue(); q.curValue = terms.get(key); q.curSource = d; // remove operator if((q.curValue!=null) && (q.curValue.getOperator() != null)) { q.curValue = q.curValue.shallowClone().setOperator(null); } map.put(key, q); } return this; }
public NodeData push(Declaration d) { Map<String,CSSProperty> properties = new HashMap<String,CSSProperty>(COMMON_DECLARATION_SIZE); Map<String,Term<?>> terms = new HashMap<String, Term<?>>(COMMON_DECLARATION_SIZE); boolean result = transformer.parseDeclaration(d, properties, terms); // in case of false do not insert anything if(!result) return this; for(Entry<String, CSSProperty> entry : properties.entrySet()) { final String key = entry.getKey(); Quadruple q = map.get(key); if(q==null) q = new Quadruple(); q.curProp = entry.getValue(); q.curValue = terms.get(key); q.curSource = d; // remove operator if((q.curValue!=null) && (q.curValue.getOperator() != null)) { q.curValue = q.curValue.shallowClone().setOperator(null); } map.put(key, q); } return this; }