Android Open Source - AndroidBleLib Stored Bluetooth Device

From Project

Back to project page AndroidBleLib.


The source code is released under:

MIT License

If you think the Android project AndroidBleLib listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

/*from   w w  w .ja va2s.  c o  m*/
import android.bluetooth.BluetoothDevice;

import java.util.Comparator;

 * Created by ejf3 on 5/16/14.
 * BluetoothDevice is final, so couldn't simply extend it
public class StoredBluetoothDevice implements Comparator<StoredBluetoothDevice> {
    private final BluetoothDevice device;

    public StoredBluetoothDevice(BluetoothDevice device) {
        this.device = device;

    public int compare(StoredBluetoothDevice x, StoredBluetoothDevice y) {
        return x.getAddress().compareTo(y.getAddress());

    public BluetoothDevice getDevice() {
        return device;

    public String getAddress() {
        return device.getAddress();

    public String getName() {
        return device.getName();

Java Source Code List