code: public List<T> pollN(int n) {
      if (n >= size) {
        // if we need to remove all elements then do fast polling
        return pollAll();
      }
      List<T> retList = new ArrayList<T>(n);
      pollNToList(n, retList);
      return retList;
    }
docs: Remove and return first n elements on the linked list of all elements.
  
  @return list of elements