Set<BluetoothDevice> bondDevices = mBluetoothAdapter.getBondedDevices(); List<BluetoothDevice> data = new ArrayList<>(bondDevices); List<BluetoothEntity> collect = data.stream().map(BluetoothEntity::new) .sorted(Comparator.comparing(BluetoothEntity::isConnected)) .collect(Collectors.toList());
lambda转换+排序
最新推荐文章于 2024-06-15 11:05:57 发布