Returns whether a key is strictly a child of another key.
        AoT siblings are not considered children of one another.
760484
def _is_child(self, parent, child):  # type: (str, str) -> bool
        
        parent_parts = tuple(self._split_table_name(parent))
        child_parts = tuple(self._split_table_name(child))

        if parent_parts == child_parts:
            return False

        return parent_parts == child_parts[: len(parent_parts)]
1135852
public boolean containsKey(final Object k) {
    return this._current.containsKey(k)
        || (this._parent != null && this._parent.containsKey(k));
  }
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;
   }
213784
protected boolean isLeaf() {

        for (int i = 0; i < entries.length; i++) {
            Entry entry = entries[i];
            if (entry.getChild() != null) {
                return false;
            }
        }

        return true;
    }
407258
public function hasChildren()
    {
        $property = $this->_propertyExtractor($this->_nestKey);
        $children = $property($this->current());

        if (is_array($children)) {
            return !empty($children);
        }

        return $children instanceof Traversable;
    }
985657
def is_primary(self):
        """"""
        return isinstance(self._key, Primary) and not isinstance(self._key, Sub)
659199
final boolean isAnyChildMatched() {
    if (isAnyChildMatched == null) {
      isAnyChildMatched = false;
      for (RecursableDiffEntity entity : childEntities()) {
        if ((entity.isMatched() && !entity.isContentEmpty()) || entity.isAnyChildMatched()) {
          isAnyChildMatched = true;
          break;
        }
      }
    }
    return isAnyChildMatched;
  }
140459
def is_descendant_of(self, ancestor):
        
        stop = Folder(ancestor)
        for folder in self.ancestors():
            if folder == stop:
                return True
            if stop.depth > folder.depth:
                return False
        return False
741734
def previous_sibling(self):
        
        stmts = self.parent.child_sequence(self)
        index = stmts.index(self)
        if index >= 1:
            return stmts[index - 1]
        return None
140102
public function hasScalarKeys() {
    if ($this->key instanceof ScalarNode) {
      return $this->array instanceof ArrayLookupNode ? $this->array->hasScalarKeys() : TRUE;
    }
    else {
      return FALSE;
    }
  }
369848
public boolean indexAppliesTo( JoinCondition condition ) {
        if (condition instanceof ChildNodeJoinCondition) {
            return indexAppliesTo((ChildNodeJoinCondition)condition);
        }
        if (condition instanceof DescendantNodeJoinCondition) {
            return indexAppliesTo((DescendantNodeJoinCondition)condition);
        }
        if (condition instanceof EquiJoinCondition) {
            return indexAppliesTo((EquiJoinCondition)condition);
        }
        if (condition instanceof SameNodeJoinCondition) {
            return indexAppliesTo((SameNodeJoinCondition)condition);
        }
        return false;
    }
769830
function isChild(child, parent) {
	while (child = child.parentNode) {
		if (child == parent) {
			return true;
		}
	}

	return false;
}
542202
def is_descendant_of(self, node):
        
        return self.pk in [obj.pk for obj in node.get_descendants()]
1012282
public boolean isSameAs( AstNode other ) {
        if (other == null) {
            return false;
        }
        if (!this.name.equals(other.name)) {
            return false;
        }
        if (!this.properties.equals(other.properties)) {
            return false;
        }
        if (this.getChildCount() != other.getChildCount()) {
            return false;
        }
        Iterator<AstNode> thisChildren = this.getChildren().iterator();
        Iterator<AstNode> thatChildren = other.getChildren().iterator();
        while (thisChildren.hasNext() && thatChildren.hasNext()) {
            if (!thisChildren.next().isSameAs(thatChildren.next())) {
                return false;
            }
        }
        return true;
    }
507974
public function has_siblings() {
        if (empty($this->parent) || empty($this->parent->children)) {
            return false;
        }
        if ($this->parent->children instanceof navigation_node_collection) {
            $count = $this->parent->children->count();
        } else {
            $count = count($this->parent->children);
        }
        return ($count > 1);
    }
175706
def is_active(self, key, *instances, **kwargs):
        
        try:
            default = kwargs.pop('default', False)

            # Check all parents for a disabled state
            parts = key.split(':')
            if len(parts) > 1:
                child_kwargs = kwargs.copy()
                child_kwargs['default'] = None
                result = self.is_active(':'.join(parts[:-1]), *instances,
                                        **child_kwargs)

                if result is False:
                    return result
                elif result is True:
                    default = result

            try:
                switch = self[key]
            except KeyError:
                # switch is not defined, defer to parent
                return default

            if switch.status == GLOBAL:
                return True
            elif switch.status == DISABLED:
                return False
            elif switch.status == INHERIT:
                return default

            conditions = switch.value
            # If no conditions are set, we inherit from parents
            if not conditions:
                return default

            instances = list(instances) if instances else []
            instances.extend(self.context.values())

            # check each switch to see if it can execute
            return_value = False

            for namespace, condition in conditions.iteritems():
                condition_set = registry_by_namespace.get(namespace)
                if not condition_set:
                    continue
                result = condition_set.has_active_condition(condition,
                                                            instances)
                if result is False:
                    return False
                elif result is True:
                    return_value = True
        except:
            log.exception('Error checking if switch "%s" is active', key)
            return_value = False

        # there were no matching conditions, so it must not be enabled
        return return_value
983866
@Pure
	public boolean hasChild(N potentialChild) {
		if ((this.left == potentialChild) || (this.middle == potentialChild) || (this.right == potentialChild)) {
			return true;
		}
		return false;
	}