Exemplo n.º 1
0
 @Override
 public int compareTo(final BackupInfo that) {
   if (that == null) {
     return 1;
   }
   int res = CompareUtils.compare(this.type, that.type);
   if (res == 0) {
     res = -CompareUtils.compare(this.timestamp, that.timestamp);
   }
   if (res == 0) {
     res = CompareUtils.compare(this.name, that.name);
   }
   return res;
 }
Exemplo n.º 2
0
  public void setCurrentPageIndex(final PageIndex newIndex) {
    if (!CompareUtils.equals(currentIndex, newIndex)) {
      if (LCTX.isDebugEnabled()) {
        LCTX.d("Current page changed: " + "currentIndex" + " -> " + newIndex);
      }

      final PageIndex oldIndex = this.currentIndex;
      this.currentIndex = newIndex;

      this.<CurrentPageListener>getListener().currentPageChanged(oldIndex, newIndex);
    }
  }