BinaryNode function ( Comparable arg0 , BinaryNode arg1 ) { if ( arg1 == null ) arg1 = new BinaryNode ( arg0 ) ; else if ( arg0 . compareTo ( arg1 . element ) < 0 ) arg1 . left = insert ( arg0 , arg1 . left ) ; else if ( arg0 . compareTo ( arg1 . element ) > 0 ) arg1 . right = insert ( arg0 , arg1 . right ) ; else throw new DuplicateItemException ( arg0 . toString ( ) ) ; return arg1 ; }
internal method to insert into a subtree . concode_field_sep BinaryNode left concode_elem_sep BinaryNode root concode_elem_sep BinaryNode right concode_elem_sep Comparable element concode_field_sep void removeMin concode_elem_sep BinaryNode removeMin concode_elem_sep Comparable find concode_elem_sep BinaryNode find concode_elem_sep void makeEmpty concode_elem_sep boolean isEmpty concode_elem_sep Comparable elementAt concode_elem_sep void main concode_elem_sep Comparable findMin concode_elem_sep BinaryNode findMin concode_elem_sep void remove concode_elem_sep BinaryNode remove concode_elem_sep Comparable findMax concode_elem_sep BinaryNode findMax