/** * Performs a deep copy on <i>other</i>. */ public Comment(Comment other) { if (other.isSetContent()) { this.content = other.content; } if (other.isSetMarkup()) { this.markup = other.markup; } }
/** * Performs a deep copy on <i>other</i>. */ public Comment(Comment other) { if (other.isSetContent()) { this.content = other.content; } if (other.isSetMarkup()) { this.markup = other.markup; } }
/** 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 CONTENT: return isSetContent(); case MARKUP: return isSetMarkup(); } 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 CONTENT: return isSetContent(); case MARKUP: return isSetMarkup(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_content = true && (isSetContent()); list.add(present_content); if (present_content) list.add(content); boolean present_markup = true && (isSetMarkup()); list.add(present_markup); if (present_markup) list.add(markup.getValue()); return list.hashCode(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_content = true && (isSetContent()); list.add(present_content); if (present_content) list.add(content); boolean present_markup = true && (isSetMarkup()); list.add(present_markup); if (present_markup) list.add(markup.getValue()); return list.hashCode(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("Comment("); boolean first = true; sb.append("content:"); if (this.content == null) { sb.append("null"); } else { sb.append(this.content); } first = false; if (isSetMarkup()) { if (!first) sb.append(", "); sb.append("markup:"); if (this.markup == null) { sb.append("null"); } else { sb.append(this.markup); } first = false; } sb.append(")"); return sb.toString(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("Comment("); boolean first = true; sb.append("content:"); if (this.content == null) { sb.append("null"); } else { sb.append(this.content); } first = false; if (isSetMarkup()) { if (!first) sb.append(", "); sb.append("markup:"); if (this.markup == null) { sb.append("null"); } else { sb.append(this.markup); } first = false; } sb.append(")"); return sb.toString(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Comment struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.content); BitSet optionals = new BitSet(); if (struct.isSetMarkup()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetMarkup()) { oprot.writeI32(struct.markup.getValue()); } }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, Comment struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeString(struct.content); BitSet optionals = new BitSet(); if (struct.isSetMarkup()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetMarkup()) { oprot.writeI32(struct.markup.getValue()); } }
@Override public int compareTo(Comment other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetContent()).compareTo(other.isSetContent()); if (lastComparison != 0) { return lastComparison; } if (isSetContent()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.content, other.content); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMarkup()).compareTo(other.isSetMarkup()); if (lastComparison != 0) { return lastComparison; } if (isSetMarkup()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.markup, other.markup); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void write(org.apache.thrift.protocol.TProtocol oprot, Comment struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.content != null) { oprot.writeFieldBegin(CONTENT_FIELD_DESC); oprot.writeString(struct.content); oprot.writeFieldEnd(); } if (struct.markup != null) { if (struct.isSetMarkup()) { oprot.writeFieldBegin(MARKUP_FIELD_DESC); oprot.writeI32(struct.markup.getValue()); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public int compareTo(Comment other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetContent()).compareTo(other.isSetContent()); if (lastComparison != 0) { return lastComparison; } if (isSetContent()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.content, other.content); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetMarkup()).compareTo(other.isSetMarkup()); if (lastComparison != 0) { return lastComparison; } if (isSetMarkup()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.markup, other.markup); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void write(org.apache.thrift.protocol.TProtocol oprot, Comment struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.content != null) { oprot.writeFieldBegin(CONTENT_FIELD_DESC); oprot.writeString(struct.content); oprot.writeFieldEnd(); } if (struct.markup != null) { if (struct.isSetMarkup()) { oprot.writeFieldBegin(MARKUP_FIELD_DESC); oprot.writeI32(struct.markup.getValue()); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
public boolean equals(Comment that) { if (that == null) return false; boolean this_present_content = true && this.isSetContent(); boolean that_present_content = true && that.isSetContent(); if (this_present_content || that_present_content) { if (!(this_present_content && that_present_content)) return false; if (!this.content.equals(that.content)) return false; } boolean this_present_markup = true && this.isSetMarkup(); boolean that_present_markup = true && that.isSetMarkup(); if (this_present_markup || that_present_markup) { if (!(this_present_markup && that_present_markup)) return false; if (!this.markup.equals(that.markup)) return false; } return true; }
public boolean equals(Comment that) { if (that == null) return false; boolean this_present_content = true && this.isSetContent(); boolean that_present_content = true && that.isSetContent(); if (this_present_content || that_present_content) { if (!(this_present_content && that_present_content)) return false; if (!this.content.equals(that.content)) return false; } boolean this_present_markup = true && this.isSetMarkup(); boolean that_present_markup = true && that.isSetMarkup(); if (this_present_markup || that_present_markup) { if (!(this_present_markup && that_present_markup)) return false; if (!this.markup.equals(that.markup)) return false; } return true; }