com.linecorp.centraldogma.internal.thrift.WatchRepositoryResult.isSetRevision()方法的使用及代码示例

x33g5p2x  于2022-02-03 转载在 其他  
字(6.4k)|赞(0)|评价(0)|浏览(125)

本文整理了Java中com.linecorp.centraldogma.internal.thrift.WatchRepositoryResult.isSetRevision()方法的一些代码示例,展示了WatchRepositoryResult.isSetRevision()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。WatchRepositoryResult.isSetRevision()方法的具体详情如下:
包路径:com.linecorp.centraldogma.internal.thrift.WatchRepositoryResult
类名称:WatchRepositoryResult
方法名:isSetRevision

WatchRepositoryResult.isSetRevision介绍

[英]Returns true if field revision is set (has been assigned a value) and false otherwise
[中]如果设置了字段修订(已指定值),则返回true,否则返回false

代码示例

代码示例来源:origin: line/centraldogma

  1. public boolean equals(WatchRepositoryResult that) {
  2. if (that == null)
  3. return false;
  4. boolean this_present_revision = true && this.isSetRevision();
  5. boolean that_present_revision = true && that.isSetRevision();
  6. if (this_present_revision || that_present_revision) {
  7. if (!(this_present_revision && that_present_revision))
  8. return false;
  9. if (!this.revision.equals(that.revision))
  10. return false;
  11. }
  12. return true;
  13. }

