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