Google OR-Tools v9.12
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
Int128.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// NO CHECKED-IN PROTOBUF GENCODE
3// source: ortools/util/int128.proto
4// Protobuf Java Version: 4.29.3
5
6package com.google.ortools.util;
7
16public final class Int128 extends
17 com.google.protobuf.GeneratedMessage implements
18 // @@protoc_insertion_point(message_implements:operations_research.Int128)
20private static final long serialVersionUID = 0L;
21 static {
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
24 /* major= */ 4,
25 /* minor= */ 29,
26 /* patch= */ 3,
27 /* suffix= */ "",
28 Int128.class.getName());
29 }
30 // Use Int128.newBuilder() to construct.
31 private Int128(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
32 super(builder);
33 }
34 private Int128() {
35 }
36
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.util.Int128OuterClass.internal_static_operations_research_Int128_descriptor;
40 }
41
42 @java.lang.Override
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.util.Int128OuterClass.internal_static_operations_research_Int128_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.util.Int128.class, com.google.ortools.util.Int128.Builder.class);
48 }
49
50 public static final int HIGH_FIELD_NUMBER = 1;
51 private long high_ = 0L;
56 @java.lang.Override
57 public long getHigh() {
58 return high_;
59 }
60
61 public static final int LOW_FIELD_NUMBER = 2;
62 private long low_ = 0L;
67 @java.lang.Override
68 public long getLow() {
69 return low_;
70 }
71
72 private byte memoizedIsInitialized = -1;
73 @java.lang.Override
74 public final boolean isInitialized() {
75 byte isInitialized = memoizedIsInitialized;
76 if (isInitialized == 1) return true;
77 if (isInitialized == 0) return false;
78
79 memoizedIsInitialized = 1;
80 return true;
81 }
82
83 @java.lang.Override
84 public void writeTo(com.google.protobuf.CodedOutputStream output)
85 throws java.io.IOException {
86 if (high_ != 0L) {
87 output.writeInt64(1, high_);
88 }
89 if (low_ != 0L) {
90 output.writeUInt64(2, low_);
91 }
92 getUnknownFields().writeTo(output);
93 }
94
95 @java.lang.Override
96 public int getSerializedSize() {
97 int size = memoizedSize;
98 if (size != -1) return size;
99
100 size = 0;
101 if (high_ != 0L) {
102 size += com.google.protobuf.CodedOutputStream
103 .computeInt64Size(1, high_);
104 }
105 if (low_ != 0L) {
106 size += com.google.protobuf.CodedOutputStream
107 .computeUInt64Size(2, low_);
108 }
109 size += getUnknownFields().getSerializedSize();
110 memoizedSize = size;
111 return size;
112 }
113
114 @java.lang.Override
115 public boolean equals(final java.lang.Object obj) {
116 if (obj == this) {
117 return true;
118 }
119 if (!(obj instanceof com.google.ortools.util.Int128)) {
120 return super.equals(obj);
121 }
122 com.google.ortools.util.Int128 other = (com.google.ortools.util.Int128) obj;
123
124 if (getHigh()
125 != other.getHigh()) return false;
126 if (getLow()
127 != other.getLow()) return false;
128 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
129 return true;
130 }
131
132 @java.lang.Override
133 public int hashCode() {
134 if (memoizedHashCode != 0) {
135 return memoizedHashCode;
136 }
137 int hash = 41;
138 hash = (19 * hash) + getDescriptor().hashCode();
139 hash = (37 * hash) + HIGH_FIELD_NUMBER;
140 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
141 getHigh());
142 hash = (37 * hash) + LOW_FIELD_NUMBER;
143 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
144 getLow());
145 hash = (29 * hash) + getUnknownFields().hashCode();
146 memoizedHashCode = hash;
147 return hash;
148 }
149
151 java.nio.ByteBuffer data)
152 throws com.google.protobuf.InvalidProtocolBufferException {
153 return PARSER.parseFrom(data);
154 }
156 java.nio.ByteBuffer data,
157 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
158 throws com.google.protobuf.InvalidProtocolBufferException {
159 return PARSER.parseFrom(data, extensionRegistry);
160 }
162 com.google.protobuf.ByteString data)
163 throws com.google.protobuf.InvalidProtocolBufferException {
164 return PARSER.parseFrom(data);
165 }
167 com.google.protobuf.ByteString data,
168 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
169 throws com.google.protobuf.InvalidProtocolBufferException {
170 return PARSER.parseFrom(data, extensionRegistry);
171 }
172 public static com.google.ortools.util.Int128 parseFrom(byte[] data)
173 throws com.google.protobuf.InvalidProtocolBufferException {
174 return PARSER.parseFrom(data);
175 }
177 byte[] data,
178 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
179 throws com.google.protobuf.InvalidProtocolBufferException {
180 return PARSER.parseFrom(data, extensionRegistry);
181 }
182 public static com.google.ortools.util.Int128 parseFrom(java.io.InputStream input)
183 throws java.io.IOException {
184 return com.google.protobuf.GeneratedMessage
185 .parseWithIOException(PARSER, input);
186 }
188 java.io.InputStream input,
189 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
190 throws java.io.IOException {
191 return com.google.protobuf.GeneratedMessage
192 .parseWithIOException(PARSER, input, extensionRegistry);
193 }
194
195 public static com.google.ortools.util.Int128 parseDelimitedFrom(java.io.InputStream input)
196 throws java.io.IOException {
197 return com.google.protobuf.GeneratedMessage
198 .parseDelimitedWithIOException(PARSER, input);
199 }
200
202 java.io.InputStream input,
203 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
204 throws java.io.IOException {
205 return com.google.protobuf.GeneratedMessage
206 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
207 }
209 com.google.protobuf.CodedInputStream input)
210 throws java.io.IOException {
211 return com.google.protobuf.GeneratedMessage
212 .parseWithIOException(PARSER, input);
213 }
215 com.google.protobuf.CodedInputStream input,
216 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
217 throws java.io.IOException {
218 return com.google.protobuf.GeneratedMessage
219 .parseWithIOException(PARSER, input, extensionRegistry);
220 }
221
222 @java.lang.Override
223 public Builder newBuilderForType() { return newBuilder(); }
224 public static Builder newBuilder() {
225 return DEFAULT_INSTANCE.toBuilder();
226 }
227 public static Builder newBuilder(com.google.ortools.util.Int128 prototype) {
228 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
229 }
230 @java.lang.Override
232 return this == DEFAULT_INSTANCE
233 ? new Builder() : new Builder().mergeFrom(this);
234 }
235
236 @java.lang.Override
238 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
239 Builder builder = new Builder(parent);
240 return builder;
241 }
242
250 public static final class Builder extends
251 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
252 // @@protoc_insertion_point(builder_implements:operations_research.Int128)
253 com.google.ortools.util.Int128OrBuilder {
254 public static final com.google.protobuf.Descriptors.Descriptor
256 return com.google.ortools.util.Int128OuterClass.internal_static_operations_research_Int128_descriptor;
257 }
258
259 @java.lang.Override
260 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
262 return com.google.ortools.util.Int128OuterClass.internal_static_operations_research_Int128_fieldAccessorTable
263 .ensureFieldAccessorsInitialized(
264 com.google.ortools.util.Int128.class, com.google.ortools.util.Int128.Builder.class);
265 }
266
267 // Construct using com.google.ortools.util.Int128.newBuilder()
268 private Builder() {
269
270 }
271
272 private Builder(
273 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
274 super(parent);
275
276 }
277 @java.lang.Override
278 public Builder clear() {
279 super.clear();
280 bitField0_ = 0;
281 high_ = 0L;
282 low_ = 0L;
283 return this;
284 }
285
286 @java.lang.Override
287 public com.google.protobuf.Descriptors.Descriptor
289 return com.google.ortools.util.Int128OuterClass.internal_static_operations_research_Int128_descriptor;
290 }
291
292 @java.lang.Override
294 return com.google.ortools.util.Int128.getDefaultInstance();
295 }
296
297 @java.lang.Override
300 if (!result.isInitialized()) {
301 throw newUninitializedMessageException(result);
302 }
303 return result;
304 }
305
306 @java.lang.Override
308 com.google.ortools.util.Int128 result = new com.google.ortools.util.Int128(this);
309 if (bitField0_ != 0) { buildPartial0(result); }
310 onBuilt();
311 return result;
312 }
313
314 private void buildPartial0(com.google.ortools.util.Int128 result) {
315 int from_bitField0_ = bitField0_;
316 if (((from_bitField0_ & 0x00000001) != 0)) {
317 result.high_ = high_;
318 }
319 if (((from_bitField0_ & 0x00000002) != 0)) {
320 result.low_ = low_;
321 }
322 }
323
324 @java.lang.Override
325 public Builder mergeFrom(com.google.protobuf.Message other) {
326 if (other instanceof com.google.ortools.util.Int128) {
327 return mergeFrom((com.google.ortools.util.Int128)other);
328 } else {
329 super.mergeFrom(other);
330 return this;
331 }
332 }
333
334 public Builder mergeFrom(com.google.ortools.util.Int128 other) {
335 if (other == com.google.ortools.util.Int128.getDefaultInstance()) return this;
336 if (other.getHigh() != 0L) {
337 setHigh(other.getHigh());
338 }
339 if (other.getLow() != 0L) {
340 setLow(other.getLow());
341 }
342 this.mergeUnknownFields(other.getUnknownFields());
343 onChanged();
344 return this;
345 }
346
347 @java.lang.Override
348 public final boolean isInitialized() {
349 return true;
350 }
351
352 @java.lang.Override
353 public Builder mergeFrom(
354 com.google.protobuf.CodedInputStream input,
355 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
356 throws java.io.IOException {
357 if (extensionRegistry == null) {
358 throw new java.lang.NullPointerException();
359 }
360 try {
361 boolean done = false;
362 while (!done) {
363 int tag = input.readTag();
364 switch (tag) {
365 case 0:
366 done = true;
367 break;
368 case 8: {
369 high_ = input.readInt64();
370 bitField0_ |= 0x00000001;
371 break;
372 } // case 8
373 case 16: {
374 low_ = input.readUInt64();
375 bitField0_ |= 0x00000002;
376 break;
377 } // case 16
378 default: {
379 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
380 done = true; // was an endgroup tag
381 }
382 break;
383 } // default:
384 } // switch (tag)
385 } // while (!done)
386 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
387 throw e.unwrapIOException();
388 } finally {
389 onChanged();
390 } // finally
391 return this;
392 }
393 private int bitField0_;
394
395 private long high_ ;
400 @java.lang.Override
401 public long getHigh() {
402 return high_;
403 }
404
409 public Builder setHigh(long value) {
410
411 high_ = value;
412 bitField0_ |= 0x00000001;
413 onChanged();
414 return this;
415 }
416
420 public Builder clearHigh() {
421 bitField0_ = (bitField0_ & ~0x00000001);
422 high_ = 0L;
423 onChanged();
424 return this;
425 }
426
427 private long low_ ;
432 @java.lang.Override
433 public long getLow() {
434 return low_;
435 }
436
441 public Builder setLow(long value) {
442
443 low_ = value;
444 bitField0_ |= 0x00000002;
445 onChanged();
446 return this;
447 }
448
452 public Builder clearLow() {
453 bitField0_ = (bitField0_ & ~0x00000002);
454 low_ = 0L;
455 onChanged();
456 return this;
457 }
458
459 // @@protoc_insertion_point(builder_scope:operations_research.Int128)
460 }
461
462 // @@protoc_insertion_point(class_scope:operations_research.Int128)
463 private static final com.google.ortools.util.Int128 DEFAULT_INSTANCE;
464 static {
465 DEFAULT_INSTANCE = new com.google.ortools.util.Int128();
466 }
467
469 return DEFAULT_INSTANCE;
470 }
471
472 private static final com.google.protobuf.Parser<Int128>
473 PARSER = new com.google.protobuf.AbstractParser<Int128>() {
474 @java.lang.Override
475 public Int128 parsePartialFrom(
476 com.google.protobuf.CodedInputStream input,
477 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
478 throws com.google.protobuf.InvalidProtocolBufferException {
479 Builder builder = newBuilder();
480 try {
481 builder.mergeFrom(input, extensionRegistry);
482 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
483 throw e.setUnfinishedMessage(builder.buildPartial());
484 } catch (com.google.protobuf.UninitializedMessageException e) {
485 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
486 } catch (java.io.IOException e) {
487 throw new com.google.protobuf.InvalidProtocolBufferException(e)
488 .setUnfinishedMessage(builder.buildPartial());
489 }
490 return builder.buildPartial();
491 }
492 };
493
494 public static com.google.protobuf.Parser<Int128> parser() {
495 return PARSER;
496 }
497
498 @java.lang.Override
499 public com.google.protobuf.Parser<Int128> getParserForType() {
500 return PARSER;
501 }
502
503 @java.lang.Override
505 return DEFAULT_INSTANCE;
506 }
507
508}
509
com.google.ortools.util.Int128 buildPartial()
Definition Int128.java:307
com.google.ortools.util.Int128 getDefaultInstanceForType()
Definition Int128.java:293
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Definition Int128.java:353
Builder mergeFrom(com.google.ortools.util.Int128 other)
Definition Int128.java:334
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Definition Int128.java:261
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Definition Int128.java:255
com.google.ortools.util.Int128 build()
Definition Int128.java:298
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Definition Int128.java:288
Builder mergeFrom(com.google.protobuf.Message other)
Definition Int128.java:325
static com.google.ortools.util.Int128 getDefaultInstance()
Definition Int128.java:468
static com.google.ortools.util.Int128 parseFrom(byte[] data)
Definition Int128.java:172
static com.google.ortools.util.Int128 parseFrom(java.nio.ByteBuffer data)
Definition Int128.java:150
static com.google.ortools.util.Int128 parseFrom(com.google.protobuf.CodedInputStream input)
Definition Int128.java:208
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Definition Int128.java:44
com.google.ortools.util.Int128 getDefaultInstanceForType()
Definition Int128.java:504
boolean equals(final java.lang.Object obj)
Definition Int128.java:115
static final int LOW_FIELD_NUMBER
Definition Int128.java:61
static com.google.ortools.util.Int128 parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Definition Int128.java:187
static com.google.ortools.util.Int128 parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Definition Int128.java:166
static com.google.ortools.util.Int128 parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Definition Int128.java:214
com.google.protobuf.Parser< Int128 > getParserForType()
Definition Int128.java:499
static com.google.ortools.util.Int128 parseFrom(java.io.InputStream input)
Definition Int128.java:182
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
Definition Int128.java:237
static com.google.protobuf.Parser< Int128 > parser()
Definition Int128.java:494
static com.google.ortools.util.Int128 parseFrom(com.google.protobuf.ByteString data)
Definition Int128.java:161
static Builder newBuilder()
Definition Int128.java:224
static com.google.ortools.util.Int128 parseDelimitedFrom(java.io.InputStream input)
Definition Int128.java:195
final boolean isInitialized()
Definition Int128.java:74
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Definition Int128.java:38
static com.google.ortools.util.Int128 parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Definition Int128.java:155
static final int HIGH_FIELD_NUMBER
Definition Int128.java:50
static com.google.ortools.util.Int128 parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Definition Int128.java:201
void writeTo(com.google.protobuf.CodedOutputStream output)
Definition Int128.java:84
static com.google.ortools.util.Int128 parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Definition Int128.java:176
static Builder newBuilder(com.google.ortools.util.Int128 prototype)
Definition Int128.java:227