public boolean equals(Object object){
  if (this == object) {
    return true;
  }
 else   if (object instanceof Namespace) {
    Namespace that=(Namespace)object;
    if (hashCode() == that.hashCode()) {
      return uri.equals(that.getURI()) && prefix.equals(that.getPrefix());
    }
  }
  return false;
}

public boolean equals ( Object object ) { if ( this == object ) { return true ; } else if ( object instanceof Namespace ) { Namespace that = ( Namespace ) object ; if ( hashCode ( ) == that . hashCode ( ) ) { return uri . equals ( that . getURI ( ) ) && prefix . equals ( that . getPrefix ( ) ) ; } } return false ; }
checks whether this namespace equals the given namespace . two namespaces are equals if their uri and prefix are equal .
