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