Removes the child from parent if both parent and child are not null and parent contains child.

@return {@code true} if the the element has been removed from its parent, {@code false} otherwise.
171187
public static boolean failSafeRemove(Node parent, Element child) {
        //noinspection SimplifiableIfStatement
        if (parent != null && child != null && parent.contains(child)) {
            return parent.removeChild(child) != null;
        }
        return false;
    }
178164
@Nullable
  public final Node removeFirstChild() {
    Node child = first;
    if (child != null) {
      removeChild(child);
    }
    return child;
  }
55802
public boolean isLast()
    {
        if (_parent == null)
            return true;
        int last = _parent.size() - 1;
        assert(last >= 0);
        return (_parent.getChild(last) == this);
    }
93860
@Override
	public void removeChild(final ITreeNode<T> child)
	{
		if (children != null)
		{
			children.remove(child);
		}
		else
		{
			children = new ArrayList<>();
		}

	}
726040
ContentMatcher remove(
    Conjunction selector,
    MatchTarget object,
    InternTable subExpr,
    OrdinalPosition parentId)
    throws MatchingException
  {
    if (vacantChild == null)
      throw new IllegalStateException();
    vacantChild =
      vacantChild.remove(selector, object, subExpr, ordinalPosition);
    return vacantChild;
  }
525188
function() {
			var tag = this.tag;

			if (!tag) { return false; }

			this.unbind();
			if (tag.parentNode) { tag.parentNode.removeChild(tag); }

			delete this.tag;
			return true;
		}
774099
public boolean delete() {
        boolean deleted = false;
        for (File child : file.listFiles()) {
            deleted = child.delete() || deleted;
        }
        deleted = file.delete() || deleted;
        return deleted;
    }
537747
function() {
    var e = this._element;
    if (e) {
      var p = e.parentNode;
      if (p) {
        p.removeChild(e);
      }
    }
    return this;
  }
1220913
protected static boolean isChildOf(String parent, String child) {
      if (parent == null || child == null)
         return false;
      if (!child.startsWith((parent.endsWith(SEPARATOR) ? parent : parent + SEPARATOR)))
         return false;
      if (child.length() <= parent.length())
         return false;
      int from = parent.equals(SEPARATOR) ? parent.length() : parent.length() + 1;
      //  if(from-1 > child.length())
      // return false;
      String[] comps = Util.components(child.substring(from), SEPARATOR);
      return comps != null && comps.length <= 1;
   }
1082669
public void removeChild(TreeElement child)
    {

        if (child == null || _children == null)
            return;

        int size = _children.size();
        int removeIndex = -1;
        for (int i = 0; i < size; i++) {
            if (child == (TreeElement) _children.get(i)) {
                _children.remove(i);
                child.setParent(null);
                removeIndex = i;
                break;
            }
        }
        if (removeIndex >= 0) {
            size = _children.size();
            for (int i = removeIndex; i < size; i++) {
                TreeElement thisChild = (TreeElement) _children.get(i);
                thisChild.updateName(this, i);
            }
        }
    }
25132
public static boolean hasChildElement(NodeList list) {
		
		Node n;

		for(int i = 0; i < list.getLength(); i++) {
			n = list.item(i);

			if(n.getNodeType() == Node.ELEMENT_NODE) {
				return true;
			}
		}

		return false;
		
	}
1159561
public boolean release() {

    if (this.released) {
      // already (marked as) released...
      return false;
    }
    this.released = true;
    if (this.childCount == 0) {
      if (this.parent == null) {
        return true;
      } else {
        assert (this.parent.childCount > 0);
        this.parent.childCount--;
        if ((this.parent.childCount == 0) && (this.parent.released)) {
          return true;
        }
      }
    }
    return false;
  }
376137
def remove(self):
        
        if self.parent:
            for i, node in enumerate(self.parent.children):
                if node is self:
                    self.parent.changed()
                    del self.parent.children[i]
                    self.parent = None
                    return i
242131
public static void removeFromParent(Element elem) {
    if(elem != null && elem.getParentNode() != null) {
      elem.getParentNode().removeChild(elem);
    }
  }
16516
def remove(self, child):
        ''''''
        try:
            self.children.remove(child)
            if isinstance(child, String):
                child._parent = None
        except ValueError:
            pass
10849
public final boolean isParentItem(int adapterPosition) {
        int itemCount = 0;

        int parentCount = parentItemCount();
        for (int i = 0; i < parentCount; i++) {
            if (itemCount == adapterPosition) {
                return true;
            }

            itemCount += 1;

            if (isExpanded(i)) {
                itemCount += childItemCount(i);
            } else {
                // itemCount += 1;
            }
        }

        return false;
    }
423029
private boolean removeConvertedNodes(AbstractNode node) {
    boolean nodeRemoved = false;
    Iterator<AbstractNode> it = node.getChildren().iterator();
    while (it.hasNext()) {
      FilterJoinNode child = (FilterJoinNode) it.next();
      if (child.getState().equals(FilterJoinNode.State.CONVERTED)) {
        it.remove();
        nodeRemoved |= true;
      }
      else {
        nodeRemoved |= this.removeConvertedNodes(child) ? true : false;
      }
    }
    return nodeRemoved;
  }