/** * Performs a deep copy on <i>other</i>. */ public MiniStruct(MiniStruct other) { if (other.isSetMy_string()) { this.my_string = other.my_string; } if (other.isSetMy_enum()) { this.my_enum = other.my_enum; } }
/** 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 MY_STRING: return isSetMy_string(); case MY_ENUM: return isSetMy_enum(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_my_string = true && (isSetMy_string()); list.add(present_my_string); if (present_my_string) list.add(my_string); boolean present_my_enum = true && (isSetMy_enum()); list.add(present_my_enum); if (present_my_enum) list.add(my_enum.getValue()); return list.hashCode(); }
@Override public int compareTo(MiniStruct other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetMy_string()).compareTo(other.isSetMy_string()); if (lastComparison != 0) { return lastComparison; } if (isSetMy_string()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_string, other.my_string); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMy_enum()).compareTo(other.isSetMy_enum()); if (lastComparison != 0) { return lastComparison; } if (isSetMy_enum()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.my_enum, other.my_enum); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public String toString() { StringBuilder sb = new StringBuilder("MiniStruct("); boolean first = true; if (isSetMy_string()) { sb.append("my_string:"); if (this.my_string == null) { sb.append("null"); } else { sb.append(this.my_string); } first = false; } if (isSetMy_enum()) { if (!first) sb.append(", "); sb.append("my_enum:"); if (this.my_enum == null) { sb.append("null"); } else { sb.append(this.my_enum); } first = false; } sb.append(")"); return sb.toString(); }
public boolean equals(MiniStruct that) { if (that == null) return false; boolean this_present_my_string = true && this.isSetMy_string(); boolean that_present_my_string = true && that.isSetMy_string(); if (this_present_my_string || that_present_my_string) { if (!(this_present_my_string && that_present_my_string)) return false; if (!this.my_string.equals(that.my_string)) return false; } boolean this_present_my_enum = true && this.isSetMy_enum(); boolean that_present_my_enum = true && that.isSetMy_enum(); if (this_present_my_enum || that_present_my_enum) { if (!(this_present_my_enum && that_present_my_enum)) return false; if (!this.my_enum.equals(that.my_enum)) return false; } return true; }
public void write(org.apache.thrift.protocol.TProtocol oprot, MiniStruct struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.my_string != null) { if (struct.isSetMy_string()) { oprot.writeFieldBegin(MY_STRING_FIELD_DESC); oprot.writeString(struct.my_string); oprot.writeFieldEnd(); } } if (struct.my_enum != null) { if (struct.isSetMy_enum()) { oprot.writeFieldBegin(MY_ENUM_FIELD_DESC); oprot.writeI32(struct.my_enum.getValue()); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, MiniStruct struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMy_string()) { optionals.set(0); } if (struct.isSetMy_enum()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetMy_string()) { oprot.writeString(struct.my_string); } if (struct.isSetMy_enum()) { oprot.writeI32(struct.my_enum.getValue()); } }
/** * Performs a deep copy on <i>other</i>. */ public MiniStruct(MiniStruct other) { if (other.isSetMy_string()) { this.my_string = other.my_string; } if (other.isSetMy_enum()) { this.my_enum = other.my_enum; } }
/** * Performs a deep copy on <i>other</i>. */ public MiniStruct(MiniStruct other) { if (other.isSetMy_string()) { this.my_string = other.my_string; } if (other.isSetMy_enum()) { this.my_enum = other.my_enum; } }
/** 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 MY_STRING: return isSetMy_string(); case MY_ENUM: return isSetMy_enum(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public MiniStruct(MiniStruct other) { if (other.isSetMy_string()) { this.my_string = other.my_string; } if (other.isSetMy_enum()) { this.my_enum = other.my_enum; } }
/** * Performs a deep copy on <i>other</i>. */ public MiniStruct(MiniStruct other) { if (other.isSetMy_string()) { this.my_string = other.my_string; } if (other.isSetMy_enum()) { this.my_enum = other.my_enum; } }
/** 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 MY_STRING: return isSetMy_string(); case MY_ENUM: return isSetMy_enum(); } 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 MY_STRING: return isSetMy_string(); case MY_ENUM: return isSetMy_enum(); } 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 MY_STRING: return isSetMy_string(); case MY_ENUM: return isSetMy_enum(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_my_string = true && (isSetMy_string()); list.add(present_my_string); if (present_my_string) list.add(my_string); boolean present_my_enum = true && (isSetMy_enum()); list.add(present_my_enum); if (present_my_enum) list.add(my_enum.getValue()); return list.hashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_my_string = true && (isSetMy_string()); builder.append(present_my_string); if (present_my_string) builder.append(my_string); boolean present_my_enum = true && (isSetMy_enum()); builder.append(present_my_enum); if (present_my_enum) builder.append(my_enum.getValue()); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_my_string = true && (isSetMy_string()); builder.append(present_my_string); if (present_my_string) builder.append(my_string); boolean present_my_enum = true && (isSetMy_enum()); builder.append(present_my_enum); if (present_my_enum) builder.append(my_enum.getValue()); return builder.toHashCode(); }
@Override public int hashCode() { HashCodeBuilder builder = new HashCodeBuilder(); boolean present_my_string = true && (isSetMy_string()); builder.append(present_my_string); if (present_my_string) builder.append(my_string); boolean present_my_enum = true && (isSetMy_enum()); builder.append(present_my_enum); if (present_my_enum) builder.append(my_enum.getValue()); return builder.toHashCode(); }