代码示例来源:origin: line/centraldogma

  1. /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  2. public boolean isSet(_Fields field) {
  3. if (field == null) {
  4. throw new IllegalArgumentException();
  5. }
  6. switch (field) {
  7. case REVISION:
  8. return isSetRevision();
  9. }
  10. throw new IllegalStateException();
  11. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. /** Returns true if field corresponding to fieldID is set (has been assigned a value) and false otherwise */
  2. public boolean isSet(_Fields field) {
  3. if (field == null) {
  4. throw new IllegalArgumentException();
  5. }
  6. switch (field) {
  7. case REVISION:
  8. return isSetRevision();
  9. }
  10. throw new IllegalStateException();
  11. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. public boolean equals(WatchRepositoryResult that) {
  2. if (that == null)
  3. return false;
  4. boolean this_present_revision = true && this.isSetRevision();
  5. boolean that_present_revision = true && that.isSetRevision();
  6. if (this_present_revision || that_present_revision) {
  7. if (!(this_present_revision && that_present_revision))
  8. return false;
  9. if (!this.revision.equals(that.revision))
  10. return false;
  11. }
  12. return true;
  13. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. @Override
  2. public int hashCode() {
  3. List<Object> list = new ArrayList<Object>();
  4. boolean present_revision = true && (isSetRevision());
  5. list.add(present_revision);
  6. if (present_revision)
  7. list.add(revision);
  8. return list.hashCode();
  9. }

代码示例来源:origin: line/centraldogma

  1. @Override
  2. public int hashCode() {
  3. List<Object> list = new ArrayList<Object>();
  4. boolean present_revision = true && (isSetRevision());
  5. list.add(present_revision);
  6. if (present_revision)
  7. list.add(revision);
  8. return list.hashCode();
  9. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. @Override
  2. public int compareTo(WatchRepositoryResult other) {
  3. if (!getClass().equals(other.getClass())) {
  4. return getClass().getName().compareTo(other.getClass().getName());
  5. }
  6. int lastComparison = 0;
  7. lastComparison = Boolean.valueOf(isSetRevision()).compareTo(other.isSetRevision());
  8. if (lastComparison != 0) {
  9. return lastComparison;
  10. }
  11. if (isSetRevision()) {
  12. lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revision, other.revision);
  13. if (lastComparison != 0) {
  14. return lastComparison;
  15. }
  16. }
  17. return 0;
  18. }

代码示例来源:origin: line/centraldogma

  1. @Override
  2. public int compareTo(WatchRepositoryResult other) {
  3. if (!getClass().equals(other.getClass())) {
  4. return getClass().getName().compareTo(other.getClass().getName());
  5. }
  6. int lastComparison = 0;
  7. lastComparison = Boolean.valueOf(isSetRevision()).compareTo(other.isSetRevision());
  8. if (lastComparison != 0) {
  9. return lastComparison;
  10. }
  11. if (isSetRevision()) {
  12. lastComparison = org.apache.thrift.TBaseHelper.compareTo(this.revision, other.revision);
  13. if (lastComparison != 0) {
  14. return lastComparison;
  15. }
  16. }
  17. return 0;
  18. }

代码示例来源:origin: line/centraldogma

  1. @Override
  2. public void write(org.apache.thrift.protocol.TProtocol prot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  3. TTupleProtocol oprot = (TTupleProtocol) prot;
  4. BitSet optionals = new BitSet();
  5. if (struct.isSetRevision()) {
  6. optionals.set(0);
  7. }
  8. oprot.writeBitSet(optionals, 1);
  9. if (struct.isSetRevision()) {
  10. struct.revision.write(oprot);
  11. }
  12. }

代码示例来源:origin: line/centraldogma

  1. @Override
  2. public String toString() {
  3. StringBuilder sb = new StringBuilder("WatchRepositoryResult(");
  4. boolean first = true;
  5. if (isSetRevision()) {
  6. sb.append("revision:");
  7. if (this.revision == null) {
  8. sb.append("null");
  9. } else {
  10. sb.append(this.revision);
  11. }
  12. first = false;
  13. }
  14. sb.append(")");
  15. return sb.toString();
  16. }

代码示例来源:origin: line/centraldogma

  1. /**
  2. * Performs a deep copy on <i>other</i>.
  3. */
  4. public WatchRepositoryResult(WatchRepositoryResult other) {
  5. if (other.isSetRevision()) {
  6. this.revision = new Revision(other.revision);
  7. }
  8. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. /**
  2. * Performs a deep copy on <i>other</i>.
  3. */
  4. public WatchRepositoryResult(WatchRepositoryResult other) {
  5. if (other.isSetRevision()) {
  6. this.revision = new Revision(other.revision);
  7. }
  8. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. @Override
  2. public void write(org.apache.thrift.protocol.TProtocol prot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  3. TTupleProtocol oprot = (TTupleProtocol) prot;
  4. BitSet optionals = new BitSet();
  5. if (struct.isSetRevision()) {
  6. optionals.set(0);
  7. }
  8. oprot.writeBitSet(optionals, 1);
  9. if (struct.isSetRevision()) {
  10. struct.revision.write(oprot);
  11. }
  12. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. @Override
  2. public String toString() {
  3. StringBuilder sb = new StringBuilder("WatchRepositoryResult(");
  4. boolean first = true;
  5. if (isSetRevision()) {
  6. sb.append("revision:");
  7. if (this.revision == null) {
  8. sb.append("null");
  9. } else {
  10. sb.append(this.revision);
  11. }
  12. first = false;
  13. }
  14. sb.append(")");
  15. return sb.toString();
  16. }

代码示例来源:origin: com.linecorp.centraldogma/centraldogma-common-legacy-shaded

  1. public void write(org.apache.thrift.protocol.TProtocol oprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  2. struct.validate();
  3. oprot.writeStructBegin(STRUCT_DESC);
  4. if (struct.revision != null) {
  5. if (struct.isSetRevision()) {
  6. oprot.writeFieldBegin(REVISION_FIELD_DESC);
  7. struct.revision.write(oprot);
  8. oprot.writeFieldEnd();
  9. }
  10. }
  11. oprot.writeFieldStop();
  12. oprot.writeStructEnd();
  13. }

代码示例来源:origin: line/centraldogma

  1. public void write(org.apache.thrift.protocol.TProtocol oprot, WatchRepositoryResult struct) throws org.apache.thrift.TException {
  2. struct.validate();
  3. oprot.writeStructBegin(STRUCT_DESC);
  4. if (struct.revision != null) {
  5. if (struct.isSetRevision()) {
  6. oprot.writeFieldBegin(REVISION_FIELD_DESC);
  7. struct.revision.write(oprot);
  8. oprot.writeFieldEnd();
  9. }
  10. }
  11. oprot.writeFieldStop();
  12. oprot.writeStructEnd();
  13. }

相关文章