@Test public void shouldConsiderAsEqualAnyNamespacesWithSameUri() { assertThat(ns1.equals(ns3), is(true)); assertThat(ns3.equals(ns1), is(true)); assertThat(ns2.equals(ns4), is(true)); assertThat(ns4.equals(ns2), is(true)); assertThat(ns5.equals(ns5), is(true)); }
@Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Namespace) { Namespace that = (Namespace)obj; if (!this.namespaceUri.equals(that.getNamespaceUri())) return false; return true; } return false; }
BasicNamespace implements NamespaceRegistry.Namespace { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Namespace) { Namespace that = (Namespace)obj; if (!this.namespaceUri.equals(that.getNamespaceUri())) return false; return true; } return false; } }
BasicNamespace implements NamespaceRegistry.Namespace { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Namespace) { Namespace that = (Namespace)obj; if (!this.namespaceUri.equals(that.getNamespaceUri())) return false; return true; } return false; } BasicNamespace( String prefix,
                           String namespaceUri ); }
BasicNamespace implements NamespaceRegistry.Namespace { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Namespace) { Namespace that = (Namespace)obj; if (!this.namespaceUri.equals(that.getNamespaceUri())) return false; return true; } return false; } BasicNamespace( String prefix,
                           String namespaceUri ); @Override String getNamespaceUri(); @Override String getPrefix(); @Override int hashCode(); @Override int compareTo( Namespace that ); @Override boolean equals( Object obj ); @Override String toString(); }
BasicNamespace implements NamespaceRegistry.Namespace { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Namespace) { Namespace that = (Namespace)obj; if (!this.namespaceUri.equals(that.getNamespaceUri())) return false; return true; } return false; } BasicNamespace( String prefix,
                           String namespaceUri ); @Override String getNamespaceUri(); @Override String getPrefix(); @Override int hashCode(); @Override int compareTo( Namespace that ); @Override boolean equals( Object obj ); @Override String toString();  }