/** 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 MIN_MAX_INDEX: return isSetMin_max_index(); case B_TREE_INDEX: return isSetB_tree_index(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_min_max_index = true && (isSetMin_max_index()); list.add(present_min_max_index); if (present_min_max_index) list.add(min_max_index); boolean present_b_tree_index = true && (isSetB_tree_index()); list.add(present_b_tree_index); if (present_b_tree_index) list.add(b_tree_index); return list.hashCode(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("BlockletIndex("); boolean first = true; if (isSetMin_max_index()) { sb.append("min_max_index:"); if (this.min_max_index == null) { sb.append("null"); } else { sb.append(this.min_max_index); } first = false; } if (isSetB_tree_index()) { if (!first) sb.append(", "); sb.append("b_tree_index:"); if (this.b_tree_index == null) { sb.append("null"); } else { sb.append(this.b_tree_index); } first = false; } sb.append(")"); return sb.toString(); }
@Override public int compareTo(BlockletIndex other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetMin_max_index()).compareTo(other.isSetMin_max_index()); if (lastComparison != 0) { return lastComparison; } if (isSetMin_max_index()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.min_max_index, other.min_max_index); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetB_tree_index()).compareTo(other.isSetB_tree_index()); if (lastComparison != 0) { return lastComparison; } if (isSetB_tree_index()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.b_tree_index, other.b_tree_index); if (lastComparison != 0) { return lastComparison; } } return 0; }
public void write(org.apache.thrift.protocol.TProtocol oprot, BlockletIndex struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.min_max_index != null) { if (struct.isSetMin_max_index()) { oprot.writeFieldBegin(MIN_MAX_INDEX_FIELD_DESC); struct.min_max_index.write(oprot); oprot.writeFieldEnd(); } } if (struct.b_tree_index != null) { if (struct.isSetB_tree_index()) { oprot.writeFieldBegin(B_TREE_INDEX_FIELD_DESC); struct.b_tree_index.write(oprot); oprot.writeFieldEnd(); } } oprot.writeFieldStop(); oprot.writeStructEnd(); }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, BlockletIndex struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetMin_max_index()) { optionals.set(0); } if (struct.isSetB_tree_index()) { optionals.set(1); } oprot.writeBitSet(optionals, 2); if (struct.isSetMin_max_index()) { struct.min_max_index.write(oprot); } if (struct.isSetB_tree_index()) { struct.b_tree_index.write(oprot); } }
/** * Performs a deep copy on <i>other</i>. */ public BlockletIndex(BlockletIndex other) { if (other.isSetMin_max_index()) { this.min_max_index = new BlockletMinMaxIndex(other.min_max_index); } if (other.isSetB_tree_index()) { this.b_tree_index = new BlockletBTreeIndex(other.b_tree_index); } }
public boolean equals(BlockletIndex that) { if (that == null) return false; boolean this_present_min_max_index = true && this.isSetMin_max_index(); boolean that_present_min_max_index = true && that.isSetMin_max_index(); if (this_present_min_max_index || that_present_min_max_index) { if (!(this_present_min_max_index && that_present_min_max_index)) return false; if (!this.min_max_index.equals(that.min_max_index)) return false; } boolean this_present_b_tree_index = true && this.isSetB_tree_index(); boolean that_present_b_tree_index = true && that.isSetB_tree_index(); if (this_present_b_tree_index || that_present_b_tree_index) { if (!(this_present_b_tree_index && that_present_b_tree_index)) return false; if (!this.b_tree_index.equals(that.b_tree_index)) return false; } return true; }