code: private static boolean dependencyExists(Dependency dependency, List<Dependency> dependencies) {
  		for (Dependency d : dependencies) {
  			if (dependenciesEqual(dependency, d)) {
  				return true;
  			}
  		}
  		return false;
  		
  	}
docs: Check whether a dependency exists in a list of dependencies.
  
  @param dependency
  @param dependencies
  @return true if the dependency exists in dependencies list