示例#1
0
 @Override
 public void write(org.apache.thrift.protocol.TProtocol prot, MountTOptions struct)
     throws org.apache.thrift.TException {
   TTupleProtocol oprot = (TTupleProtocol) prot;
   BitSet optionals = new BitSet();
   if (struct.isSetReadOnly()) {
     optionals.set(0);
   }
   oprot.writeBitSet(optionals, 1);
   if (struct.isSetReadOnly()) {
     oprot.writeBool(struct.readOnly);
   }
 }
示例#2
0
  public boolean equals(MountTOptions that) {
    if (that == null) return false;

    boolean this_present_readOnly = true && this.isSetReadOnly();
    boolean that_present_readOnly = true && that.isSetReadOnly();
    if (this_present_readOnly || that_present_readOnly) {
      if (!(this_present_readOnly && that_present_readOnly)) return false;
      if (this.readOnly != that.readOnly) return false;
    }

    return true;
  }
示例#3
0
    public void write(org.apache.thrift.protocol.TProtocol oprot, MountTOptions struct)
        throws org.apache.thrift.TException {
      struct.validate();

      oprot.writeStructBegin(STRUCT_DESC);
      if (struct.isSetReadOnly()) {
        oprot.writeFieldBegin(READ_ONLY_FIELD_DESC);
        oprot.writeBool(struct.readOnly);
        oprot.writeFieldEnd();
      }
      oprot.writeFieldStop();
      oprot.writeStructEnd();
    }
示例#4
0
  @Override
  public int compareTo(MountTOptions other) {
    if (!getClass().equals(other.getClass())) {
      return getClass().getName().compareTo(other.getClass().getName());
    }

    int lastComparison = 0;

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