23public final class ProtobufTranslation3d extends ProtoMessage<ProtobufTranslation3d> implements Cloneable {
24 private static final long serialVersionUID = 0L;
41 private ProtobufTranslation3d() {
48 return new ProtobufTranslation3d();
56 return (bitField0_ & 0x00000001) != 0;
63 public ProtobufTranslation3d
clearX() {
64 bitField0_ &= ~0x00000001;
82 public ProtobufTranslation3d
setX(
final double value) {
83 bitField0_ |= 0x00000001;
93 return (bitField0_ & 0x00000002) != 0;
101 bitField0_ &= ~0x00000002;
119 public ProtobufTranslation3d
setY(
final double value) {
120 bitField0_ |= 0x00000002;
130 return (bitField0_ & 0x00000004) != 0;
138 bitField0_ &= ~0x00000004;
156 public ProtobufTranslation3d
setZ(
final double value) {
157 bitField0_ |= 0x00000004;
164 cachedSize = other.cachedSize;
165 if ((bitField0_ | other.bitField0_) != 0) {
166 bitField0_ = other.bitField0_;
175 public ProtobufTranslation3d mergeFrom(
final ProtobufTranslation3d other) {
176 if (other.isEmpty()) {
216 public boolean equals(Object o) {
224 return bitField0_ == other.bitField0_
225 && (!hasX() || ProtoUtil.isEqual(x, other.x))
226 && (!hasY() || ProtoUtil.isEqual(y, other.y))
227 && (!hasZ() || ProtoUtil.isEqual(z, other.z));
231 public void writeTo(
final ProtoSink output)
throws IOException {
232 if ((bitField0_ & 0x00000001) != 0) {
233 output.writeRawByte((
byte) 9);
234 output.writeDoubleNoTag(x);
236 if ((bitField0_ & 0x00000002) != 0) {
237 output.writeRawByte((
byte) 17);
238 output.writeDoubleNoTag(y);
240 if ((bitField0_ & 0x00000004) != 0) {
241 output.writeRawByte((
byte) 25);
242 output.writeDoubleNoTag(z);
247 protected int computeSerializedSize() {
249 if ((bitField0_ & 0x00000001) != 0) {
252 if ((bitField0_ & 0x00000002) != 0) {
255 if ((bitField0_ & 0x00000004) != 0) {
262 @SuppressWarnings(
"fallthrough")
265 int tag = input.readTag();
270 x = input.readDouble();
271 bitField0_ |= 0x00000001;
272 tag = input.readTag();
279 y = input.readDouble();
280 bitField0_ |= 0x00000002;
281 tag = input.readTag();
288 z = input.readDouble();
289 bitField0_ |= 0x00000004;
290 tag = input.readTag();
299 if (!input.skipField(tag)) {
302 tag = input.readTag();
310 public void writeTo(
final JsonSink output)
throws IOException {
311 output.beginObject();
312 if ((bitField0_ & 0x00000001) != 0) {
313 output.writeDouble(FieldNames.x, x);
315 if ((bitField0_ & 0x00000002) != 0) {
316 output.writeDouble(FieldNames.y, y);
318 if ((bitField0_ & 0x00000004) != 0) {
319 output.writeDouble(FieldNames.z, z);
326 if (!input.beginObject()) {
329 while (!input.isAtEnd()) {
330 switch (input.readFieldHash()) {
332 if (input.isAtField(FieldNames.x)) {
333 if (!input.trySkipNullValue()) {
334 x = input.readDouble();
335 bitField0_ |= 0x00000001;
338 input.skipUnknownField();
343 if (input.isAtField(FieldNames.y)) {
344 if (!input.trySkipNullValue()) {
345 y = input.readDouble();
346 bitField0_ |= 0x00000002;
349 input.skipUnknownField();
354 if (input.isAtField(FieldNames.z)) {
355 if (!input.trySkipNullValue()) {
356 z = input.readDouble();
357 bitField0_ |= 0x00000004;
360 input.skipUnknownField();
365 input.skipUnknownField();
380 public boolean isEmpty() {
381 return ((bitField0_) == 0);
385 InvalidProtocolBufferException {
400 public static MessageFactory<ProtobufTranslation3d>
getFactory() {
415 public ProtobufTranslation3d create() {
416 return ProtobufTranslation3d.newInstance();
423 static class FieldNames {
424 static final FieldName x = FieldName.forField(
"x");
426 static final FieldName y = FieldName.forField(
"y");
428 static final FieldName z = FieldName.forField(
"z");