public boolean equals(BlockletInfo that) { if (that == null) return false; boolean this_present_num_rows = true; boolean that_present_num_rows = true; if (this_present_num_rows || that_present_num_rows) { if (!(this_present_num_rows && that_present_num_rows)) return false; if (this.num_rows != that.num_rows) return false; } boolean this_present_column_data_chunks = true && this.isSetColumn_data_chunks(); boolean that_present_column_data_chunks = true && that.isSetColumn_data_chunks(); if (this_present_column_data_chunks || that_present_column_data_chunks) { if (!(this_present_column_data_chunks && that_present_column_data_chunks)) return false; if (!this.column_data_chunks.equals(that.column_data_chunks)) return false; } return true; }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_num_rows = true; list.add(present_num_rows); if (present_num_rows) list.add(num_rows); boolean present_column_data_chunks = true && (isSetColumn_data_chunks()); list.add(present_column_data_chunks); if (present_column_data_chunks) list.add(column_data_chunks); 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 NUM_ROWS: return isSetNum_rows(); case COLUMN_DATA_CHUNKS: return isSetColumn_data_chunks(); } throw new IllegalStateException(); }
/** * Performs a deep copy on <i>other</i>. */ public BlockletInfo(BlockletInfo other) { __isset_bitfield = other.__isset_bitfield; this.num_rows = other.num_rows; if (other.isSetColumn_data_chunks()) { List<DataChunk> __this__column_data_chunks = new ArrayList<DataChunk>(other.column_data_chunks.size()); for (DataChunk other_element : other.column_data_chunks) { __this__column_data_chunks.add(new DataChunk(other_element)); } this.column_data_chunks = __this__column_data_chunks; } }
@Override public String toString() { StringBuilder sb = new StringBuilder("BlockletInfo("); boolean first = true; sb.append("num_rows:"); sb.append(this.num_rows); first = false; if (isSetColumn_data_chunks()) { if (!first) sb.append(", "); sb.append("column_data_chunks:"); if (this.column_data_chunks == null) { sb.append("null"); } else { sb.append(this.column_data_chunks); } first = false; } sb.append(")"); return sb.toString(); }
@Override public int compareTo(BlockletInfo other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetNum_rows()).compareTo(other.isSetNum_rows()); if (lastComparison != 0) { return lastComparison; } if (isSetNum_rows()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.num_rows, other.num_rows); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetColumn_data_chunks()).compareTo(other.isSetColumn_data_chunks()); if (lastComparison != 0) { return lastComparison; } if (isSetColumn_data_chunks()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.column_data_chunks, other.column_data_chunks); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, BlockletInfo struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; oprot.writeI32(struct.num_rows); BitSet optionals = new BitSet(); if (struct.isSetColumn_data_chunks()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetColumn_data_chunks()) { { oprot.writeI32(struct.column_data_chunks.size()); for (DataChunk _iter100 : struct.column_data_chunks) { _iter100.write(oprot); } } } }
public void write(org.apache.thrift.protocol.TProtocol oprot, BlockletInfo struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(NUM_ROWS_FIELD_DESC); oprot.writeI32(struct.num_rows); oprot.writeFieldEnd(); if (struct.column_data_chunks != null) { if (struct.isSetColumn_data_chunks()) { oprot.writeFieldBegin(COLUMN_DATA_CHUNKS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.column_data_chunks.size())); for (DataChunk _iter99 : struct.column_data_chunks) { _iter99.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }