示例#1
0
 @Override
 public void read(org.apache.thrift.protocol.TProtocol prot, LSTopoHistoryList struct)
     throws org.apache.thrift.TException {
   TTupleProtocol iprot = (TTupleProtocol) prot;
   {
     org.apache.thrift.protocol.TList _list685 =
         new org.apache.thrift.protocol.TList(
             org.apache.thrift.protocol.TType.STRUCT, iprot.readI32());
     struct.topo_history = new ArrayList<LSTopoHistory>(_list685.size);
     LSTopoHistory _elem686;
     for (int _i687 = 0; _i687 < _list685.size; ++_i687) {
       _elem686 = new LSTopoHistory();
       _elem686.read(iprot);
       struct.topo_history.add(_elem686);
     }
   }
   struct.set_topo_history_isSet(true);
 }
示例#2
0
 /** Performs a deep copy on <i>other</i>. */
 public LSTopoHistoryList(LSTopoHistoryList other) {
   if (other.is_set_topo_history()) {
     List<LSTopoHistory> __this__topo_history =
         new ArrayList<LSTopoHistory>(other.topo_history.size());
     for (LSTopoHistory other_element : other.topo_history) {
       __this__topo_history.add(new LSTopoHistory(other_element));
     }
     this.topo_history = __this__topo_history;
   }
 }
示例#3
0
  @Override
  public int compareTo(LSTopoHistoryList other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

    lastComparison = Boolean.valueOf(is_set_topo_history()).compareTo(other.is_set_topo_history());
    if (lastComparison != 0) {
      return lastComparison;
    }
    if (is_set_topo_history()) {
      lastComparison =
          org.apache.thrift.TBaseHelper.compareTo(this.topo_history, other.topo_history);
      if (lastComparison != 0) {
        return lastComparison;
      }
    }
    return 0;
  }
示例#4
0
  public boolean equals(LSTopoHistoryList that) {
    if (that == null) return false;

    boolean this_present_topo_history = true && this.is_set_topo_history();
    boolean that_present_topo_history = true && that.is_set_topo_history();
    if (this_present_topo_history || that_present_topo_history) {
      if (!(this_present_topo_history && that_present_topo_history)) return false;
      if (!this.topo_history.equals(that.topo_history)) return false;
    }

    return true;
  }
示例#5
0
 public void read(org.apache.thrift.protocol.TProtocol iprot, LSTopoHistoryList 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: // TOPO_HISTORY
         if (schemeField.type == org.apache.thrift.protocol.TType.LIST) {
           {
             org.apache.thrift.protocol.TList _list680 = iprot.readListBegin();
             struct.topo_history = new ArrayList<LSTopoHistory>(_list680.size);
             LSTopoHistory _elem681;
             for (int _i682 = 0; _i682 < _list680.size; ++_i682) {
               _elem681 = new LSTopoHistory();
               _elem681.read(iprot);
               struct.topo_history.add(_elem681);
             }
             iprot.readListEnd();
           }
           struct.set_topo_history_isSet(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();
   struct.validate();
 }
示例#6
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, LSTopoHistoryList struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.topo_history != null) {
        oprot.writeFieldBegin(TOPO_HISTORY_FIELD_DESC);
        {
          oprot.writeListBegin(
              new org.apache.thrift.protocol.TList(
                  org.apache.thrift.protocol.TType.STRUCT, struct.topo_history.size()));
          for (LSTopoHistory _iter683 : struct.topo_history) {
            _iter683.write(oprot);
          }
          oprot.writeListEnd();
        }
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }