Beispiel #1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, IteratorConfig struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetIterators()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetIterators()) {
     {
       oprot.writeI32(struct.iterators.size());
       for (TIteratorSetting _iter102 : struct.iterators) {
         _iter102.write(oprot);
       }
     }
   }
 }
Beispiel #2
0
 /** Performs a deep copy on <i>other</i>. */
 public IteratorConfig(IteratorConfig other) {
   if (other.isSetIterators()) {
     List<TIteratorSetting> __this__iterators =
         new ArrayList<TIteratorSetting>(other.iterators.size());
     for (TIteratorSetting other_element : other.iterators) {
       __this__iterators.add(new TIteratorSetting(other_element));
     }
     this.iterators = __this__iterators;
   }
 }
Beispiel #3
0
  public boolean equals(IteratorConfig that) {
    if (that == null) return false;

    boolean this_present_iterators = true && this.isSetIterators();
    boolean that_present_iterators = true && that.isSetIterators();
    if (this_present_iterators || that_present_iterators) {
      if (!(this_present_iterators && that_present_iterators)) return false;
      if (!this.iterators.equals(that.iterators)) return false;
    }

    return true;
  }
Beispiel #4
0
  @Override
  public int compareTo(IteratorConfig other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(isSetIterators()).compareTo(other.isSetIterators());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (isSetIterators()) {
      lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.iterators, other.iterators);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }