/** * Returns the {@link Dependency} for the given {@link Library}, null if no such dependency exists. * * @param _deps * @param _lib * @return */ public static Dependency getLibraryDependency(Set<Dependency> _deps, Library _lib) { for(Dependency d: _deps) { if(d.getLib().equals(_lib)) { return d; } } return null; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PathNode other = (PathNode) obj; if (constructId == null) { if (other.constructId != null) return false; } else if (!constructId.equals(other.constructId)) return false; if (lib == null) { if (other.lib != null) return false; } else if (!lib.equals(other.lib)) return false; return true; } }
public boolean equalLibParentRelPath(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Dependency other = (Dependency) obj; if (lib == null) { if (other.lib != null) return false; } else if (!lib.equals(other.lib)) return false; if (parent == null) { if (other.parent != null) return false; } else if (!parent.equalLibParentRelPath(other.parent)) return false; if (relativePath == null) { if (other.relativePath != null) return false; } else if (!relativePath.equals(other.relativePath)) return false; return true; }
@Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; Trace other = (Trace) obj; if (app == null) { if (other.app != null) return false; } else if (!app.equals(other.app)) return false; if (constructId == null) { if (other.constructId != null) return false; } else if (!constructId.equals(other.constructId)) return false; if (lib == null) { if (other.lib != null) return false; } else if (!lib.equals(other.lib)) return false; return true; }
if (other.lib != null) return false; } else if (!lib.equals(other.lib)) return false; if (parent == null) {
/** * Returns true of the given set of dependencies already contains a {@link Dependency} with the same library' digest, parent and relativePath, false otherwise. * * @param _deps * @param _dep * @return */ public static Dependency getDependency(Set<Dependency> _deps, Dependency _dep) { for(Dependency d: _deps) { if(d.getLib().equals(_dep.getLib()) && d.getParent().equalLibParentRelPath(_dep.getParent()) && d.getRelativePath().equals(_dep.getRelativePath())) { return d; } } return null; }