code: public synchronized Collection<T> getAll() {
      List<T> all = new ArrayList<T>(size);
      for (T e = head; e != null; e = e.getNext()) {
        all.add(e);
      }
      return all;
    }
docs: Returns all the elements from this list.
  
  @return all the elements from this list.