Пример #1
0
 @Override
 public boolean equals(Object other) {
   if (other == this) return true;
   if (!(other instanceof C)) return false;
   C o = (C) other;
   return Internal.equals(unknownFields(), o.unknownFields()) && Internal.equals(i, o.i);
 }
Пример #2
0
 @Override
 public void encode(ProtoWriter writer, C value) throws IOException {
   if (value.i != null) ProtoAdapter.INT32.encodeWithTag(writer, 1, value.i);
   writer.writeBytes(value.unknownFields());
 }
Пример #3
0
 @Override
 public int encodedSize(C value) {
   return (value.i != null ? ProtoAdapter.INT32.encodedSizeWithTag(1, value.i) : 0)
       + value.unknownFields().size();
 }
Пример #4
0
 @Override
 public C redact(C value) {
   Builder builder = value.newBuilder();
   builder.clearUnknownFields();
   return builder.build();
 }