Check the parameter is a parent of <b>this</b> {@link RegistryEntry}
instance

@param registryEntry
parent to check
@return true if the parameter is a parent
543826
public boolean isParent(RegistryEntry registryEntry) {
		RegistryEntry parentRegistryEntry = getParentRegistryEntry();
		while (parentRegistryEntry != null) {
			if (parentRegistryEntry.equals(registryEntry)) {
				return true;
			}
			parentRegistryEntry = parentRegistryEntry.getParentRegistryEntry();
		}
		return false;
	}
659388
static RegistryEntry getEntry(VirtualFile virtualFile) {
        if (virtualFile == null) {
            throw MESSAGES.nullArgument("VirutalFile");
        }
        return rootEntry.find(virtualFile);
    }
752469
private function hasAncestorGuid( $entry, $ancestor )
	{
		if (
				( isset( $entry['parent'] ) && isset( $ancestor['parent'] ) && ( $entry['parent'] == $ancestor['parent'] ) ) || // The item is a sibling
				( isset( $entry['parent'] ) && ( $entry['parent'] == $ancestor['guid'] ) ) || // The item is a child
				( $entry['guid'] == $ancestor['guid'] ) // Same
		   )
		{
			return true;
		}

		if ( $entry['guid'] == 'xbrl' || $entry['parent'] == 'xbrl' )
		{
			return false; // If here and the entry guid is xbrl there can be no parent or match
		}

		$parent =& $this->getEntryForGuid( $entry['parent'] );
		if ( ! $parent ) return false;
		return $this->hasAncestorGuid( $parent, $ancestor );
	}
1276240
private boolean isDescendant(DependencyInfo parentDependency, DependencyInfo childDependency){
        for (DependencyInfo dependencyInfo : childDependency.getChildren()){
            if (dependencyInfo.equals(parentDependency))
                return true;
            return isDescendant(dependencyInfo, childDependency);
        }
        return false;
    }
1116705
public static <T> boolean isDescendantOf(TreeDef.Parented<T> treeDef, T child, T parent) {
		T candidateParent = treeDef.parentOf(child);
		while (candidateParent != null) {
			if (candidateParent.equals(parent)) {
				return true;
			} else {
				candidateParent = treeDef.parentOf(candidateParent);
			}
		}
		return false;
	}
1131788
public function isEntry($var = null, $section = false)
    {
        return (
            !empty($var) and (
                (!empty($section) && isset($this->registry[$section]) && isset($this->registry[$section][$var])) or
                isset($this->registry[$var])
            )
        );
    }
900761
public void validateParentKey(Key parentKey) {
		if (parents.isEmpty()) {
			if (parentKey != null) {
				throw new IllegalArgumentException("Specified parent key " + parentKey + ", but entity " + this.persistentClass.getSimpleName() + " is configured as a root class (missing @Id(parent)?)");
			}
		} else {
			if (parentKey == null) {
				throw new IllegalArgumentException("Missing parent key for entity " + this.persistentClass.getSimpleName() + ". Expected: " + Joiner.on(", ").join(parents));
			}
			if (!parents.contains(parentKey.getKind())) {
				throw new IllegalArgumentException("Specified parent key " + parentKey + ", but entity " + this.persistentClass.getSimpleName() + " expects parents with type " + Joiner.on(", ").join(parents));
			}
		}
	}
1207987
public <T> T getChildEntry(Class<?> parentClass, String parentId,
                               Class<T> classs, String childId, NameValuePair... params) throws RedmineException {
        final EntityConfig<T> config = getConfig(classs);
        final URI uri = getURIConfigurator().getChildIdURI(parentClass, parentId, classs, childId, params);
        HttpGet http = new HttpGet(uri);
        String response = send(http);

        return parseResponse(response, config.singleObjectName, config.parser);
    }
787347
def parent(self, parent):
        
        if parent is None:
            self._parent = None
        else:
            from rafcon.core.states.state import State
            assert isinstance(parent, State)

            old_parent = self.parent
            self._parent = ref(parent)

            valid, message = self._check_validity()
            if not valid:
                if not old_parent:
                    self._parent = None
                else:
                    self._parent = ref(old_parent)

                class_name = self.__class__.__name__
                if global_config.get_config_value("LIBRARY_RECOVERY_MODE") is True:
                    do_delete_item = True
                    # In case of just the data type is wrong raise an Exception but keep the data flow
                    if "not have matching data types" in message:
                        do_delete_item = False
                        self._parent = ref(parent)
                    raise RecoveryModeException("{0} invalid within state \"{1}\" (id {2}): {3}".format(
                        class_name, parent.name, parent.state_id, message), do_delete_item=do_delete_item)
                else:
                    raise ValueError("{0} invalid within state \"{1}\" (id {2}): {3} {4}".format(
                        class_name, parent.name, parent.state_id, message, self))
