2 * Copyright (c) 2013 Cisco Systems, Inc. and others. All rights reserved.
4 * This program and the accompanying materials are made available under the
5 * terms of the Eclipse Public License v1.0 which accompanies this distribution,
6 * and is available at http://www.eclipse.org/legal/epl-v10.html
8 package org.opendaylight.controller.model.util;
10 import org.opendaylight.controller.yang.model.api.RevisionAwareXPath;
12 public class RevisionAwareXPathImpl implements RevisionAwareXPath {
14 private final String xpath;
15 private final boolean absolute;
17 public RevisionAwareXPathImpl(String xpath, boolean absolute) {
19 this.absolute = absolute;
23 public boolean isAbsolute() {
28 public String toString() {
33 public int hashCode() {
36 result = prime * result + ((xpath == null) ? 0 : xpath.hashCode());
37 result = prime * result + (absolute ? 1231 : 1237);
42 public boolean equals(Object obj) {
49 if (getClass() != obj.getClass()) {
52 RevisionAwareXPathImpl other = (RevisionAwareXPathImpl) obj;
54 if (other.xpath != null) {
57 } else if (!xpath.equals(other.xpath)) {
60 if (absolute != other.absolute) {