コード例 #1
0
 /** Performs a deep copy on <i>other</i>. */
 public NoteList(NoteList other) {
   System.arraycopy(other.__isset_vector, 0, __isset_vector, 0, other.__isset_vector.length);
   this.startIndex = other.startIndex;
   this.totalNotes = other.totalNotes;
   if (other.isSetNotes()) {
     List<com.evernote.edam.type.Note> __this__notes =
         new ArrayList<com.evernote.edam.type.Note>();
     for (com.evernote.edam.type.Note other_element : other.notes) {
       __this__notes.add(new com.evernote.edam.type.Note(other_element));
     }
     this.notes = __this__notes;
   }
   if (other.isSetStoppedWords()) {
     List<String> __this__stoppedWords = new ArrayList<String>();
     for (String other_element : other.stoppedWords) {
       __this__stoppedWords.add(other_element);
     }
     this.stoppedWords = __this__stoppedWords;
   }
   if (other.isSetSearchedWords()) {
     List<String> __this__searchedWords = new ArrayList<String>();
     for (String other_element : other.searchedWords) {
       __this__searchedWords.add(other_element);
     }
     this.searchedWords = __this__searchedWords;
   }
   this.updateCount = other.updateCount;
 }
コード例 #2
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;
  }
コード例 #3
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;
  }