コード例 #1
0
ファイル: FileDetails.java プロジェクト: gavinlau/spring-roo
 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
ファイル: FileDetails.java プロジェクト: gavinlau/spring-roo
 @Override
 public int hashCode() {
   return 7 * this.file.hashCode() * ObjectUtils.nullSafeHashCode(lastModified);
 }