@Override public int compareTo(AnnouncementResponse other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetAnnouncements()).compareTo(other.isSetAnnouncements()); if (lastComparison != 0) { return lastComparison; } if (isSetAnnouncements()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.announcements, other.announcements); if (lastComparison != 0) { return lastComparison; } } return 0; }