code: @Override
      @SuppressWarnings("unchecked")
      public List<T> toList(){
          T[] elementsArray = (T[]) queue.toArray();
          return List.ofAll(Arrays.asList(elementsArray));
      }
docs: {@inheritDoc}