Android Open Source - lamp Bluetooth Device Comparator






From Project

Back to project page lamp.

License

The source code is released under:

GNU General Public License

If you think the Android project lamp 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

package cz.tomsuch.lampicka.util;
// ww  w  .j  a  va2  s  . c  o  m
import java.util.Comparator;

import android.bluetooth.BluetoothDevice;

/**
 * Comparator specially for BluetoothDevice instances
 * */
public class BluetoothDeviceComparator implements Comparator<BluetoothDevice> {

  @Override
  public int compare(BluetoothDevice lhs, BluetoothDevice rhs) {
    String l = lhs.getName() == null ? "" : lhs.getName();
    String r = rhs.getName() == null ? "" : rhs.getName();
    return l.compareTo(r);
  }

}




Java Source Code List

cz.tomsuch.lampicka.AppController.java
cz.tomsuch.lampicka.abstracts.CustomSeekBar.java
cz.tomsuch.lampicka.activities.LampActivity.java
cz.tomsuch.lampicka.activities.LampsActivity.java
cz.tomsuch.lampicka.adapters.BluetoothDevicesAdapter.java
cz.tomsuch.lampicka.enums.BluetoothLampBacklightMode.java
cz.tomsuch.lampicka.enums.BluetoothLampColorSetMode.java
cz.tomsuch.lampicka.enums.BluetoothLampCommand.java
cz.tomsuch.lampicka.enums.BluetoothLampEffect.java
cz.tomsuch.lampicka.impl.DefaultBluetoothLamp.java
cz.tomsuch.lampicka.interfaces.BluetoothInputLineListener.java
cz.tomsuch.lampicka.interfaces.BluetoothLampCommandListener.java
cz.tomsuch.lampicka.interfaces.BluetoothLamp.java
cz.tomsuch.lampicka.interfaces.OnColorChangedListener.java
cz.tomsuch.lampicka.interfaces.PalleteDialogColorListener.java
cz.tomsuch.lampicka.pallete.ColorChooserDialog.java
cz.tomsuch.lampicka.pallete.PalleteDialog.java
cz.tomsuch.lampicka.util.BluetoothDeviceComparator.java
cz.tomsuch.lampicka.util.BluetoothDeviceWrapper.java
cz.tomsuch.lampicka.util.BluetoothSocketListener.java
cz.tomsuch.lampicka.util.ColorPickerView.java
cz.tomsuch.lampicka.util.FixedBluetoothSocket.java
cz.tomsuch.lampicka.util.HorizontalSeekBar.java
cz.tomsuch.lampicka.util.Preferences.java
cz.tomsuch.lampicka.util.VerticalSeekBar.java