@Test public void testEquals() { ZigBeeEndpointAddress address1 = new ZigBeeEndpointAddress("25000/33"); ZigBeeEndpointAddress address2 = new ZigBeeEndpointAddress("25000/33"); assertTrue(address1.equals(address2)); ZigBeeEndpointAddress address3 = new ZigBeeEndpointAddress("25001/33"); assertFalse(address1.equals(address3)); ZigBeeEndpointAddress address4 = new ZigBeeEndpointAddress(25000, 33); assertTrue(address1.equals(address4)); }
@Override public boolean equals(Object obj) { if (obj == null) { return false; } if (!ZigBeeEndpointAddress.class.isAssignableFrom(obj.getClass())) { return false; } final ZigBeeEndpointAddress other = (ZigBeeEndpointAddress) obj; return (other.getAddress() == getAddress() && other.getEndpoint() == getEndpoint()); }
ZigBeeEndpointAddress extends ZigBeeAddress { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (!ZigBeeEndpointAddress.class.isAssignableFrom(obj.getClass())) { return false; } final ZigBeeEndpointAddress other = (ZigBeeEndpointAddress) obj; return (other.getAddress() == getAddress() && other.getEndpoint() == getEndpoint()); } }
ZigBeeEndpointAddress extends ZigBeeAddress { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (!ZigBeeEndpointAddress.class.isAssignableFrom(obj.getClass())) { return false; } final ZigBeeEndpointAddress other = (ZigBeeEndpointAddress) obj; return (other.getAddress() == getAddress() && other.getEndpoint() == getEndpoint()); } ZigBeeEndpointAddress(int address);  ZigBeeEndpointAddress(int address, int endpoint);  ZigBeeEndpointAddress(String address); }
ZigBeeEndpointAddress extends ZigBeeAddress { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (!ZigBeeEndpointAddress.class.isAssignableFrom(obj.getClass())) { return false; } final ZigBeeEndpointAddress other = (ZigBeeEndpointAddress) obj; return (other.getAddress() == getAddress() && other.getEndpoint() == getEndpoint()); } ZigBeeEndpointAddress(int address);  ZigBeeEndpointAddress(int address, int endpoint);  ZigBeeEndpointAddress(String address); @Override int getAddress(); @Override void setAddress(final int address); @Override boolean isGroup(); int getEndpoint(); void setEndpoint(final int endpoint); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(ZigBeeAddress that); @Override String toString(); }
ZigBeeEndpointAddress extends ZigBeeAddress { @Override public boolean equals(Object obj) { if (obj == null) { return false; } if (!ZigBeeEndpointAddress.class.isAssignableFrom(obj.getClass())) { return false; } final ZigBeeEndpointAddress other = (ZigBeeEndpointAddress) obj; return (other.getAddress() == getAddress() && other.getEndpoint() == getEndpoint()); } ZigBeeEndpointAddress(int address);  ZigBeeEndpointAddress(int address, int endpoint);  ZigBeeEndpointAddress(String address); @Override int getAddress(); @Override void setAddress(final int address); @Override boolean isGroup(); int getEndpoint(); void setEndpoint(final int endpoint); @Override int hashCode(); @Override boolean equals(Object obj); @Override int compareTo(ZigBeeAddress that); @Override String toString();  }