예제 #1
0
 public int compareTo(final FileDetails o) {
   if (o == null) {
     throw new NullPointerException();
   }
   // N.B. this is in reverse order to how we'd normally compare
   int result = o.getFile().compareTo(this.file);
   if (result == 0) {
     result = ObjectUtils.nullSafeComparison(o.getLastModified(), this.lastModified);
   }
   return result;
 }
예제 #2
0
 @Override
 public int hashCode() {
   return 7 * this.file.hashCode() * ObjectUtils.nullSafeHashCode(lastModified);
 }