288916
public boolean isRegistry(BareJid jid) throws NoResponseException, XMPPErrorException, NotConnectedException, InterruptedException {
        Objects.requireNonNull(jid, "JID argument must not be null");
        // At some point 'usedRegistries' will also contain the registry returned by findRegistry(), but since this is
        // not the case from the beginning, we perform findRegistry().equals(jid) too.
        Jid registry = findRegistry();
        if (jid.equals(registry)) {
            return true;
        }
        if (usedRegistries.contains(jid)) {
            return true;
        }
        return false;
    }
156704
public boolean match(String rootPath, CmsLock lock) {

        boolean match = false;
        if (m_includeChildren) {
            // safe since rootPath always ends with slash if a folder
            match = lock.getResourceName().startsWith(rootPath);
        }
        if (!match && m_includeParents) {
            // since parents can only be folders, check it only for folders
            if (lock.getResourceName().endsWith("/")) {
                match = rootPath.startsWith(lock.getResourceName());
            }
        }
        if (match && (m_projectId != null) && !m_projectId.isNullUUID() && (lock.getProjectId() != null)) {
            match = lock.getProjectId().equals(m_projectId);
        }
        if (match && (m_ownedByUserId != null) && !m_ownedByUserId.isNullUUID()) {
            match = lock.getUserId().equals(m_ownedByUserId);
        }
        if (match && (m_notOwnedByUserId != null) && !m_notOwnedByUserId.isNullUUID()) {
            match = !lock.getUserId().equals(m_notOwnedByUserId);
        }
        if (match && (m_lockableByUser != null)) {
            match = lock.isLockableBy(m_lockableByUser);
        }
        if (match && (m_notLockableByUser != null)) {
            match = !lock.isLockableBy(m_notLockableByUser);
        }
        if (match && !m_types.isEmpty()) {
            match = m_types.contains(lock.getType());
            match = match || (m_includeParents && lock.isInherited());
        }
        // check the related lock if available
        if (!match && !lock.getRelatedLock().isNullLock()) {
            match = match(rootPath, lock.getRelatedLock());
        }
        return match;
    }
300108
function isAncestorIDOf(ancestorID, descendantID) {
  return (
    descendantID.indexOf(ancestorID) === 0 &&
    isBoundary(descendantID, ancestorID.length)
  );
}
710925
private boolean isEntryInDir(Set<String> dirNames, String entryName) {
    // this should be done with a trie, put dirNames in a trie and check if entryName leads to
    // some node or not.
    for(String dirName : dirNames) {
      if (entryName.startsWith(dirName)) {
        return true;
      }
    }
    return false;
  }
727511
@Override
	public synchronized boolean addEntry(Principal caller, Principal principal, String permission)
	{
		return addEntry(caller, new SecurityAccessControl(principal, permission));
	}
1093973
private void internalSetParent(CommandRegistry parentRegistry) {
        
        if (!ObjectUtils.nullSafeEquals(this.parent, parentRegistry)) {
            
            if (this.parent != null) {
                this.parent.removeCommandRegistryListener(this);
            }
            
            this.parent = parentRegistry;
            
            if (this.parent != null) {
                this.parent.addCommandRegistryListener(this);
            }
            
        }
        
    }
691893
public static <K, V> OMVRBTreeEntry<K, V> predecessor(final OMVRBTreeEntry<K, V> t) {
    if (t == null)
      return null;
    else if (t.getLeft() != null) {
      OMVRBTreeEntry<K, V> p = t.getLeft();
      while (p.getRight() != null)
        p = p.getRight();
      return p;
    } else {
      OMVRBTreeEntry<K, V> p = t.getParent();
      Entry<K, V> ch = t;
      while (p != null && ch == p.getLeft()) {
        ch = p;
        p = p.getParent();
      }
      return p;
    }
  }
1111272
public boolean parent() {
        if (mNode == null) {
            return false;
        }
        AccessibilityNodeInfoCompat parentNode = mNode.getParent();
        while (parentNode != null) {
            if (AccessibilityNodeInfoUtils.isVisibleOrLegacy(parentNode)) {
                reset(parentNode);
                return true;
            }
            AccessibilityNodeInfoCompat tmp = parentNode.getParent();
            parentNode.recycle();
            parentNode = tmp;
        }
        return false;
    }