@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.closed == null) ? 0 : this.closed.hashCode()); result = prime * result + this.tagsWithoutName.hashCode(); result = prime * result + this.zoomLevel; return result; } }
private void extractValues(String elementName, XmlPullParser pullParser) throws XmlPullParserException { for (int i = 0; i < pullParser.getAttributeCount(); ++i) { String name = pullParser.getAttributeName(i); String value = pullParser.getAttributeValue(i); if (E.equals(name)) { this.element = Element.fromString(value); } else if (K.equals(name)) { this.keys = value; } else if (V.equals(name)) { this.values = value; } else if (CAT.equals(name)) { this.cat = value; } else if (CLOSED.equals(name)) { this.closed = Closed.fromString(value); } else if (ZOOM_MIN.equals(name)) { this.zoomMin = XmlUtils.parseNonNegativeByte(name, value); } else if (ZOOM_MAX.equals(name)) { this.zoomMax = XmlUtils.parseNonNegativeByte(name, value); } else { throw XmlUtils.createXmlPullParserException(elementName, name, value, i); } } validate(elementName); this.keyList = new ArrayList<String>(Arrays.asList(SPLIT_PATTERN.split(this.keys))); this.valueList = new ArrayList<String>(Arrays.asList(SPLIT_PATTERN.split(this.values))); this.elementMatcher = getElementMatcher(this.element); this.closedMatcher = getClosedMatcher(this.closed); this.elementMatcher = RuleOptimizer.optimize(this.elementMatcher, this.ruleStack); this.closedMatcher = RuleOptimizer.optimize(this.closedMatcher, this.ruleStack); }
private void extractValues(String elementName, XmlPullParser pullParser) throws XmlPullParserException { for (int i = 0; i < pullParser.getAttributeCount(); ++i) { String name = pullParser.getAttributeName(i); String value = pullParser.getAttributeValue(i); if (E.equals(name)) { this.element = Element.fromString(value); } else if (K.equals(name)) { this.keys = value; } else if (V.equals(name)) { this.values = value; } else if (CAT.equals(name)) { this.cat = value; } else if (CLOSED.equals(name)) { this.closed = Closed.fromString(value); } else if (ZOOM_MIN.equals(name)) { this.zoomMin = XmlUtils.parseNonNegativeByte(name, value); } else if (ZOOM_MAX.equals(name)) { this.zoomMax = XmlUtils.parseNonNegativeByte(name, value); } else { throw XmlUtils.createXmlPullParserException(elementName, name, value, i); } } validate(elementName); this.keyList = new ArrayList<String>(Arrays.asList(SPLIT_PATTERN.split(this.keys))); this.valueList = new ArrayList<String>(Arrays.asList(SPLIT_PATTERN.split(this.values))); this.elementMatcher = getElementMatcher(this.element); this.closedMatcher = getClosedMatcher(this.closed); this.elementMatcher = RuleOptimizer.optimize(this.elementMatcher, this.ruleStack); this.closedMatcher = RuleOptimizer.optimize(this.closedMatcher, this.ruleStack); }
@Override public int hashCode() { final int prime = 31; int result = 1; result = prime * result + ((this.closed == null) ? 0 : this.closed.hashCode()); result = prime * result + this.tagsWithoutName.hashCode(); result = prime * result + this.zoomLevel; return result; } }