How to do lamda operations with stream? : As for now I am doing :

    Map<Integer, Item> itemList = getItems(input);
    
                Iterator<Item> ItemIterator = input.getItems().iterator();
    
                List<Item> updatedItems = Lists.newLinkedList();
    
                for (int i = MIN; i <= input.getInputReq().getList().size(); i++) {
                    Item item = itemList.get(i);
                    if (item != null) {
                        item.setFlag(false);
                        item.setId(getId());
                        updatedItems.add(item);
                        itemList.remove(i);
                    } else {
                        if (ItemIterator.hasNext()) {
                            updatedItems.add(ItemIterator.next());
                        }
                    }
                }

Is there any efficient way I could do this with Streams and lambda in java8 ?