@Test public void equalsTest() { assertTrue("Equals same", GLOBAL.equals(DOMRpcIdentifier.create(LOCAL_QNAME))); assertTrue("Equals same instance", GLOBAL.equals(GLOBAL)); assertFalse("Different object", GLOBAL.equals(new Object())); assertFalse("Different instance", GLOBAL.equals(LOCAL)); }
@Override public final boolean equals(final @Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DOMRpcIdentifier)) { return false; } DOMRpcIdentifier other = (DOMRpcIdentifier) obj; if (!type.equals(other.type)) { return false; } return Objects.equals(getContextReference(), other.getContextReference()); }
DOMRpcIdentifier { @Override public final boolean equals(final @Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DOMRpcIdentifier)) { return false; } DOMRpcIdentifier other = (DOMRpcIdentifier) obj; if (!type.equals(other.type)) { return false; } return Objects.equals(getContextReference(), other.getContextReference()); } }
DOMRpcIdentifier { @Override public final boolean equals(final @Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DOMRpcIdentifier)) { return false; } DOMRpcIdentifier other = (DOMRpcIdentifier) obj; if (!type.equals(other.type)) { return false; } return Objects.equals(getContextReference(), other.getContextReference()); } private  DOMRpcIdentifier(final QName type); }
DOMRpcIdentifier { @Override public final boolean equals(final @Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DOMRpcIdentifier)) { return false; } DOMRpcIdentifier other = (DOMRpcIdentifier) obj; if (!type.equals(other.type)) { return false; } return Objects.equals(getContextReference(), other.getContextReference()); } private  DOMRpcIdentifier(final QName type); static DOMRpcIdentifier create(final QName type); static DOMRpcIdentifier create(final QName type, final @Nullable YangInstanceIdentifier contextReference); final QName getType(); abstract YangInstanceIdentifier getContextReference(); @Override final int hashCode(); @Override final boolean equals(final @Nullable Object obj); @Override final String toString(); }
DOMRpcIdentifier { @Override public final boolean equals(final @Nullable Object obj) { if (this == obj) { return true; } if (!(obj instanceof DOMRpcIdentifier)) { return false; } DOMRpcIdentifier other = (DOMRpcIdentifier) obj; if (!type.equals(other.type)) { return false; } return Objects.equals(getContextReference(), other.getContextReference()); } private  DOMRpcIdentifier(final QName type); static DOMRpcIdentifier create(final QName type); static DOMRpcIdentifier create(final QName type, final @Nullable YangInstanceIdentifier contextReference); final QName getType(); abstract YangInstanceIdentifier getContextReference(); @Override final int hashCode(); @Override final boolean equals(final @Nullable Object obj); @Override final String toString();  }