Lines Matching refs:if
26 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
60 * Inserts a node into the tree with the specified key and value if
61 * the tree does not already contain a node with the specified key. If
68 if (this.isEmpty()) {
75 if (this.root_.key == key) {
79 if (key > this.root_.key) {
93 * Removes a node with the specified key from the tree if the tree
94 * contains a node with this key. The removed node is returned. If the
101 if (this.isEmpty()) {
105 if (this.root_.key != key) {
109 if (!this.root_.left) {
125 * Returns the node having the specified key or null if the tree doesn't contain
132 if (this.isEmpty()) {
144 if (this.isEmpty()) {
159 if (this.isEmpty()) {
175 if (this.isEmpty()) {
183 if (this.root_.key <= key) {
185 } else if (this.root_.left) {
216 * the given key to the top of the tree. If no node has the given
225 if (this.isEmpty()) {
237 if (key < current.key) {
238 if (!current.left) {
241 if (key < current.left.key) {
247 if (!current.left) {
255 } else if (key > current.key) {
256 if (!current.right) {
259 if (key > current.right.key) {
265 if (!current.right) {
296 if (node == null) {