public ModifiedNode put(T value)
  {
    N node = construct(value);
    if (m_root == null)
    {
      m_size = 1;
      m_root = node;
      return new ModifiedNode(true, node);
    }
    N parent = m_root;
    N t = m_root;
    int cmp = 0;
    while (t != null)
    {
      parent = t;
      cmp = compare(node, t);
      if (cmp == 0)
      {
        return new ModifiedNode(false, parent);
      }
      if (cmp < 0)
      {
        t = t.getLeft();
      }
      else
      {
        t = t.getRight();
      }
    }
    node.setParent(parent);
    if (cmp < 0)
    {
      parent.setLeft(node);
    }
    else
    {
      parent.setRight(node);
    }
    fixAfterInsertion(node);
    m_size++;
    return new ModifiedNode(true, node);
  }