/** * Performs a deep copy on <i>other</i>. */ public Author(Author other) { if (other.isSetName()) { this.name = other.name; } if (other.isSetEmail()) { this.email = other.email; } }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_email = true && (isSetEmail()); list.add(present_email); if (present_email) list.add(email); return list.hashCode(); }
/** * Performs a deep copy on <i>other</i>. */ public Author(Author other) { if (other.isSetName()) { this.name = other.name; } if (other.isSetEmail()) { this.email = other.email; } }
/** 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 NAME: return isSetName(); case EMAIL: return isSetEmail(); } throw new IllegalStateException(); }
/** 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 NAME: return isSetName(); case EMAIL: return isSetEmail(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_name = true && (isSetName()); list.add(present_name); if (present_name) list.add(name); boolean present_email = true && (isSetEmail()); list.add(present_email); if (present_email) list.add(email); return list.hashCode(); }
public boolean equals(Author that) { if (that == null) return false; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_email = true && this.isSetEmail(); boolean that_present_email = true && that.isSetEmail(); if (this_present_email || that_present_email) { if (!(this_present_email && that_present_email)) return false; if (!this.email.equals(that.email)) return false; } return true; }
public boolean equals(Author that) { if (that == null) return false; boolean this_present_name = true && this.isSetName(); boolean that_present_name = true && that.isSetName(); if (this_present_name || that_present_name) { if (!(this_present_name && that_present_name)) return false; if (!this.name.equals(that.name)) return false; } boolean this_present_email = true && this.isSetEmail(); boolean that_present_email = true && that.isSetEmail(); if (this_present_email || that_present_email) { if (!(this_present_email && that_present_email)) return false; if (!this.email.equals(that.email)) return false; } return true; }
@Override public int compareTo(Author other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEmail()).compareTo(other.isSetEmail()); if (lastComparison != 0) { return lastComparison; } if (isSetEmail()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, other.email); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public int compareTo(Author other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetName()).compareTo(other.isSetName()); if (lastComparison != 0) { return lastComparison; } if (isSetName()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.name, other.name); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEmail()).compareTo(other.isSetEmail()); if (lastComparison != 0) { return lastComparison; } if (isSetEmail()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.email, other.email); if (lastComparison != 0) { return lastComparison; } } return 0; }