@ Override public boolean contains ( long value , T element ) { if ( root == null ) return false ; if ( value < first . value ) return false ; if ( value > last . value ) return false ; if ( value == first . value && ObjectUtil . equalsOrNull ( element , first . element ) ) return true ; if ( value == last . value && ObjectUtil . equalsOrNull ( element , last . element ) ) return true ; return contains ( root , value , element ) ; }
Returns true if the given key exists in the tree and its associated value is the given element . Comparison of the element is using the equals method .