src/com/btwiz/library/DeviceMajorComparator.java
@Override
	public boolean match(BluetoothDevice device) {
		int deviceMajor = device.getBluetoothClass().getMajorDeviceClass(); // e.g. AUDIO_VIDEO, COMPUTER..
		String deviceName = device.getName();
		if (this.majorDeviceClass > -1) {
			if (this.majorDeviceClass != deviceMajor) {
				return false;
			}
		}
		if (this.name != null) {
			if (!this.name.equals(deviceName)) {
				return false;
			}						
		}
		return true;
	}
/**
	 * Perform the comparison operation, returning true upon successful match.
	 * If both majorDeviceClass and name were set, success requires BOTH will be matched.  
	 */
Perform the comparison operation, returning true upon successful match.
If both majorDeviceClass and name were set, success requires BOTH will be matched.
Perform the comparison operation returning true upon successful match . If both majorDeviceClass and name were set success requires BOTH will be matched .
@Override
	public boolean match(BluetoothDevice device) {
		int deviceMajor = device.getBluetoothClass().getMajorDeviceClass(); 
		String deviceName = device.getName();
		if (this.majorDeviceClass > -1) {
			if (this.majorDeviceClass != deviceMajor) {
				return false;
			}
		}
		if (this.name != null) {
			if (!this.name.equals(deviceName)) {
				return false;
			}						
		}
		return true;
	}
@ Override public boolean match ( BluetoothDevice device ) { int deviceMajor = device . getBluetoothClass ( ) . getMajorDeviceClass ( ) ; String deviceName = device . getName ( ) ; if ( this . majorDeviceClass > - 1 ) { if ( this . majorDeviceClass != deviceMajor ) { return false ; } } if ( this . name != null ) { if ( ! this . name . equals ( deviceName ) ) { return false ; } } return true ; }
Perform the comparison operation, returning true upon successful match.
Perform the comparison operation returning true upon successful match .
// e.g. AUDIO_VIDEO, COMPUTER..