/** 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 TABLE_STATS: return isSetTableStats(); case IS_STATS_COMPLIANT: return isSetIsStatsCompliant(); } throw new IllegalStateException(); }
@Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_tableStats = true && (isSetTableStats()); list.add(present_tableStats); if (present_tableStats) list.add(tableStats); boolean present_isStatsCompliant = true && (isSetIsStatsCompliant()); list.add(present_isStatsCompliant); if (present_isStatsCompliant) list.add(isStatsCompliant); return list.hashCode(); }
@Override public String toString() { StringBuilder sb = new StringBuilder("TableStatsResult("); boolean first = true; sb.append("tableStats:"); if (this.tableStats == null) { sb.append("null"); } else { sb.append(this.tableStats); } first = false; if (isSetIsStatsCompliant()) { if (!first) sb.append(", "); sb.append("isStatsCompliant:"); sb.append(this.isStatsCompliant); first = false; } sb.append(")"); return sb.toString(); }
public boolean equals(TableStatsResult that) { if (that == null) return false; boolean this_present_tableStats = true && this.isSetTableStats(); boolean that_present_tableStats = true && that.isSetTableStats(); if (this_present_tableStats || that_present_tableStats) { if (!(this_present_tableStats && that_present_tableStats)) return false; if (!this.tableStats.equals(that.tableStats)) return false; } boolean this_present_isStatsCompliant = true && this.isSetIsStatsCompliant(); boolean that_present_isStatsCompliant = true && that.isSetIsStatsCompliant(); if (this_present_isStatsCompliant || that_present_isStatsCompliant) { if (!(this_present_isStatsCompliant && that_present_isStatsCompliant)) return false; if (this.isStatsCompliant != that.isStatsCompliant) return false; } return true; }
@Override public int compareTo(TableStatsResult other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetTableStats()).compareTo(other.isSetTableStats()); if (lastComparison != 0) { return lastComparison; } if (isSetTableStats()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.tableStats, other.tableStats); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetIsStatsCompliant()).compareTo(other.isSetIsStatsCompliant()); if (lastComparison != 0) { return lastComparison; } if (isSetIsStatsCompliant()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.isStatsCompliant, other.isStatsCompliant); if (lastComparison != 0) { return lastComparison; } } return 0; }
@Override public void write(org.apache.thrift.protocol.TProtocol prot, TableStatsResult struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; { oprot.writeI32(struct.tableStats.size()); for (ColumnStatisticsObj _iter436 : struct.tableStats) { _iter436.write(oprot); } } BitSet optionals = new BitSet(); if (struct.isSetIsStatsCompliant()) { optionals.set(0); } oprot.writeBitSet(optionals, 1); if (struct.isSetIsStatsCompliant()) { oprot.writeBool(struct.isStatsCompliant); } }
public void write(org.apache.thrift.protocol.TProtocol oprot, TableStatsResult struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.tableStats != null) { oprot.writeFieldBegin(TABLE_STATS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.STRUCT, struct.tableStats.size())); for (ColumnStatisticsObj _iter435 : struct.tableStats) { _iter435.write(oprot); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } if (struct.isSetIsStatsCompliant()) { oprot.writeFieldBegin(IS_STATS_COMPLIANT_FIELD_DESC); oprot.writeBool(struct.isStatsCompliant); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); }