1 61 62 package org.jaxen; 63 64 69 class QualifiedName 70 { 71 private String namespaceURI; 72 private String localName; 73 74 81 QualifiedName( String namespaceURI, String localName ) 82 { 83 this.namespaceURI = namespaceURI; 84 this.localName = localName; 85 } 86 87 public int hashCode() 88 { 89 return ( localName.hashCode() ^ 90 ( namespaceURI == null ? 0 : namespaceURI.hashCode() ) ); 91 } 92 93 public boolean equals( Object o ) 94 { 95 QualifiedName other = (QualifiedName) o; 100 101 if ( namespaceURI == null ) { 102 return ( other.namespaceURI == null && 103 other.localName.equals(localName) ); 104 } 105 else { 106 return ( namespaceURI.equals(other.namespaceURI) && 107 other.localName.equals(localName) ); 108 } 109 } 110 111 } 112 113 | Popular Tags |