question: boolean contains ( BinarySearchTreeNode < E > node ) { if ( node == null ) return false ; if ( this . root == null ) return false ; if ( node == this . root ) return true ; BinarySearchTreeNode < E > curr = this . root ; while ( curr != null ) { if ( curr == node ) return true ; int diff = node . compareTo ( curr ) ; if ( diff == 0 ) { return curr == node ; } else if ( diff < 0 ) { curr = curr . left ; } else { curr = curr . right ; } } return false ; }
target:  Returns true if the given node (not the node's comparable) is contained in this tree. <p> This method performs a reference equals comparison on the nodes rather than a comparison on the node's comparable.