Package io.heraldprox.herald.sensor.ble
Class BLEDeviceLastUpdatedComparator
- java.lang.Object
-
- io.heraldprox.herald.sensor.ble.BLEDeviceLastUpdatedComparator
-
- All Implemented Interfaces:
java.util.Comparator<BLEDevice>
public class BLEDeviceLastUpdatedComparator extends java.lang.Object implements java.util.Comparator<BLEDevice>
Orders a set of BLEDevices such that they are in descending order of BLEDevice.lastUpdatedAt(). This effectively orders them such that the first element is the one most recently connected to, discovered, or to last had it's RSSI updated. Note: Be sure to pre-filter your sorted set by using !device.ignore() to prevent invalid devices from receiving requests if using this for methods like immediateSendAll()
-
-
Constructor Summary
Constructors Constructor Description BLEDeviceLastUpdatedComparator()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
compare(BLEDevice a, BLEDevice b)
-