package ru.spbau.bluecharm;

import android.bluetooth.BluetoothDevice;


public class BluetoothDeviceWrapper {
	private String mName;
	private String mAddress;
	
	public BluetoothDeviceWrapper(BluetoothDevice device) {
		mName = device.getName();
		mAddress = device.getAddress();
	}
	
	public BluetoothDeviceWrapper(String string) {
		String[] contents = string.split("\n");
		mName = contents[0];
		mAddress = contents[1];
	}	

	public String getName() {
		return mName;
	}
	
	public String getAddress() {
		return mAddress;
	}
	
	public String toString() {
		return mName + "\n" + mAddress;    		
	}	
}
@@ -385,16 +385,142 @@
 %22%5Cn%22);%0D%0A
+%09%09if (contents.length != 2) %7B%0D%0A%09%09%09throw new IllegalArgumentException(%22Can not split %22 + string + %22to name and adress%22);%0D%0A%09%09%7D%0D%0A
 %09%09mName 

add argument check