PipInstalledPackage implements Comparable { @Override public boolean equals(Object obj) { if (this == obj) return true; if (obj == null) return false; if (getClass() != obj.getClass()) return false; PipInstalledPackage other = (PipInstalledPackage) obj; if (name == null) { if (other.name != null) return false; } else if (!this.getStandardDistributionName().equals(other.getStandardDistributionName())) return false; if (version == null) { if (other.version != null) return false; } else if (!version.equals(other.version)) return false; return true; } PipInstalledPackage(String _name, String _version); Map<String, String> getProperties(); Path getInstallPath(); String getDownloadUrl(); void setDownloadUrl(String downloadUrl); Path getDownloadPath(); void setDownloadPath(Path downloadPath); Library getLibrary(); boolean requires(PipInstalledPackage _pack); void addProperties(Map<String, String> properties); String getName(); String getVersion(); @Override String toString(); String getDigest(); Set<FileAnalyzer> getNestedArchives(); int compareTo(Object _other); static Set<PipInstalledPackage> filterUsingArtifact(
      Set<PipInstalledPackage> _packages, StringList _filter, boolean _include); @Override int hashCode(); @Override boolean equals(Object obj); String getStandardDistributionName(); static String getStandardDistributionName(String _name); boolean equalsStandardDistributionName(PipInstalledPackage _other);  }
@Test public void testEquals() { PipInstalledPackage p1 = new PipInstalledPackage("abc-XYZ#", "1.0"); PipInstalledPackage p2 = new PipInstalledPackage("ABC_xyz$", "2.0"); assertFalse(p1.equals(p2)); assertTrue(p1.equalsStandardDistributionName(p2)); }