コード例 #1
0
 /** Performs a deep copy on <i>other</i>. */
 public NotificationEventResponse(NotificationEventResponse other) {
   if (other.isSetEvents()) {
     List<NotificationEvent> __this__events =
         new ArrayList<NotificationEvent>(other.events.size());
     for (NotificationEvent other_element : other.events) {
       __this__events.add(new NotificationEvent(other_element));
     }
     this.events = __this__events;
   }
 }
コード例 #2
0
  public boolean equals(NotificationEventResponse that) {
    if (that == null) return false;

    boolean this_present_events = true && this.isSetEvents();
    boolean that_present_events = true && that.isSetEvents();
    if (this_present_events || that_present_events) {
      if (!(this_present_events && that_present_events)) return false;
      if (!this.events.equals(that.events)) return false;
    }

    return true;
  }
コード例 #3
0
  @Override
  public int compareTo(NotificationEventResponse other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetEvents()).compareTo(other.isSetEvents());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetEvents()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.events, other.events);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }