Пример #1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, AppInfoResult struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetDeviceId()) {
     optionals.set(0);
   }
   if (struct.isSetFlowNum()) {
     optionals.set(1);
   }
   if (struct.isSetResult()) {
     optionals.set(2);
   }
   if (struct.isSetAppdatainfo()) {
     optionals.set(3);
   }
   oprot.writeBitSet(optionals, 4);
   if (struct.isSetDeviceId()) {
     oprot.writeI32(struct.deviceId);
   }
   if (struct.isSetFlowNum()) {
     oprot.writeI32(struct.flowNum);
   }
   if (struct.isSetResult()) {
     oprot.writeBool(struct.result);
   }
   if (struct.isSetAppdatainfo()) {
     struct.appdatainfo.write(oprot);
   }
 }
Пример #2
0
  public boolean equals(AppInfoResult that) {
    if (that == null) return false;

    boolean this_present_deviceId = true;
    boolean that_present_deviceId = true;
    if (this_present_deviceId || that_present_deviceId) {
      if (!(this_present_deviceId && that_present_deviceId)) return false;
      if (this.deviceId != that.deviceId) return false;
    }

    boolean this_present_flowNum = true;
    boolean that_present_flowNum = true;
    if (this_present_flowNum || that_present_flowNum) {
      if (!(this_present_flowNum && that_present_flowNum)) return false;
      if (this.flowNum != that.flowNum) return false;
    }

    boolean this_present_result = true;
    boolean that_present_result = true;
    if (this_present_result || that_present_result) {
      if (!(this_present_result && that_present_result)) return false;
      if (this.result != that.result) return false;
    }

    boolean this_present_appdatainfo = true && this.isSetAppdatainfo();
    boolean that_present_appdatainfo = true && that.isSetAppdatainfo();
    if (this_present_appdatainfo || that_present_appdatainfo) {
      if (!(this_present_appdatainfo && that_present_appdatainfo)) return false;
      if (!this.appdatainfo.equals(that.appdatainfo)) return false;
    }

    return true;
  }
Пример #3
0
 /** Performs a deep copy on <i>other</i>. */
 public AppInfoResult(AppInfoResult other) {
   __isset_bit_vector.clear();
   __isset_bit_vector.or(other.__isset_bit_vector);
   this.deviceId = other.deviceId;
   this.flowNum = other.flowNum;
   this.result = other.result;
   if (other.isSetAppdatainfo()) {
     this.appdatainfo = new AppDataInfo(other.appdatainfo);
   }
 }
Пример #4
0
  public int compareTo(AppInfoResult other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;
    AppInfoResult typedOther = (AppInfoResult) other;

    lastComparison = Boolean.valueOf(isSetDeviceId()).compareTo(typedOther.isSetDeviceId());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetDeviceId()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.deviceId, typedOther.deviceId);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFlowNum()).compareTo(typedOther.isSetFlowNum());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFlowNum()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.flowNum, typedOther.flowNum);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetResult()).compareTo(typedOther.isSetResult());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetResult()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, typedOther.result);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetAppdatainfo()).compareTo(typedOther.isSetAppdatainfo());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetAppdatainfo()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.appdatainfo, typedOther.appdatainfo);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }