/** * Autogenerated by Thrift Compiler (0.9.0) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package com.datascience.utils.transformations.thrift.generated; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.protocol.TProtocolException; import org.apache.thrift.EncodingUtils; import org.apache.thrift.TException; import java.util.List; import java.util.ArrayList; import java.util.Map; import java.util.HashMap; import java.util.EnumMap; import java.util.Set; import java.util.HashSet; import java.util.EnumSet; import java.util.Collections; import java.util.BitSet; import java.nio.ByteBuffer; import java.util.Arrays; import org.slf4j.Logger; import org.slf4j.LoggerFactory; public class TWorkerContResults implements org.apache.thrift.TBase<TWorkerContResults, TWorkerContResults._Fields>, java.io.Serializable, Cloneable { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("TWorkerContResults"); private static final org.apache.thrift.protocol.TField EST_RHO_FIELD_DESC = new org.apache.thrift.protocol.TField("est_rho", org.apache.thrift.protocol.TType.DOUBLE, (short)1); private static final org.apache.thrift.protocol.TField EST_MU_FIELD_DESC = new org.apache.thrift.protocol.TField("est_mu", org.apache.thrift.protocol.TType.DOUBLE, (short)2); private static final org.apache.thrift.protocol.TField EST_SIGMA_FIELD_DESC = new org.apache.thrift.protocol.TField("est_sigma", org.apache.thrift.protocol.TType.DOUBLE, (short)3); private static final org.apache.thrift.protocol.TField ZETA_FIELD_DESC = new org.apache.thrift.protocol.TField("zeta", org.apache.thrift.protocol.TType.STRUCT, (short)4); private static final org.apache.thrift.protocol.TField TRUE_MU_FIELD_DESC = new org.apache.thrift.protocol.TField("true_mu", org.apache.thrift.protocol.TType.DOUBLE, (short)5); private static final org.apache.thrift.protocol.TField TRUE_SIGMA_FIELD_DESC = new org.apache.thrift.protocol.TField("true_sigma", org.apache.thrift.protocol.TType.DOUBLE, (short)6); private static final org.apache.thrift.protocol.TField TRUE_RHO_FIELD_DESC = new org.apache.thrift.protocol.TField("true_rho", org.apache.thrift.protocol.TType.DOUBLE, (short)7); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new TWorkerContResultsStandardSchemeFactory()); schemes.put(TupleScheme.class, new TWorkerContResultsTupleSchemeFactory()); } public double est_rho; // required public double est_mu; // required public double est_sigma; // required public TAssigns zeta; // required public double true_mu; // required public double true_sigma; // required public double true_rho; // required /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { EST_RHO((short)1, "est_rho"), EST_MU((short)2, "est_mu"), EST_SIGMA((short)3, "est_sigma"), ZETA((short)4, "zeta"), TRUE_MU((short)5, "true_mu"), TRUE_SIGMA((short)6, "true_sigma"), TRUE_RHO((short)7, "true_rho"); private static final Map<String, _Fields> byName = new HashMap<String, _Fields>(); static { for (_Fields field : EnumSet.allOf(_Fields.class)) { byName.put(field.getFieldName(), field); } } /** * Find the _Fields constant that matches fieldId, or null if its not found. */ public static _Fields findByThriftId(int fieldId) { switch(fieldId) { case 1: // EST_RHO return EST_RHO; case 2: // EST_MU return EST_MU; case 3: // EST_SIGMA return EST_SIGMA; case 4: // ZETA return ZETA; case 5: // TRUE_MU return TRUE_MU; case 6: // TRUE_SIGMA return TRUE_SIGMA; case 7: // TRUE_RHO return TRUE_RHO; default: return null; } } /** * Find the _Fields constant that matches fieldId, throwing an exception * if it is not found. */ public static _Fields findByThriftIdOrThrow(int fieldId) { _Fields fields = findByThriftId(fieldId); if (fields == null) throw new IllegalArgumentException("Field " + fieldId + " doesn't exist!"); return fields; } /** * Find the _Fields constant that matches name, or null if its not found. */ public static _Fields findByName(String name) { return byName.get(name); } private final short _thriftId; private final String _fieldName; _Fields(short thriftId, String fieldName) { _thriftId = thriftId; _fieldName = fieldName; } public short getThriftFieldId() { return _thriftId; } public String getFieldName() { return _fieldName; } } // isset id assignments private static final int __EST_RHO_ISSET_ID = 0; private static final int __EST_MU_ISSET_ID = 1; private static final int __EST_SIGMA_ISSET_ID = 2; private static final int __TRUE_MU_ISSET_ID = 3; private static final int __TRUE_SIGMA_ISSET_ID = 4; private static final int __TRUE_RHO_ISSET_ID = 5; private byte __isset_bitfield = 0; public static final Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> metaDataMap; static { Map<_Fields, org.apache.thrift.meta_data.FieldMetaData> tmpMap = new EnumMap<_Fields, org.apache.thrift.meta_data.FieldMetaData>(_Fields.class); tmpMap.put(_Fields.EST_RHO, new org.apache.thrift.meta_data.FieldMetaData("est_rho", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.EST_MU, new org.apache.thrift.meta_data.FieldMetaData("est_mu", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.EST_SIGMA, new org.apache.thrift.meta_data.FieldMetaData("est_sigma", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.ZETA, new org.apache.thrift.meta_data.FieldMetaData("zeta", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.StructMetaData(org.apache.thrift.protocol.TType.STRUCT, TAssigns.class))); tmpMap.put(_Fields.TRUE_MU, new org.apache.thrift.meta_data.FieldMetaData("true_mu", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.TRUE_SIGMA, new org.apache.thrift.meta_data.FieldMetaData("true_sigma", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.TRUE_RHO, new org.apache.thrift.meta_data.FieldMetaData("true_rho", org.apache.thrift.TFieldRequirementType.DEFAULT, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(TWorkerContResults.class, metaDataMap); } public TWorkerContResults() { } public TWorkerContResults( double est_rho, double est_mu, double est_sigma, TAssigns zeta, double true_mu, double true_sigma, double true_rho) { this(); this.est_rho = est_rho; setEst_rhoIsSet(true); this.est_mu = est_mu; setEst_muIsSet(true); this.est_sigma = est_sigma; setEst_sigmaIsSet(true); this.zeta = zeta; this.true_mu = true_mu; setTrue_muIsSet(true); this.true_sigma = true_sigma; setTrue_sigmaIsSet(true); this.true_rho = true_rho; setTrue_rhoIsSet(true); } /** * Performs a deep copy on <i>other</i>. */ public TWorkerContResults(TWorkerContResults other) { __isset_bitfield = other.__isset_bitfield; this.est_rho = other.est_rho; this.est_mu = other.est_mu; this.est_sigma = other.est_sigma; if (other.isSetZeta()) { this.zeta = new TAssigns(other.zeta); } this.true_mu = other.true_mu; this.true_sigma = other.true_sigma; this.true_rho = other.true_rho; } public TWorkerContResults deepCopy() { return new TWorkerContResults(this); } @Override public void clear() { setEst_rhoIsSet(false); this.est_rho = 0.0; setEst_muIsSet(false); this.est_mu = 0.0; setEst_sigmaIsSet(false); this.est_sigma = 0.0; this.zeta = null; setTrue_muIsSet(false); this.true_mu = 0.0; setTrue_sigmaIsSet(false); this.true_sigma = 0.0; setTrue_rhoIsSet(false); this.true_rho = 0.0; } public double getEst_rho() { return this.est_rho; } public TWorkerContResults setEst_rho(double est_rho) { this.est_rho = est_rho; setEst_rhoIsSet(true); return this; } public void unsetEst_rho() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EST_RHO_ISSET_ID); } /** Returns true if field est_rho is set (has been assigned a value) and false otherwise */ public boolean isSetEst_rho() { return EncodingUtils.testBit(__isset_bitfield, __EST_RHO_ISSET_ID); } public void setEst_rhoIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EST_RHO_ISSET_ID, value); } public double getEst_mu() { return this.est_mu; } public TWorkerContResults setEst_mu(double est_mu) { this.est_mu = est_mu; setEst_muIsSet(true); return this; } public void unsetEst_mu() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EST_MU_ISSET_ID); } /** Returns true if field est_mu is set (has been assigned a value) and false otherwise */ public boolean isSetEst_mu() { return EncodingUtils.testBit(__isset_bitfield, __EST_MU_ISSET_ID); } public void setEst_muIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EST_MU_ISSET_ID, value); } public double getEst_sigma() { return this.est_sigma; } public TWorkerContResults setEst_sigma(double est_sigma) { this.est_sigma = est_sigma; setEst_sigmaIsSet(true); return this; } public void unsetEst_sigma() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EST_SIGMA_ISSET_ID); } /** Returns true if field est_sigma is set (has been assigned a value) and false otherwise */ public boolean isSetEst_sigma() { return EncodingUtils.testBit(__isset_bitfield, __EST_SIGMA_ISSET_ID); } public void setEst_sigmaIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EST_SIGMA_ISSET_ID, value); } public TAssigns getZeta() { return this.zeta; } public TWorkerContResults setZeta(TAssigns zeta) { this.zeta = zeta; return this; } public void unsetZeta() { this.zeta = null; } /** Returns true if field zeta is set (has been assigned a value) and false otherwise */ public boolean isSetZeta() { return this.zeta != null; } public void setZetaIsSet(boolean value) { if (!value) { this.zeta = null; } } public double getTrue_mu() { return this.true_mu; } public TWorkerContResults setTrue_mu(double true_mu) { this.true_mu = true_mu; setTrue_muIsSet(true); return this; } public void unsetTrue_mu() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRUE_MU_ISSET_ID); } /** Returns true if field true_mu is set (has been assigned a value) and false otherwise */ public boolean isSetTrue_mu() { return EncodingUtils.testBit(__isset_bitfield, __TRUE_MU_ISSET_ID); } public void setTrue_muIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRUE_MU_ISSET_ID, value); } public double getTrue_sigma() { return this.true_sigma; } public TWorkerContResults setTrue_sigma(double true_sigma) { this.true_sigma = true_sigma; setTrue_sigmaIsSet(true); return this; } public void unsetTrue_sigma() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRUE_SIGMA_ISSET_ID); } /** Returns true if field true_sigma is set (has been assigned a value) and false otherwise */ public boolean isSetTrue_sigma() { return EncodingUtils.testBit(__isset_bitfield, __TRUE_SIGMA_ISSET_ID); } public void setTrue_sigmaIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRUE_SIGMA_ISSET_ID, value); } public double getTrue_rho() { return this.true_rho; } public TWorkerContResults setTrue_rho(double true_rho) { this.true_rho = true_rho; setTrue_rhoIsSet(true); return this; } public void unsetTrue_rho() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __TRUE_RHO_ISSET_ID); } /** Returns true if field true_rho is set (has been assigned a value) and false otherwise */ public boolean isSetTrue_rho() { return EncodingUtils.testBit(__isset_bitfield, __TRUE_RHO_ISSET_ID); } public void setTrue_rhoIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __TRUE_RHO_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case EST_RHO: if (value == null) { unsetEst_rho(); } else { setEst_rho((Double)value); } break; case EST_MU: if (value == null) { unsetEst_mu(); } else { setEst_mu((Double)value); } break; case EST_SIGMA: if (value == null) { unsetEst_sigma(); } else { setEst_sigma((Double)value); } break; case ZETA: if (value == null) { unsetZeta(); } else { setZeta((TAssigns)value); } break; case TRUE_MU: if (value == null) { unsetTrue_mu(); } else { setTrue_mu((Double)value); } break; case TRUE_SIGMA: if (value == null) { unsetTrue_sigma(); } else { setTrue_sigma((Double)value); } break; case TRUE_RHO: if (value == null) { unsetTrue_rho(); } else { setTrue_rho((Double)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case EST_RHO: return Double.valueOf(getEst_rho()); case EST_MU: return Double.valueOf(getEst_mu()); case EST_SIGMA: return Double.valueOf(getEst_sigma()); case ZETA: return getZeta(); case TRUE_MU: return Double.valueOf(getTrue_mu()); case TRUE_SIGMA: return Double.valueOf(getTrue_sigma()); case TRUE_RHO: return Double.valueOf(getTrue_rho()); } 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 EST_RHO: return isSetEst_rho(); case EST_MU: return isSetEst_mu(); case EST_SIGMA: return isSetEst_sigma(); case ZETA: return isSetZeta(); case TRUE_MU: return isSetTrue_mu(); case TRUE_SIGMA: return isSetTrue_sigma(); case TRUE_RHO: return isSetTrue_rho(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof TWorkerContResults) return this.equals((TWorkerContResults)that); return false; } public boolean equals(TWorkerContResults that) { if (that == null) return false; boolean this_present_est_rho = true; boolean that_present_est_rho = true; if (this_present_est_rho || that_present_est_rho) { if (!(this_present_est_rho && that_present_est_rho)) return false; if (this.est_rho != that.est_rho) return false; } boolean this_present_est_mu = true; boolean that_present_est_mu = true; if (this_present_est_mu || that_present_est_mu) { if (!(this_present_est_mu && that_present_est_mu)) return false; if (this.est_mu != that.est_mu) return false; } boolean this_present_est_sigma = true; boolean that_present_est_sigma = true; if (this_present_est_sigma || that_present_est_sigma) { if (!(this_present_est_sigma && that_present_est_sigma)) return false; if (this.est_sigma != that.est_sigma) return false; } boolean this_present_zeta = true && this.isSetZeta(); boolean that_present_zeta = true && that.isSetZeta(); if (this_present_zeta || that_present_zeta) { if (!(this_present_zeta && that_present_zeta)) return false; if (!this.zeta.equals(that.zeta)) return false; } boolean this_present_true_mu = true; boolean that_present_true_mu = true; if (this_present_true_mu || that_present_true_mu) { if (!(this_present_true_mu && that_present_true_mu)) return false; if (this.true_mu != that.true_mu) return false; } boolean this_present_true_sigma = true; boolean that_present_true_sigma = true; if (this_present_true_sigma || that_present_true_sigma) { if (!(this_present_true_sigma && that_present_true_sigma)) return false; if (this.true_sigma != that.true_sigma) return false; } boolean this_present_true_rho = true; boolean that_present_true_rho = true; if (this_present_true_rho || that_present_true_rho) { if (!(this_present_true_rho && that_present_true_rho)) return false; if (this.true_rho != that.true_rho) return false; } return true; } @Override public int hashCode() { return 0; } public int compareTo(TWorkerContResults other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; TWorkerContResults typedOther = (TWorkerContResults)other; lastComparison = Boolean.valueOf(isSetEst_rho()).compareTo(typedOther.isSetEst_rho()); if (lastComparison != 0) { return lastComparison; } if (isSetEst_rho()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.est_rho, typedOther.est_rho); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEst_mu()).compareTo(typedOther.isSetEst_mu()); if (lastComparison != 0) { return lastComparison; } if (isSetEst_mu()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.est_mu, typedOther.est_mu); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetEst_sigma()).compareTo(typedOther.isSetEst_sigma()); if (lastComparison != 0) { return lastComparison; } if (isSetEst_sigma()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.est_sigma, typedOther.est_sigma); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetZeta()).compareTo(typedOther.isSetZeta()); if (lastComparison != 0) { return lastComparison; } if (isSetZeta()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.zeta, typedOther.zeta); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTrue_mu()).compareTo(typedOther.isSetTrue_mu()); if (lastComparison != 0) { return lastComparison; } if (isSetTrue_mu()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.true_mu, typedOther.true_mu); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTrue_sigma()).compareTo(typedOther.isSetTrue_sigma()); if (lastComparison != 0) { return lastComparison; } if (isSetTrue_sigma()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.true_sigma, typedOther.true_sigma); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetTrue_rho()).compareTo(typedOther.isSetTrue_rho()); if (lastComparison != 0) { return lastComparison; } if (isSetTrue_rho()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.true_rho, typedOther.true_rho); if (lastComparison != 0) { return lastComparison; } } return 0; } public _Fields fieldForId(int fieldId) { return _Fields.findByThriftId(fieldId); } public void read(org.apache.thrift.protocol.TProtocol iprot) throws org.apache.thrift.TException { schemes.get(iprot.getScheme()).getScheme().read(iprot, this); } public void write(org.apache.thrift.protocol.TProtocol oprot) throws org.apache.thrift.TException { schemes.get(oprot.getScheme()).getScheme().write(oprot, this); } @Override public String toString() { StringBuilder sb = new StringBuilder("TWorkerContResults("); boolean first = true; sb.append("est_rho:"); sb.append(this.est_rho); first = false; if (!first) sb.append(", "); sb.append("est_mu:"); sb.append(this.est_mu); first = false; if (!first) sb.append(", "); sb.append("est_sigma:"); sb.append(this.est_sigma); first = false; if (!first) sb.append(", "); sb.append("zeta:"); if (this.zeta == null) { sb.append("null"); } else { sb.append(this.zeta); } first = false; if (!first) sb.append(", "); sb.append("true_mu:"); sb.append(this.true_mu); first = false; if (!first) sb.append(", "); sb.append("true_sigma:"); sb.append(this.true_sigma); first = false; if (!first) sb.append(", "); sb.append("true_rho:"); sb.append(this.true_rho); first = false; sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity if (zeta != null) { zeta.validate(); } } private void writeObject(java.io.ObjectOutputStream out) throws java.io.IOException { try { write(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(out))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private void readObject(java.io.ObjectInputStream in) throws java.io.IOException, ClassNotFoundException { try { // it doesn't seem like you should have to do this, but java serialization is wacky, and doesn't call the default constructor. __isset_bitfield = 0; read(new org.apache.thrift.protocol.TCompactProtocol(new org.apache.thrift.transport.TIOStreamTransport(in))); } catch (org.apache.thrift.TException te) { throw new java.io.IOException(te); } } private static class TWorkerContResultsStandardSchemeFactory implements SchemeFactory { public TWorkerContResultsStandardScheme getScheme() { return new TWorkerContResultsStandardScheme(); } } private static class TWorkerContResultsStandardScheme extends StandardScheme<TWorkerContResults> { public void read(org.apache.thrift.protocol.TProtocol iprot, TWorkerContResults struct) throws org.apache.thrift.TException { org.apache.thrift.protocol.TField schemeField; iprot.readStructBegin(); while (true) { schemeField = iprot.readFieldBegin(); if (schemeField.type == org.apache.thrift.protocol.TType.STOP) { break; } switch (schemeField.id) { case 1: // EST_RHO if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.est_rho = iprot.readDouble(); struct.setEst_rhoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // EST_MU if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.est_mu = iprot.readDouble(); struct.setEst_muIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // EST_SIGMA if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.est_sigma = iprot.readDouble(); struct.setEst_sigmaIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // ZETA if (schemeField.type == org.apache.thrift.protocol.TType.STRUCT) { struct.zeta = new TAssigns(); struct.zeta.read(iprot); struct.setZetaIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // TRUE_MU if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.true_mu = iprot.readDouble(); struct.setTrue_muIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // TRUE_SIGMA if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.true_sigma = iprot.readDouble(); struct.setTrue_sigmaIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // TRUE_RHO if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.true_rho = iprot.readDouble(); struct.setTrue_rhoIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; default: org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } iprot.readFieldEnd(); } iprot.readStructEnd(); // check for required fields of primitive type, which can't be checked in the validate method struct.validate(); } public void write(org.apache.thrift.protocol.TProtocol oprot, TWorkerContResults struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); oprot.writeFieldBegin(EST_RHO_FIELD_DESC); oprot.writeDouble(struct.est_rho); oprot.writeFieldEnd(); oprot.writeFieldBegin(EST_MU_FIELD_DESC); oprot.writeDouble(struct.est_mu); oprot.writeFieldEnd(); oprot.writeFieldBegin(EST_SIGMA_FIELD_DESC); oprot.writeDouble(struct.est_sigma); oprot.writeFieldEnd(); if (struct.zeta != null) { oprot.writeFieldBegin(ZETA_FIELD_DESC); struct.zeta.write(oprot); oprot.writeFieldEnd(); } oprot.writeFieldBegin(TRUE_MU_FIELD_DESC); oprot.writeDouble(struct.true_mu); oprot.writeFieldEnd(); oprot.writeFieldBegin(TRUE_SIGMA_FIELD_DESC); oprot.writeDouble(struct.true_sigma); oprot.writeFieldEnd(); oprot.writeFieldBegin(TRUE_RHO_FIELD_DESC); oprot.writeDouble(struct.true_rho); oprot.writeFieldEnd(); oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class TWorkerContResultsTupleSchemeFactory implements SchemeFactory { public TWorkerContResultsTupleScheme getScheme() { return new TWorkerContResultsTupleScheme(); } } private static class TWorkerContResultsTupleScheme extends TupleScheme<TWorkerContResults> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, TWorkerContResults struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetEst_rho()) { optionals.set(0); } if (struct.isSetEst_mu()) { optionals.set(1); } if (struct.isSetEst_sigma()) { optionals.set(2); } if (struct.isSetZeta()) { optionals.set(3); } if (struct.isSetTrue_mu()) { optionals.set(4); } if (struct.isSetTrue_sigma()) { optionals.set(5); } if (struct.isSetTrue_rho()) { optionals.set(6); } oprot.writeBitSet(optionals, 7); if (struct.isSetEst_rho()) { oprot.writeDouble(struct.est_rho); } if (struct.isSetEst_mu()) { oprot.writeDouble(struct.est_mu); } if (struct.isSetEst_sigma()) { oprot.writeDouble(struct.est_sigma); } if (struct.isSetZeta()) { struct.zeta.write(oprot); } if (struct.isSetTrue_mu()) { oprot.writeDouble(struct.true_mu); } if (struct.isSetTrue_sigma()) { oprot.writeDouble(struct.true_sigma); } if (struct.isSetTrue_rho()) { oprot.writeDouble(struct.true_rho); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, TWorkerContResults struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(7); if (incoming.get(0)) { struct.est_rho = iprot.readDouble(); struct.setEst_rhoIsSet(true); } if (incoming.get(1)) { struct.est_mu = iprot.readDouble(); struct.setEst_muIsSet(true); } if (incoming.get(2)) { struct.est_sigma = iprot.readDouble(); struct.setEst_sigmaIsSet(true); } if (incoming.get(3)) { struct.zeta = new TAssigns(); struct.zeta.read(iprot); struct.setZetaIsSet(true); } if (incoming.get(4)) { struct.true_mu = iprot.readDouble(); struct.setTrue_muIsSet(true); } if (incoming.get(5)) { struct.true_sigma = iprot.readDouble(); struct.setTrue_sigmaIsSet(true); } if (incoming.get(6)) { struct.true_rho = iprot.readDouble(); struct.setTrue_rhoIsSet(true); } } } }