code: public boolean removeLastOccurrence(Object o) {
          if (o == null) {
              for (Node<E> x = last; x != null; x = x.prev) {
                  if (x.item == null) {
                      unlink(x);
                      return true;
                  }
              }
          } else {
              for (Node<E> x = last; x != null; x = x.prev) {
                  if (o.equals(x.item)) {
                      unlink(x);
                      return true;
                  }
              }
          }
          return false;
      }
docs: Removes the last occurrence of the specified element in this
  list (when traversing the list from head to tail).  If the list
  does not contain the element, it is unchanged.
  
  @param o element to be removed from this list, if present
  @return {@code true} if the list contained the specified element
  @since 1.6