code: public CmsModuleDependency checkDependency(CmsModule module) {
  
          CmsModuleDependency otherDepdendency = new CmsModuleDependency(module.getName(), module.getVersion());
  
          // loop through all the dependencies
          for (int i = 0; i < m_dependencies.size(); i++) {
              CmsModuleDependency dependency = m_dependencies.get(i);
              if (dependency.dependesOn(otherDepdendency)) {
                  // short circuit here
                  return dependency;
              }
          }
  
          // no dependency was found
          return null;
      }
docs: Checks if this module depends on another given module,
  will return the dependency, or <code>null</code> if no dependency was found.<p>
  
  @param module the other module to check against
  @return the dependency, or null if no dependency was found