public boolean equals(Log that) { if (that == null) return false; boolean this_present_timestamp = true; boolean that_present_timestamp = true; if (this_present_timestamp || that_present_timestamp) { if (!(this_present_timestamp && that_present_timestamp)) return false; if (this.timestamp != that.timestamp) return false; } boolean this_present_fields = true && this.isSetFields(); boolean that_present_fields = true && that.isSetFields(); if (this_present_fields || that_present_fields) { if (!(this_present_fields && that_present_fields)) return false; if (!this.fields.equals(that.fields)) return false; } return true; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_timestamp = true; list.add(present_timestamp); if (present_timestamp) list.add(timestamp); boolean present_fields = true && (isSetFields()); list.add(present_fields); if (present_fields) list.add(fields); return list.hashCode(); }
/** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */ public boolean isSet(_Fields field) { if (field == null) { throw new IllegalArgumentException(); } switch (field) { case TIMESTAMP: return isSetTimestamp(); case FIELDS: return isSetFields(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public Log(Log other) { __isset_bitfield = other.__isset_bitfield; this.timestamp = other.timestamp; if (other.isSetFields()) { List<Tag> __this__fields = new ArrayList<Tag>(other.fields.size()); for (Tag other_element : other.fields) { __this__fields.add(new Tag(other_element)); } this.fields = __this__fields; } }
@Override public int compareTo(Log other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTimestamp()).compareTo(other.isSetTimestamp()); if (lastComparison != 0) { return lastComparison; } if (isSetTimestamp()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.timestamp, other.timestamp); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetFields()).compareTo(other.isSetFields()); if (lastComparison != 0) { return lastComparison; } if (isSetFields()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.fields, other.fields); if (lastComparison != 0) { return lastComparison; } } return 0; }