code: public boolean replace(IPlayItem oldItem, IPlayItem newItem) {
          boolean[] result = { false };
          int[] index = { 0 };
          items.forEach(itemEntry -> {
              // locate a match
              if (oldItem.equals(itemEntry.item)) {
                  // remove the entry
                  items.remove(itemEntry);
                  // do the insertion at index
                  items.add(index[0], new PlayItemEntry(newItem));
                  // update the flag
                  result[0] = true;
                  // exit early
                  return;
              }
              index[0]++;
          });
          log.debug("Replacement results: {} at {}", result[0], index[0]);
          return result[0];
      }
docs: {@inheritDoc}