Ejemplo n.º 1
0
  public boolean equals(NoteList that) {
    if (that == null) return false;

    boolean this_present_startIndex = true;
    boolean that_present_startIndex = true;
    if (this_present_startIndex || that_present_startIndex) {
      if (!(this_present_startIndex && that_present_startIndex)) return false;
      if (this.startIndex != that.startIndex) return false;
    }

    boolean this_present_totalNotes = true;
    boolean that_present_totalNotes = true;
    if (this_present_totalNotes || that_present_totalNotes) {
      if (!(this_present_totalNotes && that_present_totalNotes)) return false;
      if (this.totalNotes != that.totalNotes) return false;
    }

    boolean this_present_notes = true && this.isSetNotes();
    boolean that_present_notes = true && that.isSetNotes();
    if (this_present_notes || that_present_notes) {
      if (!(this_present_notes && that_present_notes)) return false;
      if (!this.notes.equals(that.notes)) return false;
    }

    boolean this_present_stoppedWords = true && this.isSetStoppedWords();
    boolean that_present_stoppedWords = true && that.isSetStoppedWords();
    if (this_present_stoppedWords || that_present_stoppedWords) {
      if (!(this_present_stoppedWords && that_present_stoppedWords)) return false;
      if (!this.stoppedWords.equals(that.stoppedWords)) return false;
    }

    boolean this_present_searchedWords = true && this.isSetSearchedWords();
    boolean that_present_searchedWords = true && that.isSetSearchedWords();
    if (this_present_searchedWords || that_present_searchedWords) {
      if (!(this_present_searchedWords && that_present_searchedWords)) return false;
      if (!this.searchedWords.equals(that.searchedWords)) return false;
    }

    boolean this_present_updateCount = true && this.isSetUpdateCount();
    boolean that_present_updateCount = true && that.isSetUpdateCount();
    if (this_present_updateCount || that_present_updateCount) {
      if (!(this_present_updateCount && that_present_updateCount)) return false;
      if (this.updateCount != that.updateCount) return false;
    }

    return true;
  }
Ejemplo n.º 2
0
  public int compareTo(NoteList other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    NoteList typedOther = (NoteList) other;

    lastComparison = Boolean.valueOf(isSetStartIndex()).compareTo(typedOther.isSetStartIndex());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStartIndex()) {
      lastComparison = TBaseHelper.compareTo(this.startIndex, typedOther.startIndex);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetTotalNotes()).compareTo(typedOther.isSetTotalNotes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetTotalNotes()) {
      lastComparison = TBaseHelper.compareTo(this.totalNotes, typedOther.totalNotes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetNotes()).compareTo(typedOther.isSetNotes());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetNotes()) {
      lastComparison = TBaseHelper.compareTo(this.notes, typedOther.notes);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetStoppedWords()).compareTo(typedOther.isSetStoppedWords());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetStoppedWords()) {
      lastComparison = TBaseHelper.compareTo(this.stoppedWords, typedOther.stoppedWords);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison =
        Boolean.valueOf(isSetSearchedWords()).compareTo(typedOther.isSetSearchedWords());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSearchedWords()) {
      lastComparison = TBaseHelper.compareTo(this.searchedWords, typedOther.searchedWords);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetUpdateCount()).compareTo(typedOther.isSetUpdateCount());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetUpdateCount()) {
      lastComparison = TBaseHelper.compareTo(this.updateCount, typedOther.updateCount);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }