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