@Test public void testEquals() { PeerProperties pp1 = new PeerProperties(TEST_MAC); PeerProperties pp2 = new PeerProperties(TEST_MAC); assertThat(pp1.equals(pp2), is(true)); PeerProperties pp3 = new PeerProperties("1:2:3"); assertThat(pp2.equals(pp3), is(false)); }
@Override public boolean equals(Object otherPeerProperties) { PeerProperties other = (PeerProperties) otherPeerProperties; boolean isMatch = false; if (other != null && other.getBluetoothMacAddress() != null && mBluetoothMacAddress != null) { isMatch = other.getBluetoothMacAddress().equals(mBluetoothMacAddress); } return isMatch; }
PeerProperties { @Override public boolean equals(Object otherPeerProperties) { PeerProperties other = (PeerProperties) otherPeerProperties; boolean isMatch = false; if (other != null && other.getBluetoothMacAddress() != null && mBluetoothMacAddress != null) { isMatch = other.getBluetoothMacAddress().equals(mBluetoothMacAddress); } return isMatch; } }
PeerProperties { @Override public boolean equals(Object otherPeerProperties) { PeerProperties other = (PeerProperties) otherPeerProperties; boolean isMatch = false; if (other != null && other.getBluetoothMacAddress() != null && mBluetoothMacAddress != null) { isMatch = other.getBluetoothMacAddress().equals(mBluetoothMacAddress); } return isMatch; } PeerProperties(String bluetoothMacAddress);  PeerProperties(String serviceType, String deviceName, String deviceAddress);  PeerProperties(String bluetoothMacAddress, int extraInformation); }
PeerProperties { @Override public boolean equals(Object otherPeerProperties) { PeerProperties other = (PeerProperties) otherPeerProperties; boolean isMatch = false; if (other != null && other.getBluetoothMacAddress() != null && mBluetoothMacAddress != null) { isMatch = other.getBluetoothMacAddress().equals(mBluetoothMacAddress); } return isMatch; } PeerProperties(String bluetoothMacAddress);  PeerProperties(String serviceType, String deviceName, String deviceAddress);  PeerProperties(String bluetoothMacAddress, int extraInformation); String getId(); String getBluetoothMacAddress(); String getDeviceName(); String getDeviceAddress(); int getExtraInformation(); void copyFrom(PeerProperties sourcePeerProperties); boolean isValid(); boolean hasMoreInformation(PeerProperties otherPeerProperties); static boolean copyMissingValuesFromOldPeer(
            PeerProperties oldPeerProperties, PeerProperties newPeerProperties); @Override boolean equals(Object otherPeerProperties); @Override String toString(); }
PeerProperties { @Override public boolean equals(Object otherPeerProperties) { PeerProperties other = (PeerProperties) otherPeerProperties; boolean isMatch = false; if (other != null && other.getBluetoothMacAddress() != null && mBluetoothMacAddress != null) { isMatch = other.getBluetoothMacAddress().equals(mBluetoothMacAddress); } return isMatch; } PeerProperties(String bluetoothMacAddress);  PeerProperties(String serviceType, String deviceName, String deviceAddress);  PeerProperties(String bluetoothMacAddress, int extraInformation); String getId(); String getBluetoothMacAddress(); String getDeviceName(); String getDeviceAddress(); int getExtraInformation(); void copyFrom(PeerProperties sourcePeerProperties); boolean isValid(); boolean hasMoreInformation(PeerProperties otherPeerProperties); static boolean copyMissingValuesFromOldPeer(
            PeerProperties oldPeerProperties, PeerProperties newPeerProperties); @Override boolean equals(Object otherPeerProperties); @Override String toString(); static final String BLUETOOTH_MAC_ADDRESS_UNKNOWN; static final int NO_EXTRA_INFORMATION; }