class OperationPool {

  public SSZList<T> getItemsForBlock(BeaconState stateAtBlockSlot) {
    SSZMutableList<T> itemsToPutInBlock =
        SSZList.createMutable(clazz, MAX_NUMBER_OF_ELEMENTS_IN_BLOCK.get(clazz));
    // Note that iterating through all items does not affect their access time so we are effectively
    // evicting the oldest entries when the size is exceeded as we only ever access via iteration.
    Iterator<T> iter = operations.iterator();
    int count = 0;
    int numberOfElementsToGet = MAX_NUMBER_OF_ELEMENTS_IN_BLOCK.get(clazz);
    while (count < numberOfElementsToGet && iter.hasNext()) {
      T item = iter.next();
      if (operationValidator.validate(stateAtBlockSlot, item).isEmpty()) {
        itemsToPutInBlock.add(item);
        count++;
      }
    }
    return itemsToPutInBlock;
  }

  public  OperationPool(Class<T> clazz, OperationStateTransitionValidator<T> operationValidator);

}