/** * Autogenerated by Thrift Compiler (0.9.2) * * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING * @generated */ package edu.berkeley.cs.amplab.carat.thrift; import android.annotation.SuppressLint; import java.util.ArrayList; import java.util.BitSet; import java.util.Collections; import java.util.EnumMap; import java.util.EnumSet; import java.util.HashMap; import java.util.List; import java.util.Map; import javax.annotation.Generated; import org.apache.thrift.EncodingUtils; import org.apache.thrift.protocol.TTupleProtocol; import org.apache.thrift.scheme.IScheme; import org.apache.thrift.scheme.SchemeFactory; import org.apache.thrift.scheme.StandardScheme; import org.apache.thrift.scheme.TupleScheme; @SuppressLint("NewApi") @SuppressWarnings({"cast", "rawtypes", "serial", "unchecked"}) @Generated(value = "Autogenerated by Thrift Compiler (0.9.2)", date = "2014-12-19") public class DetailScreenReport implements org.apache.thrift.TBase<DetailScreenReport, DetailScreenReport._Fields>, java.io.Serializable, Cloneable, Comparable<DetailScreenReport> { private static final org.apache.thrift.protocol.TStruct STRUCT_DESC = new org.apache.thrift.protocol.TStruct("DetailScreenReport"); private static final org.apache.thrift.protocol.TField SCORE_FIELD_DESC = new org.apache.thrift.protocol.TField("score", org.apache.thrift.protocol.TType.DOUBLE, (short)1); private static final org.apache.thrift.protocol.TField X_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("xVals", org.apache.thrift.protocol.TType.LIST, (short)2); private static final org.apache.thrift.protocol.TField Y_VALS_FIELD_DESC = new org.apache.thrift.protocol.TField("yVals", org.apache.thrift.protocol.TType.LIST, (short)3); private static final org.apache.thrift.protocol.TField EXPECTED_VALUE_FIELD_DESC = new org.apache.thrift.protocol.TField("expectedValue", org.apache.thrift.protocol.TType.DOUBLE, (short)4); private static final org.apache.thrift.protocol.TField ERROR_FIELD_DESC = new org.apache.thrift.protocol.TField("error", org.apache.thrift.protocol.TType.DOUBLE, (short)5); private static final org.apache.thrift.protocol.TField ERROR_WITHOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("errorWithout", org.apache.thrift.protocol.TType.DOUBLE, (short)6); private static final org.apache.thrift.protocol.TField SAMPLES_FIELD_DESC = new org.apache.thrift.protocol.TField("samples", org.apache.thrift.protocol.TType.DOUBLE, (short)7); private static final org.apache.thrift.protocol.TField SAMPLES_WITHOUT_FIELD_DESC = new org.apache.thrift.protocol.TField("samplesWithout", org.apache.thrift.protocol.TType.DOUBLE, (short)8); private static final Map<Class<? extends IScheme>, SchemeFactory> schemes = new HashMap<Class<? extends IScheme>, SchemeFactory>(); static { schemes.put(StandardScheme.class, new DetailScreenReportStandardSchemeFactory()); schemes.put(TupleScheme.class, new DetailScreenReportTupleSchemeFactory()); } public double score; // optional public List<Double> xVals; // optional public List<Double> yVals; // optional public double expectedValue; // optional public double error; // optional public double errorWithout; // optional public double samples; // optional public double samplesWithout; // optional /** The set of fields this struct contains, along with convenience methods for finding and manipulating them. */ public enum _Fields implements org.apache.thrift.TFieldIdEnum { SCORE((short)1, "score"), X_VALS((short)2, "xVals"), Y_VALS((short)3, "yVals"), EXPECTED_VALUE((short)4, "expectedValue"), ERROR((short)5, "error"), ERROR_WITHOUT((short)6, "errorWithout"), SAMPLES((short)7, "samples"), SAMPLES_WITHOUT((short)8, "samplesWithout"); 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: // SCORE return SCORE; case 2: // X_VALS return X_VALS; case 3: // Y_VALS return Y_VALS; case 4: // EXPECTED_VALUE return EXPECTED_VALUE; case 5: // ERROR return ERROR; case 6: // ERROR_WITHOUT return ERROR_WITHOUT; case 7: // SAMPLES return SAMPLES; case 8: // SAMPLES_WITHOUT return SAMPLES_WITHOUT; 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 __SCORE_ISSET_ID = 0; private static final int __EXPECTEDVALUE_ISSET_ID = 1; private static final int __ERROR_ISSET_ID = 2; private static final int __ERRORWITHOUT_ISSET_ID = 3; private static final int __SAMPLES_ISSET_ID = 4; private static final int __SAMPLESWITHOUT_ISSET_ID = 5; private byte __isset_bitfield = 0; private static final _Fields optionals[] = {_Fields.SCORE,_Fields.X_VALS,_Fields.Y_VALS,_Fields.EXPECTED_VALUE,_Fields.ERROR,_Fields.ERROR_WITHOUT,_Fields.SAMPLES,_Fields.SAMPLES_WITHOUT}; 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.SCORE, new org.apache.thrift.meta_data.FieldMetaData("score", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.X_VALS, new org.apache.thrift.meta_data.FieldMetaData("xVals", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))); tmpMap.put(_Fields.Y_VALS, new org.apache.thrift.meta_data.FieldMetaData("yVals", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.ListMetaData(org.apache.thrift.protocol.TType.LIST, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE)))); tmpMap.put(_Fields.EXPECTED_VALUE, new org.apache.thrift.meta_data.FieldMetaData("expectedValue", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.ERROR, new org.apache.thrift.meta_data.FieldMetaData("error", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.ERROR_WITHOUT, new org.apache.thrift.meta_data.FieldMetaData("errorWithout", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.SAMPLES, new org.apache.thrift.meta_data.FieldMetaData("samples", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); tmpMap.put(_Fields.SAMPLES_WITHOUT, new org.apache.thrift.meta_data.FieldMetaData("samplesWithout", org.apache.thrift.TFieldRequirementType.OPTIONAL, new org.apache.thrift.meta_data.FieldValueMetaData(org.apache.thrift.protocol.TType.DOUBLE))); metaDataMap = Collections.unmodifiableMap(tmpMap); org.apache.thrift.meta_data.FieldMetaData.addStructMetaDataMap(DetailScreenReport.class, metaDataMap); } public DetailScreenReport() { } /** * Performs a deep copy on <i>other</i>. */ public DetailScreenReport(DetailScreenReport other) { __isset_bitfield = other.__isset_bitfield; this.score = other.score; if (other.isSetXVals()) { List<Double> __this__xVals = new ArrayList<Double>(other.xVals); this.xVals = __this__xVals; } if (other.isSetYVals()) { List<Double> __this__yVals = new ArrayList<Double>(other.yVals); this.yVals = __this__yVals; } this.expectedValue = other.expectedValue; this.error = other.error; this.errorWithout = other.errorWithout; this.samples = other.samples; this.samplesWithout = other.samplesWithout; } public DetailScreenReport deepCopy() { return new DetailScreenReport(this); } @Override public void clear() { setScoreIsSet(false); this.score = 0.0; this.xVals = null; this.yVals = null; setExpectedValueIsSet(false); this.expectedValue = 0.0; setErrorIsSet(false); this.error = 0.0; setErrorWithoutIsSet(false); this.errorWithout = 0.0; setSamplesIsSet(false); this.samples = 0.0; setSamplesWithoutIsSet(false); this.samplesWithout = 0.0; } public double getScore() { return this.score; } public DetailScreenReport setScore(double score) { this.score = score; setScoreIsSet(true); return this; } public void unsetScore() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SCORE_ISSET_ID); } /** Returns true if field score is set (has been assigned a value) and false otherwise */ public boolean isSetScore() { return EncodingUtils.testBit(__isset_bitfield, __SCORE_ISSET_ID); } public void setScoreIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SCORE_ISSET_ID, value); } public int getXValsSize() { return (this.xVals == null) ? 0 : this.xVals.size(); } public java.util.Iterator<Double> getXValsIterator() { return (this.xVals == null) ? null : this.xVals.iterator(); } public void addToXVals(double elem) { if (this.xVals == null) { this.xVals = new ArrayList<Double>(); } this.xVals.add(elem); } public List<Double> getXVals() { return this.xVals; } public DetailScreenReport setXVals(List<Double> xVals) { this.xVals = xVals; return this; } public void unsetXVals() { this.xVals = null; } /** Returns true if field xVals is set (has been assigned a value) and false otherwise */ public boolean isSetXVals() { return this.xVals != null; } public void setXValsIsSet(boolean value) { if (!value) { this.xVals = null; } } public int getYValsSize() { return (this.yVals == null) ? 0 : this.yVals.size(); } public java.util.Iterator<Double> getYValsIterator() { return (this.yVals == null) ? null : this.yVals.iterator(); } public void addToYVals(double elem) { if (this.yVals == null) { this.yVals = new ArrayList<Double>(); } this.yVals.add(elem); } public List<Double> getYVals() { return this.yVals; } public DetailScreenReport setYVals(List<Double> yVals) { this.yVals = yVals; return this; } public void unsetYVals() { this.yVals = null; } /** Returns true if field yVals is set (has been assigned a value) and false otherwise */ public boolean isSetYVals() { return this.yVals != null; } public void setYValsIsSet(boolean value) { if (!value) { this.yVals = null; } } public double getExpectedValue() { return this.expectedValue; } public DetailScreenReport setExpectedValue(double expectedValue) { this.expectedValue = expectedValue; setExpectedValueIsSet(true); return this; } public void unsetExpectedValue() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __EXPECTEDVALUE_ISSET_ID); } /** Returns true if field expectedValue is set (has been assigned a value) and false otherwise */ public boolean isSetExpectedValue() { return EncodingUtils.testBit(__isset_bitfield, __EXPECTEDVALUE_ISSET_ID); } public void setExpectedValueIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __EXPECTEDVALUE_ISSET_ID, value); } public double getError() { return this.error; } public DetailScreenReport setError(double error) { this.error = error; setErrorIsSet(true); return this; } public void unsetError() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERROR_ISSET_ID); } /** Returns true if field error is set (has been assigned a value) and false otherwise */ public boolean isSetError() { return EncodingUtils.testBit(__isset_bitfield, __ERROR_ISSET_ID); } public void setErrorIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERROR_ISSET_ID, value); } public double getErrorWithout() { return this.errorWithout; } public DetailScreenReport setErrorWithout(double errorWithout) { this.errorWithout = errorWithout; setErrorWithoutIsSet(true); return this; } public void unsetErrorWithout() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __ERRORWITHOUT_ISSET_ID); } /** Returns true if field errorWithout is set (has been assigned a value) and false otherwise */ public boolean isSetErrorWithout() { return EncodingUtils.testBit(__isset_bitfield, __ERRORWITHOUT_ISSET_ID); } public void setErrorWithoutIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __ERRORWITHOUT_ISSET_ID, value); } public double getSamples() { return this.samples; } public DetailScreenReport setSamples(double samples) { this.samples = samples; setSamplesIsSet(true); return this; } public void unsetSamples() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SAMPLES_ISSET_ID); } /** Returns true if field samples is set (has been assigned a value) and false otherwise */ public boolean isSetSamples() { return EncodingUtils.testBit(__isset_bitfield, __SAMPLES_ISSET_ID); } public void setSamplesIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SAMPLES_ISSET_ID, value); } public double getSamplesWithout() { return this.samplesWithout; } public DetailScreenReport setSamplesWithout(double samplesWithout) { this.samplesWithout = samplesWithout; setSamplesWithoutIsSet(true); return this; } public void unsetSamplesWithout() { __isset_bitfield = EncodingUtils.clearBit(__isset_bitfield, __SAMPLESWITHOUT_ISSET_ID); } /** Returns true if field samplesWithout is set (has been assigned a value) and false otherwise */ public boolean isSetSamplesWithout() { return EncodingUtils.testBit(__isset_bitfield, __SAMPLESWITHOUT_ISSET_ID); } public void setSamplesWithoutIsSet(boolean value) { __isset_bitfield = EncodingUtils.setBit(__isset_bitfield, __SAMPLESWITHOUT_ISSET_ID, value); } public void setFieldValue(_Fields field, Object value) { switch (field) { case SCORE: if (value == null) { unsetScore(); } else { setScore((Double)value); } break; case X_VALS: if (value == null) { unsetXVals(); } else { setXVals((List<Double>)value); } break; case Y_VALS: if (value == null) { unsetYVals(); } else { setYVals((List<Double>)value); } break; case EXPECTED_VALUE: if (value == null) { unsetExpectedValue(); } else { setExpectedValue((Double)value); } break; case ERROR: if (value == null) { unsetError(); } else { setError((Double)value); } break; case ERROR_WITHOUT: if (value == null) { unsetErrorWithout(); } else { setErrorWithout((Double)value); } break; case SAMPLES: if (value == null) { unsetSamples(); } else { setSamples((Double)value); } break; case SAMPLES_WITHOUT: if (value == null) { unsetSamplesWithout(); } else { setSamplesWithout((Double)value); } break; } } public Object getFieldValue(_Fields field) { switch (field) { case SCORE: return Double.valueOf(getScore()); case X_VALS: return getXVals(); case Y_VALS: return getYVals(); case EXPECTED_VALUE: return Double.valueOf(getExpectedValue()); case ERROR: return Double.valueOf(getError()); case ERROR_WITHOUT: return Double.valueOf(getErrorWithout()); case SAMPLES: return Double.valueOf(getSamples()); case SAMPLES_WITHOUT: return Double.valueOf(getSamplesWithout()); } 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 SCORE: return isSetScore(); case X_VALS: return isSetXVals(); case Y_VALS: return isSetYVals(); case EXPECTED_VALUE: return isSetExpectedValue(); case ERROR: return isSetError(); case ERROR_WITHOUT: return isSetErrorWithout(); case SAMPLES: return isSetSamples(); case SAMPLES_WITHOUT: return isSetSamplesWithout(); } throw new IllegalStateException(); } @Override public boolean equals(Object that) { if (that == null) return false; if (that instanceof DetailScreenReport) return this.equals((DetailScreenReport)that); return false; } public boolean equals(DetailScreenReport that) { if (that == null) return false; boolean this_present_score = true && this.isSetScore(); boolean that_present_score = true && that.isSetScore(); if (this_present_score || that_present_score) { if (!(this_present_score && that_present_score)) return false; if (this.score != that.score) return false; } boolean this_present_xVals = true && this.isSetXVals(); boolean that_present_xVals = true && that.isSetXVals(); if (this_present_xVals || that_present_xVals) { if (!(this_present_xVals && that_present_xVals)) return false; if (!this.xVals.equals(that.xVals)) return false; } boolean this_present_yVals = true && this.isSetYVals(); boolean that_present_yVals = true && that.isSetYVals(); if (this_present_yVals || that_present_yVals) { if (!(this_present_yVals && that_present_yVals)) return false; if (!this.yVals.equals(that.yVals)) return false; } boolean this_present_expectedValue = true && this.isSetExpectedValue(); boolean that_present_expectedValue = true && that.isSetExpectedValue(); if (this_present_expectedValue || that_present_expectedValue) { if (!(this_present_expectedValue && that_present_expectedValue)) return false; if (this.expectedValue != that.expectedValue) return false; } boolean this_present_error = true && this.isSetError(); boolean that_present_error = true && that.isSetError(); if (this_present_error || that_present_error) { if (!(this_present_error && that_present_error)) return false; if (this.error != that.error) return false; } boolean this_present_errorWithout = true && this.isSetErrorWithout(); boolean that_present_errorWithout = true && that.isSetErrorWithout(); if (this_present_errorWithout || that_present_errorWithout) { if (!(this_present_errorWithout && that_present_errorWithout)) return false; if (this.errorWithout != that.errorWithout) return false; } boolean this_present_samples = true && this.isSetSamples(); boolean that_present_samples = true && that.isSetSamples(); if (this_present_samples || that_present_samples) { if (!(this_present_samples && that_present_samples)) return false; if (this.samples != that.samples) return false; } boolean this_present_samplesWithout = true && this.isSetSamplesWithout(); boolean that_present_samplesWithout = true && that.isSetSamplesWithout(); if (this_present_samplesWithout || that_present_samplesWithout) { if (!(this_present_samplesWithout && that_present_samplesWithout)) return false; if (this.samplesWithout != that.samplesWithout) return false; } return true; } @Override public int hashCode() { List<Object> list = new ArrayList<Object>(); boolean present_score = true && (isSetScore()); list.add(present_score); if (present_score) list.add(score); boolean present_xVals = true && (isSetXVals()); list.add(present_xVals); if (present_xVals) list.add(xVals); boolean present_yVals = true && (isSetYVals()); list.add(present_yVals); if (present_yVals) list.add(yVals); boolean present_expectedValue = true && (isSetExpectedValue()); list.add(present_expectedValue); if (present_expectedValue) list.add(expectedValue); boolean present_error = true && (isSetError()); list.add(present_error); if (present_error) list.add(error); boolean present_errorWithout = true && (isSetErrorWithout()); list.add(present_errorWithout); if (present_errorWithout) list.add(errorWithout); boolean present_samples = true && (isSetSamples()); list.add(present_samples); if (present_samples) list.add(samples); boolean present_samplesWithout = true && (isSetSamplesWithout()); list.add(present_samplesWithout); if (present_samplesWithout) list.add(samplesWithout); return list.hashCode(); } @Override public int compareTo(DetailScreenReport other) { if (!getClass().equals(other.getClass())) { return getClass().getName().compareTo(other.getClass().getName()); } int lastComparison = 0; lastComparison = Boolean.valueOf(isSetScore()).compareTo(other.isSetScore()); if (lastComparison != 0) { return lastComparison; } if (isSetScore()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.score, other.score); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetXVals()).compareTo(other.isSetXVals()); if (lastComparison != 0) { return lastComparison; } if (isSetXVals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.xVals, other.xVals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetYVals()).compareTo(other.isSetYVals()); if (lastComparison != 0) { return lastComparison; } if (isSetYVals()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.yVals, other.yVals); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetExpectedValue()).compareTo(other.isSetExpectedValue()); if (lastComparison != 0) { return lastComparison; } if (isSetExpectedValue()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.expectedValue, other.expectedValue); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetError()).compareTo(other.isSetError()); if (lastComparison != 0) { return lastComparison; } if (isSetError()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.error, other.error); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetErrorWithout()).compareTo(other.isSetErrorWithout()); if (lastComparison != 0) { return lastComparison; } if (isSetErrorWithout()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.errorWithout, other.errorWithout); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSamples()).compareTo(other.isSetSamples()); if (lastComparison != 0) { return lastComparison; } if (isSetSamples()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.samples, other.samples); if (lastComparison != 0) { return lastComparison; } } lastComparison = Boolean.valueOf(isSetSamplesWithout()).compareTo(other.isSetSamplesWithout()); if (lastComparison != 0) { return lastComparison; } if (isSetSamplesWithout()) { lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.samplesWithout, other.samplesWithout); 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("DetailScreenReport("); boolean first = true; if (isSetScore()) { sb.append("score:"); sb.append(this.score); first = false; } if (isSetXVals()) { if (!first) sb.append(", "); sb.append("xVals:"); if (this.xVals == null) { sb.append("null"); } else { sb.append(this.xVals); } first = false; } if (isSetYVals()) { if (!first) sb.append(", "); sb.append("yVals:"); if (this.yVals == null) { sb.append("null"); } else { sb.append(this.yVals); } first = false; } if (isSetExpectedValue()) { if (!first) sb.append(", "); sb.append("expectedValue:"); sb.append(this.expectedValue); first = false; } if (isSetError()) { if (!first) sb.append(", "); sb.append("error:"); sb.append(this.error); first = false; } if (isSetErrorWithout()) { if (!first) sb.append(", "); sb.append("errorWithout:"); sb.append(this.errorWithout); first = false; } if (isSetSamples()) { if (!first) sb.append(", "); sb.append("samples:"); sb.append(this.samples); first = false; } if (isSetSamplesWithout()) { if (!first) sb.append(", "); sb.append("samplesWithout:"); sb.append(this.samplesWithout); first = false; } sb.append(")"); return sb.toString(); } public void validate() throws org.apache.thrift.TException { // check for required fields // check for sub-struct validity } 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 DetailScreenReportStandardSchemeFactory implements SchemeFactory { public DetailScreenReportStandardScheme getScheme() { return new DetailScreenReportStandardScheme(); } } private static class DetailScreenReportStandardScheme extends StandardScheme<DetailScreenReport> { public void read(org.apache.thrift.protocol.TProtocol iprot, DetailScreenReport 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: // SCORE if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.score = iprot.readDouble(); struct.setScoreIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 2: // X_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list32 = iprot.readListBegin(); struct.xVals = new ArrayList<Double>(_list32.size); double _elem33; for (int _i34 = 0; _i34 < _list32.size; ++_i34) { _elem33 = iprot.readDouble(); struct.xVals.add(_elem33); } iprot.readListEnd(); } struct.setXValsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 3: // Y_VALS if (schemeField.type == org.apache.thrift.protocol.TType.LIST) { { org.apache.thrift.protocol.TList _list35 = iprot.readListBegin(); struct.yVals = new ArrayList<Double>(_list35.size); double _elem36; for (int _i37 = 0; _i37 < _list35.size; ++_i37) { _elem36 = iprot.readDouble(); struct.yVals.add(_elem36); } iprot.readListEnd(); } struct.setYValsIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 4: // EXPECTED_VALUE if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.expectedValue = iprot.readDouble(); struct.setExpectedValueIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 5: // ERROR if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.error = iprot.readDouble(); struct.setErrorIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 6: // ERROR_WITHOUT if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.errorWithout = iprot.readDouble(); struct.setErrorWithoutIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 7: // SAMPLES if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.samples = iprot.readDouble(); struct.setSamplesIsSet(true); } else { org.apache.thrift.protocol.TProtocolUtil.skip(iprot, schemeField.type); } break; case 8: // SAMPLES_WITHOUT if (schemeField.type == org.apache.thrift.protocol.TType.DOUBLE) { struct.samplesWithout = iprot.readDouble(); struct.setSamplesWithoutIsSet(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, DetailScreenReport struct) throws org.apache.thrift.TException { struct.validate(); oprot.writeStructBegin(STRUCT_DESC); if (struct.isSetScore()) { oprot.writeFieldBegin(SCORE_FIELD_DESC); oprot.writeDouble(struct.score); oprot.writeFieldEnd(); } if (struct.xVals != null) { if (struct.isSetXVals()) { oprot.writeFieldBegin(X_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.xVals.size())); for (double _iter38 : struct.xVals) { oprot.writeDouble(_iter38); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } if (struct.yVals != null) { if (struct.isSetYVals()) { oprot.writeFieldBegin(Y_VALS_FIELD_DESC); { oprot.writeListBegin(new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, struct.yVals.size())); for (double _iter39 : struct.yVals) { oprot.writeDouble(_iter39); } oprot.writeListEnd(); } oprot.writeFieldEnd(); } } if (struct.isSetExpectedValue()) { oprot.writeFieldBegin(EXPECTED_VALUE_FIELD_DESC); oprot.writeDouble(struct.expectedValue); oprot.writeFieldEnd(); } if (struct.isSetError()) { oprot.writeFieldBegin(ERROR_FIELD_DESC); oprot.writeDouble(struct.error); oprot.writeFieldEnd(); } if (struct.isSetErrorWithout()) { oprot.writeFieldBegin(ERROR_WITHOUT_FIELD_DESC); oprot.writeDouble(struct.errorWithout); oprot.writeFieldEnd(); } if (struct.isSetSamples()) { oprot.writeFieldBegin(SAMPLES_FIELD_DESC); oprot.writeDouble(struct.samples); oprot.writeFieldEnd(); } if (struct.isSetSamplesWithout()) { oprot.writeFieldBegin(SAMPLES_WITHOUT_FIELD_DESC); oprot.writeDouble(struct.samplesWithout); oprot.writeFieldEnd(); } oprot.writeFieldStop(); oprot.writeStructEnd(); } } private static class DetailScreenReportTupleSchemeFactory implements SchemeFactory { public DetailScreenReportTupleScheme getScheme() { return new DetailScreenReportTupleScheme(); } } private static class DetailScreenReportTupleScheme extends TupleScheme<DetailScreenReport> { @Override public void write(org.apache.thrift.protocol.TProtocol prot, DetailScreenReport struct) throws org.apache.thrift.TException { TTupleProtocol oprot = (TTupleProtocol) prot; BitSet optionals = new BitSet(); if (struct.isSetScore()) { optionals.set(0); } if (struct.isSetXVals()) { optionals.set(1); } if (struct.isSetYVals()) { optionals.set(2); } if (struct.isSetExpectedValue()) { optionals.set(3); } if (struct.isSetError()) { optionals.set(4); } if (struct.isSetErrorWithout()) { optionals.set(5); } if (struct.isSetSamples()) { optionals.set(6); } if (struct.isSetSamplesWithout()) { optionals.set(7); } oprot.writeBitSet(optionals, 8); if (struct.isSetScore()) { oprot.writeDouble(struct.score); } if (struct.isSetXVals()) { { oprot.writeI32(struct.xVals.size()); for (double _iter40 : struct.xVals) { oprot.writeDouble(_iter40); } } } if (struct.isSetYVals()) { { oprot.writeI32(struct.yVals.size()); for (double _iter41 : struct.yVals) { oprot.writeDouble(_iter41); } } } if (struct.isSetExpectedValue()) { oprot.writeDouble(struct.expectedValue); } if (struct.isSetError()) { oprot.writeDouble(struct.error); } if (struct.isSetErrorWithout()) { oprot.writeDouble(struct.errorWithout); } if (struct.isSetSamples()) { oprot.writeDouble(struct.samples); } if (struct.isSetSamplesWithout()) { oprot.writeDouble(struct.samplesWithout); } } @Override public void read(org.apache.thrift.protocol.TProtocol prot, DetailScreenReport struct) throws org.apache.thrift.TException { TTupleProtocol iprot = (TTupleProtocol) prot; BitSet incoming = iprot.readBitSet(8); if (incoming.get(0)) { struct.score = iprot.readDouble(); struct.setScoreIsSet(true); } if (incoming.get(1)) { { org.apache.thrift.protocol.TList _list42 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); struct.xVals = new ArrayList<Double>(_list42.size); double _elem43; for (int _i44 = 0; _i44 < _list42.size; ++_i44) { _elem43 = iprot.readDouble(); struct.xVals.add(_elem43); } } struct.setXValsIsSet(true); } if (incoming.get(2)) { { org.apache.thrift.protocol.TList _list45 = new org.apache.thrift.protocol.TList(org.apache.thrift.protocol.TType.DOUBLE, iprot.readI32()); struct.yVals = new ArrayList<Double>(_list45.size); double _elem46; for (int _i47 = 0; _i47 < _list45.size; ++_i47) { _elem46 = iprot.readDouble(); struct.yVals.add(_elem46); } } struct.setYValsIsSet(true); } if (incoming.get(3)) { struct.expectedValue = iprot.readDouble(); struct.setExpectedValueIsSet(true); } if (incoming.get(4)) { struct.error = iprot.readDouble(); struct.setErrorIsSet(true); } if (incoming.get(5)) { struct.errorWithout = iprot.readDouble(); struct.setErrorWithoutIsSet(true); } if (incoming.get(6)) { struct.samples = iprot.readDouble(); struct.setSamplesIsSet(true); } if (incoming.get(7)) { struct.samplesWithout = iprot.readDouble(); struct.setSamplesWithoutIsSet(true); } } } }