コード例 #1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, QueryFListResult struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetResult()) {
     optionals.set(0);
   }
   if (struct.isSetFiles()) {
     optionals.set(1);
   }
   if (struct.isSetSpare()) {
     optionals.set(2);
   }
   oprot.writeBitSet(optionals, 3);
   if (struct.isSetResult()) {
     struct.result.write(oprot);
   }
   if (struct.isSetFiles()) {
     {
       oprot.writeI32(struct.files.size());
       for (FileInfo _iter4 : struct.files) {
         _iter4.write(oprot);
       }
     }
   }
   if (struct.isSetSpare()) {
     oprot.writeI32(struct.spare);
   }
 }
コード例 #2
0
  public boolean equals(QueryFListResult that) {
    if (that == null) return false;

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

    boolean this_present_files = true && this.isSetFiles();
    boolean that_present_files = true && that.isSetFiles();
    if (this_present_files || that_present_files) {
      if (!(this_present_files && that_present_files)) return false;
      if (!this.files.equals(that.files)) return false;
    }

    boolean this_present_spare = true && this.isSetSpare();
    boolean that_present_spare = true && that.isSetSpare();
    if (this_present_spare || that_present_spare) {
      if (!(this_present_spare && that_present_spare)) return false;
      if (this.spare != that.spare) return false;
    }

    return true;
  }
コード例 #3
0
 /** Performs a deep copy on <i>other</i>. */
 public QueryFListResult(QueryFListResult other) {
   __isset_bitfield = other.__isset_bitfield;
   if (other.isSetResult()) {
     this.result = new RetHead(other.result);
   }
   if (other.isSetFiles()) {
     this.files = other.files;
   }
   this.spare = other.spare;
 }
コード例 #4
0
  @Override
  public int compareTo(QueryFListResult other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetResult()).compareTo(other.isSetResult());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetResult()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.result, other.result);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetFiles()).compareTo(other.isSetFiles());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetFiles()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.files, other.files);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    lastComparison = Boolean.valueOf(isSetSpare()).compareTo(other.isSetSpare());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetSpare()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.spare, other.spare);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }