@Override public String toString() { StringBuilder b = new StringBuilder(); if (combinator != null) b.append(combinator.value()); if (selector instanceof PseudoElementImpl) { PseudoElementImpl pe = (PseudoElementImpl)selector; b.append(":"); if (!pe.isSpecifiedAsClass()) b.append(":"); b.append(pe.getName()); String[] args = pe.getArguments(); if (args.length > 0) { b.append("("); for (int i = 0; i < args.length; i++) { if (i > 0) b.append(", "); b.append(args[i]); } b.append(")"); } } else b.append(selector); return b.toString(); } }
private static String serializeRuleSet(RuleRelativeBlock rule) { StringBuilder b = new StringBuilder(); boolean first = true; for (Selector s : rule.getSelector()) { Combinator c = s.getCombinator(); if (first) { if (c == null) b.append("&"); else if (c != Combinator.CHILD) b.append(c.value()); first = false; } else if (c != null) // should always be true b.append(c.value()); b = OutputUtil.appendList(b, s, OutputUtil.EMPTY_DELIM); } b.append(" { "); b.append(serializeDeclarations(rule)); b.append(" }"); return b.toString(); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof SelectorImpl)) return false; SelectorImpl other = (SelectorImpl) obj; if (combinator == null) { if (other.combinator != null) return false; } else if (!combinator.equals(other.combinator)) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof SelectorImpl)) return false; SelectorImpl other = (SelectorImpl) obj; if (combinator == null) { if (other.combinator != null) return false; } else if (!combinator.equals(other.combinator)) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof SelectorImpl)) return false; SelectorImpl other = (SelectorImpl) obj; if (combinator == null) { if (other.combinator != null) return false; } else if (!combinator.equals(other.combinator)) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof SelectorImpl)) return false; SelectorImpl other = (SelectorImpl) obj; if (combinator == null) { if (other.combinator != null) return false; } else if (!combinator.equals(other.combinator)) return false; return true; }
@Override public String toString() { StringBuilder sb = new StringBuilder(); if(combinator!=null) sb.append(combinator.value()); sb = OutputUtil.appendList(sb, list, OutputUtil.EMPTY_DELIM); return sb.toString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder(); if(combinator!=null) sb.append(combinator.value()); sb = OutputUtil.appendList(sb, list, OutputUtil.EMPTY_DELIM); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((combinator == null) ? 0 : combinator.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((combinator == null) ? 0 : combinator.hashCode()); return result; }
@Override public String toString() { StringBuilder sb = new StringBuilder(); if(combinator!=null) sb.append(combinator.value()); sb = OutputUtil.appendList(sb, list, OutputUtil.EMPTY_DELIM); return sb.toString(); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((combinator == null) ? 0 : combinator.hashCode()); return result; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((combinator == null) ? 0 : combinator.hashCode()); return result; }
@Override public String toString() { StringBuilder sb = new StringBuilder(); if(combinator!=null) sb.append(combinator.value()); sb = OutputUtil.appendList(sb, list, OutputUtil.EMPTY_DELIM); return sb.toString(); }