Detects if the object (and optionally the child objects) has unsaved
changes.

@param $considerChildren

@return bool
@ignore
483808
protected function _isDirty($considerChildren)
    {
        return (count($this->operationSet) || $this->objectId === null) || ($considerChildren && $this->hasDirtyChildren());
    }
671571
public function getChildren($includeDeleted = false)
    {
        if ($includeDeleted) {
            return $this->children;
        }

        return $this->children->filter(function (Folder $entry) {
            if ($entry->isDeleted()) {
                return false;
            }

            return true;
        });
    }
784713
public function has_children() {
        return ($this->nodetype === navigation_node::NODETYPE_BRANCH || $this->children->count()>0 || $this->isexpandable);
    }
914266
protected boolean hasChildrenValuesLoaded()
	{
		for (int i = 0; i < variables.length; ++i)
		{
			if (variables[i] != null)
			{
				return true;
			}
		}
		return false;
	}
1158171
public function hasChange()
    {
        foreach ($this as $key => $value) {
            if ($this->isAdded || $this->isDeleted) {
                return true;
            }

            if (!is_null($value) && $value instanceof ChangeDetector && $value->hasChange()) {
                return true;
            }
        }
        if ($this->hasFromToFields()) {
            // check for change in presence of foreign-constraint
            $fromConstraint = null !== $this->fromField->getForeignConstraint();
            $toConstraint = null !== $this->toField->getForeignConstraint();
            $constraintChange = $fromConstraint != $toConstraint;
            if ($constraintChange) {
                return true;
            }
        }

        return false;
    }
137138
public function hasErrors($includeNested = true)
    {
        if (Hash::filter($this->_errors)) {
            return true;
        }

        if ($includeNested === false) {
            return false;
        }

        foreach ($this->_properties as $property) {
            if ($this->_readHasErrors($property)) {
                return true;
            }
        }

        return false;
    }
1105369
public function isVersioningNecessary($con = null)
    {
        if ($this->alreadyInSave) {
            return false;
        }

        if ($this->enforceVersion) {
            return true;
        }

        if (ChildDealerContactQuery::isVersioningEnabled() && ($this->isNew() || $this->isModified()) || $this->isDeleted()) {
            return true;
        }
        if (null !== ($object = $this->getDealer($con)) && $object->isVersioningNecessary($con)) {
            return true;
        }

        // to avoid infinite loops, emulate in save
        $this->alreadyInSave = true;
        foreach ($this->getDealerContactInfos(null, $con) as $relatedObject) {
            if ($relatedObject->isVersioningNecessary($con)) {
                $this->alreadyInSave = false;

                return true;
            }
        }
        $this->alreadyInSave = false;


        return false;
    }
528513
def reset_persisted_children
      _children.each do |child|
        child.move_changes
        child.new_record = false
      end
      _reset_memoized_children!
    end
1189326
public function hasChange()
    {
        return (
            count($this->getFieldsWithUpdate()) > 0
            || count($this->getIndexesWithUpdate()) > 0
            || $this->addSoftDelete
            || $this->dropSoftDelete
            || $this->addTimestamps
            || $this->dropTimestamps);
    }
1181030
public function hasChildren(): bool
    {
        $children = (($this->getRgt() - $this->getLft()) - 1) / 2;
        return (0 === $children) ? false : true;
    }
1214645
public function commit()
    {
        $items = $this->deferred;

        foreach ($items as $key => $item) {
            if ($this->save($item) === true) {
                unset($items[ $key ]);
            }
        }

        if (count($items) == 0) {
            $this->deferred = [];

            return true;
        }

        return false;
    }
734091
public function hasChildrenVisible()
    {
        foreach ($this->getChildren() as $child) {
            if ($child->getState() == static::STATE_ONLINE) {
                return true;
            }
        }

        return false;
    }
983866
@Pure
	public boolean hasChild(N potentialChild) {
		if ((this.left == potentialChild) || (this.middle == potentialChild) || (this.right == potentialChild)) {
			return true;
		}
		return false;
	}
247114
protected function updateChildren()
    {
        $children = $this->manager->getChildren($this->item->name);
        $childrenNames = array_keys($children);

        if (is_array($this->children)) {
            // remove children that
            foreach (array_diff($childrenNames, $this->children) as $item) {
                $this->manager->removeChild($this->item, $children[$item]);
            }
            // add new children
            foreach (array_diff($this->children, $childrenNames) as $item) {
                $this->manager->addChild($this->item, $this->manager->getItem($item));
            }
        } else {
            $this->manager->removeChildren($this->item);
        }
    }
13846
function hasChildren()
    {
        return array( $this->SetName => false,
                      $this->LetName => true,
                      $this->DefaultName => true );
    }
637151
public function equals($other, $considerAffix=false)
    {

        if ($other instanceof self) {
            return $considerAffix ? ($other->toString() == $this->toString())
                                  : ($other->getSource() == $this->source);
        }

        $other = "$other";

        if ($considerAffix) {
            return $other == $this->toString();
        }

        $cleaned = $other;

        if ($this->prefix && mb_strpos($other, $this->prefix) === 0) {
            $cleaned = mb_substr($other, mb_strlen($this->prefix));
        }

        if ($this->suffix && mb_strpos($other, $this->suffix)) {
            $cleaned = mb_substr($cleaned, 0, 0-mb_strlen($this->suffix));
        }

        if ($this->hasDifferentAffixes()){
            $cleaned = trim($cleaned, $this->glue);
        }

        $me = implode($this->glue, $this->source);

        return ($me == $other || $me == $cleaned);


    }
766494
public static boolean shouldRenderChildren(UIComponent component) {
        for (int i = 0; i < component.getChildren().size(); i++) {
            if (component.getChildren().get(i).isRendered()) {
                return true;
            }
        }

        return false;
    }