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-02-27 11:41:37 发布