@Test public void shouldSupportNullInEquals() { assertThat(name.equals(null), is(false)); }
@Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Name) { Name that = (Name)obj; if (!this.getLocalName().equals(that.getLocalName())) return false; if (!this.getNamespaceUri().equals(that.getNamespaceUri())) return false; return true; } return false; }
BasicName implements Name { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Name) { Name that = (Name)obj; if (!this.getLocalName().equals(that.getLocalName())) return false; if (!this.getNamespaceUri().equals(that.getNamespaceUri())) return false; return true; } return false; } }
BasicName implements Name { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Name) { Name that = (Name)obj; if (!this.getLocalName().equals(that.getLocalName())) return false; if (!this.getNamespaceUri().equals(that.getNamespaceUri())) return false; return true; } return false; } BasicName( String namespaceUri,
                      String localName ); }
BasicName implements Name { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Name) { Name that = (Name)obj; if (!this.getLocalName().equals(that.getLocalName())) return false; if (!this.getNamespaceUri().equals(that.getNamespaceUri())) return false; return true; } return false; } BasicName( String namespaceUri,
                      String localName ); @Override String getLocalName(); @Override String getNamespaceUri(); @Override String getString(); @Override String getString( TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder,
                             TextEncoder delimiterEncoder ); @Override int compareTo( Name that ); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString(); }
BasicName implements Name { @Override public boolean equals( Object obj ) { if (obj == this) return true; if (obj instanceof Name) { Name that = (Name)obj; if (!this.getLocalName().equals(that.getLocalName())) return false; if (!this.getNamespaceUri().equals(that.getNamespaceUri())) return false; return true; } return false; } BasicName( String namespaceUri,
                      String localName ); @Override String getLocalName(); @Override String getNamespaceUri(); @Override String getString(); @Override String getString( TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder ); @Override String getString( NamespaceRegistry namespaceRegistry,
                             TextEncoder encoder,
                             TextEncoder delimiterEncoder ); @Override int compareTo( Name that ); @Override int hashCode(); @Override boolean equals( Object obj ); @Override String toString();  }