@Override public boolean add(Rule<?> element) { if (element instanceof Declaration || element instanceof RuleMargin) return super.add(element); else throw new IllegalArgumentException("Element must be either a Declaration or a RuleMargin"); }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof RuleImportImpl)) return false; RuleImportImpl other = (RuleImportImpl) obj; if (uri == null) { if (other.uri != null) return false; } else if (!uri.equals(other.uri)) return false; return true; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((selectors == null) ? 0 : selectors.hashCode()); return result; }
@Override public void setStyleSheet(StyleSheet stylesheet) { super.setStyleSheet(stylesheet); //assign the style sheet recursively to the contained rule sets for (RuleSet set : list) set.setStyleSheet(stylesheet); }
@Override @SuppressWarnings("unchecked") public Object clone() { AbstractRuleBlock<T> clone; { try { clone = (AbstractRuleBlock<T>)super.clone(); } catch (CloneNotSupportedException e) { throw new InternalError("coding error"); } } clone.list = cloneList(list); return clone; }
public int compareTo(RuleBlock<?> o) throws ClassCastException { return this.getPriority().compareTo(o.getPriority()); }
@Override public void setStyleSheet(StyleSheet stylesheet) { super.setStyleSheet(stylesheet); //assign the style sheet recursively to the contained rule sets for (RuleSet set : list) set.setStyleSheet(stylesheet); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((uri == null) ? 0 : uri.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof RuleSetImpl)) return false; RuleSetImpl other = (RuleSetImpl) obj; if (selectors == null) { if (other.selectors != null) return false; } else if (!selectors.equals(other.selectors)) return false; return true; }
@Override public boolean add(Rule<?> element) { if (element instanceof Declaration || element instanceof RuleMargin) return super.add(element); else throw new IllegalArgumentException("Element must be either a Declaration or a RuleMargin"); }
@Override public void setStyleSheet(StyleSheet stylesheet) { super.setStyleSheet(stylesheet); //assign the style sheet recursively to the contained rule sets for (RuleSet set : list) set.setStyleSheet(stylesheet); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((pseudo == null) ? 0 : pseudo.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof RuleImportImpl)) return false; RuleImportImpl other = (RuleImportImpl) obj; if (uri == null) { if (other.uri != null) return false; } else if (!uri.equals(other.uri)) return false; return true; }
@Override public boolean add(Rule<?> element) { if (element instanceof Declaration || element instanceof RuleMargin) return super.add(element); else throw new IllegalArgumentException("Element must be either a Declaration or a RuleMargin"); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((pseudo == null) ? 0 : pseudo.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof RulePageImpl)) return false; RulePageImpl other = (RulePageImpl) obj; if (pseudo == null) { if (other.pseudo != null) return false; } else if (!pseudo.equals(other.pseudo)) return false; return true; }
@Override public boolean add(Rule<?> element) { if (element instanceof Declaration || element instanceof RuleMargin) return super.add(element); else throw new IllegalArgumentException("Element must be either a Declaration or a RuleMargin"); }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((uri == null) ? 0 : uri.hashCode()); return result; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (!super.equals(obj)) return false; if (!(obj instanceof RuleMediaImpl)) return false; RuleMediaImpl other = (RuleMediaImpl) obj; if (media == null) { if (other.media != null) return false; } else if (!media.equals(other.media)) return false; return true; }
@Override public int hashCode() { final int prime = 31; int result = super.hashCode(); result = prime * result + ((media == null) ? 0 : media.hashCode()); return result; }