|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectdlife.sys.SerializationBase
dlife.gui.connectiondialog.BluetoothNameMap
public class BluetoothNameMap
This class maintains a mapping from bluetooth address to a user defined name for the device. The mapping is unserialized from the file specified file upon construction and is serialized each time it is changed. If the file doesn't exist then the map will initially be empty.
| Constructor Summary | |
|---|---|
BluetoothNameMap(String filename)
Construct a new BluetoothNameMap containing all of the mappings in the specified file. |
|
| Method Summary | |
|---|---|
void |
addName(String btAddr,
String name)
Add a new bluetooth address to name mapping. |
String |
getInfoLine(String btAddr)
Get a string containing both the user defined name and the bluetooth address of the device. |
ArrayList<String> |
getInfoLineList()
Get a list of the Strings returned by getInfoLine for all of the devices in this BluetoothNameMap. |
String |
getName(String btAddr)
Get the user assigned name associated with the provided bluetooth address. |
int |
size()
Get the number of names that appear in this map. |
| Methods inherited from class dlife.sys.SerializationBase |
|---|
read, write |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public BluetoothNameMap(String filename)
filename - the name of the serialization file for this map.| Method Detail |
|---|
public int size()
public String getName(String btAddr)
btAddr - the bluetooth address.
public void addName(String btAddr,
String name)
btAddr - the bluetooth address of the device.name - the user defined name for the device.public String getInfoLine(String btAddr)
btAddr - the bluetooth address of the device.
public ArrayList<String> getInfoLineList()
|
dLife Home Page | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||