@Test public void testIsValid() { PeerProperties pp = new PeerProperties(TEST_MAC); assertThat(pp.isValid(), is(false)); pp = new PeerProperties(TEST_MAC, TEST_EXTRA_INFO); assertThat(pp.isValid(), is(true)); thrown.expect(IllegalArgumentException.class); new PeerProperties(TEST_MAC, PeerProperties.NO_EXTRA_INFORMATION); }
public boolean isValid() { return mExtraInformation != PeerProperties.NO_EXTRA_INFORMATION && mBluetoothMacAddress != null && !mBluetoothMacAddress.isEmpty(); }
PeerProperties { public boolean isValid() { return mExtraInformation != PeerProperties.NO_EXTRA_INFORMATION && mBluetoothMacAddress != null && !mBluetoothMacAddress.isEmpty(); } }
PeerProperties { public boolean isValid() { return mExtraInformation != PeerProperties.NO_EXTRA_INFORMATION && mBluetoothMacAddress != null && !mBluetoothMacAddress.isEmpty(); } PeerProperties(String bluetoothMacAddress);  PeerProperties(String serviceType, String deviceName, String deviceAddress);  PeerProperties(String bluetoothMacAddress, int extraInformation); }
PeerProperties { public boolean isValid() { return mExtraInformation != PeerProperties.NO_EXTRA_INFORMATION && mBluetoothMacAddress != null && !mBluetoothMacAddress.isEmpty(); } 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 { public boolean isValid() { return mExtraInformation != PeerProperties.NO_EXTRA_INFORMATION && mBluetoothMacAddress != null && !mBluetoothMacAddress.isEmpty(); } 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; }