23public final class ProtobufRotation2d extends ProtoMessage<ProtobufRotation2d> implements Cloneable {
24 private static final long serialVersionUID = 0L;
29 private double value_;
31 private ProtobufRotation2d() {
38 return new ProtobufRotation2d();
46 return (bitField0_ & 0x00000001) != 0;
54 bitField0_ &= ~0x00000001;
72 public ProtobufRotation2d
setValue(
final double value) {
73 bitField0_ |= 0x00000001;
80 cachedSize = other.cachedSize;
81 if ((bitField0_ | other.bitField0_) != 0) {
82 bitField0_ = other.bitField0_;
83 value_ = other.value_;
89 public ProtobufRotation2d mergeFrom(
final ProtobufRotation2d other) {
90 if (other.isEmpty()) {
94 if (other.hasValue()) {
95 setValue(other.value_);
101 public ProtobufRotation2d clear() {
122 public boolean equals(Object o) {
130 return bitField0_ == other.bitField0_
131 && (!hasValue() || ProtoUtil.isEqual(value_, other.value_));
135 public void writeTo(
final ProtoSink output)
throws IOException {
136 if ((bitField0_ & 0x00000001) != 0) {
137 output.writeRawByte((
byte) 9);
138 output.writeDoubleNoTag(value_);
143 protected int computeSerializedSize() {
145 if ((bitField0_ & 0x00000001) != 0) {
152 @SuppressWarnings(
"fallthrough")
155 int tag = input.readTag();
160 value_ = input.readDouble();
161 bitField0_ |= 0x00000001;
162 tag = input.readTag();
171 if (!input.skipField(tag)) {
174 tag = input.readTag();
182 public void writeTo(
final JsonSink output)
throws IOException {
183 output.beginObject();
184 if ((bitField0_ & 0x00000001) != 0) {
185 output.writeDouble(FieldNames.value_, value_);
192 if (!input.beginObject()) {
195 while (!input.isAtEnd()) {
196 switch (input.readFieldHash()) {
198 if (input.isAtField(FieldNames.value_)) {
199 if (!input.trySkipNullValue()) {
200 value_ = input.readDouble();
201 bitField0_ |= 0x00000001;
204 input.skipUnknownField();
209 input.skipUnknownField();
224 public boolean isEmpty() {
225 return ((bitField0_) == 0);
229 InvalidProtocolBufferException {
233 public static ProtobufRotation2d parseFrom(
final ProtoSource input)
throws IOException {
237 public static ProtobufRotation2d parseFrom(
final JsonSource input)
throws IOException {
244 public static MessageFactory<ProtobufRotation2d>
getFactory() {
259 public ProtobufRotation2d create() {
260 return ProtobufRotation2d.newInstance();
267 static class FieldNames {
268 static final FieldName value_ = FieldName.forField(
"value");