docs: public void addDependency(T from, T to) {
        if (from == null || to == null || from.equals(to)) {
           throw new IllegalArgumentException("Invalid parameters");
        }
        lock.writeLock().lock();
        try {
           if (addOutgoingEdge(from, to)) {
              addIncomingEdge(to, from);
           }
        } finally {
           lock.writeLock().unlock();
        }
     }