code: public void swap(AbstractLinkedList<E, T> other) {
          int sizeTmp = this.size;
          T headTmp = this.head;
          T lastTmp = this.last;
          this.size = other.size;
          this.head = other.head;
          this.last = other.last;
          other.size = sizeTmp;
          other.head = headTmp;
          other.last = lastTmp;
      }
docs: Swaps the contents of two linked lists with the same entry types. This method runs in constant time.
  
  @param other
  the other list to swap contents with.