Example #1
0
  @Override
  public boolean equals(Object obj) {
    if (obj == this) {
      return true;
    }

    if (obj instanceof OpenSlide) {
      OpenSlide os2 = (OpenSlide) obj;
      String quickhash1 = getProperties().get(PROPERTY_NAME_QUICKHASH1);
      String os2_quickhash1 = os2.getProperties().get(PROPERTY_NAME_QUICKHASH1);

      if (quickhash1 != null && os2_quickhash1 != null) {
        return quickhash1.equals(os2_quickhash1);
      } else if (quickhash1 == null && os2_quickhash1 == null) {
        return canonicalFile.equals(os2.canonicalFile);
      } else {
        return false;
      }
    }

    return false;
  }
Example #2
0
 @Override
 public boolean accept(File f) {
   return f.isDirectory() || OpenSlide.detectVendor(f) != null;
 }