boolean (IdeaDependency o1, IdeaDependency o2) { if (o1 == o2) return true; if (o1 != null && o2 != null) { if (o1 instanceof IdeaModuleDependency && o2 instanceof IdeaModuleDependency) { return equals((IdeaModuleDependency)o1, (IdeaModuleDependency)o2); } if (o1 instanceof IdeaSingleEntryLibraryDependency && o2 instanceof IdeaSingleEntryLibraryDependency) { return equals((IdeaSingleEntryLibraryDependency)o1, (IdeaSingleEntryLibraryDependency)o2); } } return false; }