docs: public Object remove(int index) {
  
          //Check that the index is less than size because the getInternal
          //method is being called with index - 1 and its checks will therefore
          //not be useful in this case.
          if (index >= size()) {
              throw new IndexOutOfBoundsException("Index out of bounds: "
                                                  + index + " >= " + size());
          }
  
          //Get the node that is previous to the node being removed
          Node previousToRemove;
  
          if (index == 0) {
              previousToRemove = first;
          } else {
              previousToRemove = getInternal(index - 1);
          }
  
          //previousToRemove.next will never be null because of the check above
          //that index < size.
          Node toRemove = previousToRemove.next;
  
          previousToRemove.next = toRemove.next;
  
          elementCount--;
  
          //If they removed at the last valid index, then a the last element
          //was removed, therfore update the last pointer
          if (last == toRemove) {
              last = previousToRemove;
          }
  
          return toRemove.data;
      }