Add a new dependent to this node.

@param toAdd
482257
protected void addDependent(Node nodeToAdd) {
        if (TraceComponent.isAnyTracingEnabled() && tc.isDebugEnabled()) {
            Tr.debug(tc, "addDependent entry: node to add: " + nodeToAdd);
        }
        dependents.add(nodeToAdd);
    }
387227
protected boolean addDependencies(DependencyContainer container)
  {
    /* XXX:
    if (_classPath instanceof JarPath) {
      container.add(_depend);
      return false;
    }
    else
    */ 
    if (_hasJNIReload) {
      container.add(this);
      return true;
    }
    else if (_sourcePath == null) {
      container.add(_depend);
      return false;
    }
    else {
      container.add(this);
      return true;
    }
  }
917700
def _add_dep(self, dep):
        
        if dep in self._deps:
            self._deps[dep] += 1
        else:
            self._deps[dep] = 1
            dep._dependents[self] = None
1165394
@Override
    protected void addWork(Object toAdd) {
        addToWorkQueue(toAdd);
        if (wakeupNeeded || (wakeupOption == ValidateUtils.SELECTOR_WAKEUP_IF_NO_FORCE_QUEUE && ((TCPBaseRequestContext) toAdd).isForceQueue() == false)) {
            if (wakeupPending != true) {
                wakeupPending = true;
                wakeup();
            }
        }
    }
1040155
protected void addNode( Node nodeToInsert, Node insertBeforeNode )
    {
        // Insert node.
        nodeToInsert.next = insertBeforeNode;
        nodeToInsert.previous = insertBeforeNode.previous;
        insertBeforeNode.previous.next = nodeToInsert;
        insertBeforeNode.previous = nodeToInsert;
    }
571651
def add(node)
      if @nodes.key?(node.key)
        raise DuplicateNodeError.new(node.key)
      end

      @nodes[node.key] = node
    end
1136624
public void addNode(RNode newNode) {
        graph.add(newNode);
        graphBitSet.set(graph.size() - 1);
    }
255274
public void addDependencies( String pomPath, List<String> scopes ) throws ProjectException {
        addDependencies( new Project( pomPath), scopes );
    }
1154060
public void addToCache(Data... toAdd) throws BucketContainerException, InterruptedException {
        if (shutDownInitiated) {
            throw new BucketContainerException("Shutdown was already initiated. Could not add the given elements.");
        }
        int throwBucketException = -1;
        for (AbstractKVStorable date : toAdd) {
            int indexOfCache = hashFunction.getBucketId(date.getKey());
            // safety first, check if the bucket exists. If not, try to move on. Throw exception at the end
            if (indexOfCache < buckets.length) {
                Bucket<Data> bucket = buckets[indexOfCache];
                // Blocking process, try to add element
                while (!bucket.add(date)) {
                    Thread.sleep(1000);
                }
            } else {
                throwBucketException = indexOfCache;
            }
        }

        if (throwBucketException != -1) {
            throw new BucketContainerException("Could not insert at least one LinkData-object. One missing bucket was "
                    + throwBucketException);
        }
    }
701455
public void setDependsOn(java.util.Collection<JobDependency> dependsOn) {
        if (dependsOn == null) {
            this.dependsOn = null;
            return;
        }

        this.dependsOn = new java.util.ArrayList<JobDependency>(dependsOn);
    }
968757
public static <T> void addAll(Collection<? super T> collection, Collection<? extends T> toAdd)
    {
        if (collection == null || toAdd == null)
        {
            return;
        }
        if (toAdd instanceof RandomAccess)
        {
            List<? extends T> randomAccess = (List<? extends T>) toAdd;
            for (int i = 0, size = randomAccess.size(); i < size; i++)
            {
                T element = randomAccess.get(i);
                collection.add(element);
            }
        }
        else
        {
            collection.addAll(toAdd);
        }
    }
144231
public ServiceGraphModule addDependency(Key<?> key, Key<?> keyDependency) {
		addedDependencies.computeIfAbsent(key, key1 -> new HashSet<>()).add(keyDependency);
		return this;
	}
699968
public void setDependentListener(BaseListener dependentListener)
    {   // Add this to the multi-dependecy
        if (dependentListener == null)
            return;
        boolean bAddToList = true;
        for (BaseListener listener : m_BehaviorList)
        {
            if (listener == dependentListener);
                bAddToList = false;;     // Already co-dependent
        }
        
        if (bAddToList)
            m_BehaviorList.addElement(dependentListener);
        if (dependentListener != null) if (dependentListener.getDependentListener() == null)
            dependentListener.setDependentListener(this); // Dependent on each other!
    }
984625
public function addListenerId($listenerId)
    {
        if (null !== $this->getListenerId($listenerId)) {
            return;
        }
        
        $this->listeners[$listenerId] = $listenerId;
    }
395945
public void addDependency(String notation, String scope) {
        log.debug("Add dep {} {}", notation, scope);
        
        DefaultArtifact artifact = new DefaultArtifact( notation );
        
        if ( Const.TEST.equals( artifact.getClassifier() ) || Const.TEST_JAR.equals( artifact.getClassifier() ) ) {
            
            ArtifactType artifactType = new DefaultArtifactType( Const.TEST_JAR, Const.JAR, Const.TEST_JAR, null );
            
            artifact = new DefaultArtifact( artifact.getGroupId(), artifact.getArtifactId(),
                    null, Const.JAR, artifact.getBaseVersion(), artifactType );
        }
        Dependency dependency = new Dependency(artifact, scope);
        addDependency(dependency);
    }
1235465
public static void addDependency(Dependency depend)
  {
    ClassLoader loader = Thread.currentThread().getContextClassLoader();

    addDependency(depend, loader);
  }
708549
private void addDependency(DynamicProperty dynamic, String placeholder) {
        List<DynamicProperty> l = placeholderToDynamics.get(placeholder);
        if (l == null) {
            l = new ArrayList<DynamicProperty>();
            placeholderToDynamics.put(placeholder, l);
        }
        if (!l.contains(dynamic)) {
            l.add(dynamic);
        }
        dynamic.addPlaceholder(placeholder);
    }