Best way to get Ids from Id or list of Id

I have Id<Uses, UUID> but I am needed Ids<User, UUID>.

As usual I do

var ids = new Ids<User, UUID>()
ids.add(userId) // userId -> Id<Uses, UUID>

May someone know better way

To get a list of UUD, you may use this lamda approach:

List<UUID> list = vendorInvoiceGrLineDc.getItems().stream()
                .map(coa -> coa.getMaterialReceiptVendor().getId())
                .collect(Collectors.toList());