Google OR-Tools v9.14
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
FlowNodeProto.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/graph/flow_problem.proto
4// Protobuf Java Version: 4.31.1
5
6package com.google.ortools.graph;
7
11@com.google.protobuf.Generated
12public final class FlowNodeProto extends
13 com.google.protobuf.GeneratedMessage implements
14 // @@protoc_insertion_point(message_implements:operations_research.FlowNodeProto)
16private static final long serialVersionUID = 0L;
17 static {
18 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
19 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
20 /* major= */ 4,
21 /* minor= */ 31,
22 /* patch= */ 1,
23 /* suffix= */ "",
24 FlowNodeProto.class.getName());
25 }
26 // Use FlowNodeProto.newBuilder() to construct.
27 private FlowNodeProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
28 super(builder);
29 }
30 private FlowNodeProto() {
31 }
32
33 public static final com.google.protobuf.Descriptors.Descriptor
35 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_descriptor;
36 }
37
38 @java.lang.Override
39 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
41 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_fieldAccessorTable
42 .ensureFieldAccessorsInitialized(
43 com.google.ortools.graph.FlowNodeProto.class, com.google.ortools.graph.FlowNodeProto.Builder.class);
44 }
45
46 private int bitField0_;
47 public static final int ID_FIELD_NUMBER = 1;
48 private long id_ = 0L;
59 @java.lang.Override
60 public boolean hasId() {
61 return ((bitField0_ & 0x00000001) != 0);
62 }
63
73 @java.lang.Override
74 public long getId() {
75 return id_;
76 }
77
78 public static final int SUPPLY_FIELD_NUMBER = 2;
79 private long supply_ = 0L;
89 @java.lang.Override
90 public boolean hasSupply() {
91 return ((bitField0_ & 0x00000002) != 0);
92 }
93
102 @java.lang.Override
103 public long getSupply() {
104 return supply_;
105 }
106
107 private byte memoizedIsInitialized = -1;
108 @java.lang.Override
109 public final boolean isInitialized() {
110 byte isInitialized = memoizedIsInitialized;
111 if (isInitialized == 1) return true;
112 if (isInitialized == 0) return false;
113
114 memoizedIsInitialized = 1;
115 return true;
116 }
117
118 @java.lang.Override
119 public void writeTo(com.google.protobuf.CodedOutputStream output)
120 throws java.io.IOException {
121 if (((bitField0_ & 0x00000001) != 0)) {
122 output.writeInt64(1, id_);
123 }
124 if (((bitField0_ & 0x00000002) != 0)) {
125 output.writeInt64(2, supply_);
126 }
127 getUnknownFields().writeTo(output);
128 }
129
130 @java.lang.Override
131 public int getSerializedSize() {
132 int size = memoizedSize;
133 if (size != -1) return size;
134
135 size = 0;
136 if (((bitField0_ & 0x00000001) != 0)) {
137 size += com.google.protobuf.CodedOutputStream
138 .computeInt64Size(1, id_);
139 }
140 if (((bitField0_ & 0x00000002) != 0)) {
141 size += com.google.protobuf.CodedOutputStream
142 .computeInt64Size(2, supply_);
143 }
144 size += getUnknownFields().getSerializedSize();
145 memoizedSize = size;
146 return size;
147 }
148
149 @java.lang.Override
150 public boolean equals(final java.lang.Object obj) {
151 if (obj == this) {
152 return true;
153 }
154 if (!(obj instanceof com.google.ortools.graph.FlowNodeProto)) {
155 return super.equals(obj);
156 }
157 com.google.ortools.graph.FlowNodeProto other = (com.google.ortools.graph.FlowNodeProto) obj;
158
159 if (hasId() != other.hasId()) return false;
160 if (hasId()) {
161 if (getId()
162 != other.getId()) return false;
163 }
164 if (hasSupply() != other.hasSupply()) return false;
165 if (hasSupply()) {
166 if (getSupply()
167 != other.getSupply()) return false;
168 }
169 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
170 return true;
171 }
172
173 @java.lang.Override
174 public int hashCode() {
175 if (memoizedHashCode != 0) {
176 return memoizedHashCode;
177 }
178 int hash = 41;
179 hash = (19 * hash) + getDescriptor().hashCode();
180 if (hasId()) {
181 hash = (37 * hash) + ID_FIELD_NUMBER;
182 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
183 getId());
184 }
185 if (hasSupply()) {
186 hash = (37 * hash) + SUPPLY_FIELD_NUMBER;
187 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
188 getSupply());
189 }
190 hash = (29 * hash) + getUnknownFields().hashCode();
191 memoizedHashCode = hash;
192 return hash;
193 }
194
196 java.nio.ByteBuffer data)
197 throws com.google.protobuf.InvalidProtocolBufferException {
198 return PARSER.parseFrom(data);
199 }
201 java.nio.ByteBuffer data,
202 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
203 throws com.google.protobuf.InvalidProtocolBufferException {
204 return PARSER.parseFrom(data, extensionRegistry);
205 }
207 com.google.protobuf.ByteString data)
208 throws com.google.protobuf.InvalidProtocolBufferException {
209 return PARSER.parseFrom(data);
210 }
212 com.google.protobuf.ByteString data,
213 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
214 throws com.google.protobuf.InvalidProtocolBufferException {
215 return PARSER.parseFrom(data, extensionRegistry);
216 }
218 throws com.google.protobuf.InvalidProtocolBufferException {
219 return PARSER.parseFrom(data);
220 }
222 byte[] data,
223 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
224 throws com.google.protobuf.InvalidProtocolBufferException {
225 return PARSER.parseFrom(data, extensionRegistry);
226 }
227 public static com.google.ortools.graph.FlowNodeProto parseFrom(java.io.InputStream input)
228 throws java.io.IOException {
229 return com.google.protobuf.GeneratedMessage
230 .parseWithIOException(PARSER, input);
231 }
233 java.io.InputStream input,
234 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
235 throws java.io.IOException {
236 return com.google.protobuf.GeneratedMessage
237 .parseWithIOException(PARSER, input, extensionRegistry);
238 }
239
240 public static com.google.ortools.graph.FlowNodeProto parseDelimitedFrom(java.io.InputStream input)
241 throws java.io.IOException {
242 return com.google.protobuf.GeneratedMessage
243 .parseDelimitedWithIOException(PARSER, input);
244 }
245
247 java.io.InputStream input,
248 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
249 throws java.io.IOException {
250 return com.google.protobuf.GeneratedMessage
251 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
252 }
254 com.google.protobuf.CodedInputStream input)
255 throws java.io.IOException {
256 return com.google.protobuf.GeneratedMessage
257 .parseWithIOException(PARSER, input);
258 }
260 com.google.protobuf.CodedInputStream input,
261 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
262 throws java.io.IOException {
263 return com.google.protobuf.GeneratedMessage
264 .parseWithIOException(PARSER, input, extensionRegistry);
265 }
266
267 @java.lang.Override
268 public Builder newBuilderForType() { return newBuilder(); }
269 public static Builder newBuilder() {
270 return DEFAULT_INSTANCE.toBuilder();
271 }
272 public static Builder newBuilder(com.google.ortools.graph.FlowNodeProto prototype) {
273 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
274 }
275 @java.lang.Override
277 return this == DEFAULT_INSTANCE
278 ? new Builder() : new Builder().mergeFrom(this);
279 }
280
281 @java.lang.Override
283 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
284 Builder builder = new Builder(parent);
285 return builder;
286 }
287
290 public static final class Builder extends
291 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
292 // @@protoc_insertion_point(builder_implements:operations_research.FlowNodeProto)
294 public static final com.google.protobuf.Descriptors.Descriptor
296 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_descriptor;
297 }
298
299 @java.lang.Override
300 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
302 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_fieldAccessorTable
303 .ensureFieldAccessorsInitialized(
304 com.google.ortools.graph.FlowNodeProto.class, com.google.ortools.graph.FlowNodeProto.Builder.class);
305 }
306
307 // Construct using com.google.ortools.graph.FlowNodeProto.newBuilder()
308 private Builder() {
309
310 }
311
312 private Builder(
313 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
314 super(parent);
315
316 }
317 @java.lang.Override
318 public Builder clear() {
319 super.clear();
320 bitField0_ = 0;
321 id_ = 0L;
322 supply_ = 0L;
323 return this;
324 }
325
326 @java.lang.Override
327 public com.google.protobuf.Descriptors.Descriptor
329 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_descriptor;
330 }
331
332 @java.lang.Override
334 return com.google.ortools.graph.FlowNodeProto.getDefaultInstance();
335 }
336
337 @java.lang.Override
340 if (!result.isInitialized()) {
341 throw newUninitializedMessageException(result);
342 }
343 return result;
344 }
345
346 @java.lang.Override
348 com.google.ortools.graph.FlowNodeProto result = new com.google.ortools.graph.FlowNodeProto(this);
349 if (bitField0_ != 0) { buildPartial0(result); }
350 onBuilt();
351 return result;
352 }
353
354 private void buildPartial0(com.google.ortools.graph.FlowNodeProto result) {
355 int from_bitField0_ = bitField0_;
356 int to_bitField0_ = 0;
357 if (((from_bitField0_ & 0x00000001) != 0)) {
358 result.id_ = id_;
359 to_bitField0_ |= 0x00000001;
360 }
361 if (((from_bitField0_ & 0x00000002) != 0)) {
362 result.supply_ = supply_;
363 to_bitField0_ |= 0x00000002;
364 }
365 result.bitField0_ |= to_bitField0_;
366 }
367
368 @java.lang.Override
369 public Builder mergeFrom(com.google.protobuf.Message other) {
370 if (other instanceof com.google.ortools.graph.FlowNodeProto) {
371 return mergeFrom((com.google.ortools.graph.FlowNodeProto)other);
372 } else {
373 super.mergeFrom(other);
374 return this;
375 }
376 }
377
378 public Builder mergeFrom(com.google.ortools.graph.FlowNodeProto other) {
379 if (other == com.google.ortools.graph.FlowNodeProto.getDefaultInstance()) return this;
380 if (other.hasId()) {
381 setId(other.getId());
382 }
383 if (other.hasSupply()) {
384 setSupply(other.getSupply());
385 }
386 this.mergeUnknownFields(other.getUnknownFields());
387 onChanged();
388 return this;
389 }
390
391 @java.lang.Override
392 public final boolean isInitialized() {
393 return true;
394 }
395
396 @java.lang.Override
397 public Builder mergeFrom(
398 com.google.protobuf.CodedInputStream input,
399 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
400 throws java.io.IOException {
401 if (extensionRegistry == null) {
402 throw new java.lang.NullPointerException();
403 }
404 try {
405 boolean done = false;
406 while (!done) {
407 int tag = input.readTag();
408 switch (tag) {
409 case 0:
410 done = true;
411 break;
412 case 8: {
413 id_ = input.readInt64();
414 bitField0_ |= 0x00000001;
415 break;
416 } // case 8
417 case 16: {
418 supply_ = input.readInt64();
419 bitField0_ |= 0x00000002;
420 break;
421 } // case 16
422 default: {
423 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
424 done = true; // was an endgroup tag
425 }
426 break;
427 } // default:
428 } // switch (tag)
429 } // while (!done)
430 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
431 throw e.unwrapIOException();
432 } finally {
433 onChanged();
434 } // finally
435 return this;
436 }
437 private int bitField0_;
438
439 private long id_ ;
450 @java.lang.Override
451 public boolean hasId() {
452 return ((bitField0_ & 0x00000001) != 0);
453 }
454
464 @java.lang.Override
465 public long getId() {
466 return id_;
467 }
468
479 public Builder setId(long value) {
480
481 id_ = value;
482 bitField0_ |= 0x00000001;
483 onChanged();
484 return this;
485 }
486
496 public Builder clearId() {
497 bitField0_ = (bitField0_ & ~0x00000001);
498 id_ = 0L;
499 onChanged();
500 return this;
501 }
502
503 private long supply_ ;
513 @java.lang.Override
514 public boolean hasSupply() {
515 return ((bitField0_ & 0x00000002) != 0);
516 }
517
526 @java.lang.Override
527 public long getSupply() {
528 return supply_;
529 }
530
540 public Builder setSupply(long value) {
541
542 supply_ = value;
543 bitField0_ |= 0x00000002;
544 onChanged();
545 return this;
546 }
547
556 public Builder clearSupply() {
557 bitField0_ = (bitField0_ & ~0x00000002);
558 supply_ = 0L;
559 onChanged();
560 return this;
561 }
562
563 // @@protoc_insertion_point(builder_scope:operations_research.FlowNodeProto)
564 }
565
566 // @@protoc_insertion_point(class_scope:operations_research.FlowNodeProto)
567 private static final com.google.ortools.graph.FlowNodeProto DEFAULT_INSTANCE;
568 static {
569 DEFAULT_INSTANCE = new com.google.ortools.graph.FlowNodeProto();
570 }
571
573 return DEFAULT_INSTANCE;
574 }
575
576 private static final com.google.protobuf.Parser<FlowNodeProto>
577 PARSER = new com.google.protobuf.AbstractParser<FlowNodeProto>() {
578 @java.lang.Override
579 public FlowNodeProto parsePartialFrom(
580 com.google.protobuf.CodedInputStream input,
581 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
582 throws com.google.protobuf.InvalidProtocolBufferException {
583 Builder builder = newBuilder();
584 try {
585 builder.mergeFrom(input, extensionRegistry);
586 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
587 throw e.setUnfinishedMessage(builder.buildPartial());
588 } catch (com.google.protobuf.UninitializedMessageException e) {
589 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
590 } catch (java.io.IOException e) {
591 throw new com.google.protobuf.InvalidProtocolBufferException(e)
592 .setUnfinishedMessage(builder.buildPartial());
593 }
594 return builder.buildPartial();
595 }
596 };
597
598 public static com.google.protobuf.Parser<FlowNodeProto> parser() {
599 return PARSER;
600 }
601
602 @java.lang.Override
603 public com.google.protobuf.Parser<FlowNodeProto> getParserForType() {
604 return PARSER;
605 }
606
607 @java.lang.Override
609 return DEFAULT_INSTANCE;
610 }
611
612}
613
com.google.ortools.graph.FlowNodeProto getDefaultInstanceForType()
com.google.ortools.graph.FlowNodeProto build()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
Builder mergeFrom(com.google.ortools.graph.FlowNodeProto other)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder mergeFrom(com.google.protobuf.Message other)
com.google.ortools.graph.FlowNodeProto buildPartial()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
static Builder newBuilder(com.google.ortools.graph.FlowNodeProto prototype)
static com.google.ortools.graph.FlowNodeProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.graph.FlowNodeProto parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
boolean equals(final java.lang.Object obj)
static com.google.ortools.graph.FlowNodeProto parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.graph.FlowNodeProto parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.graph.FlowNodeProto parseFrom(byte[] data)
static com.google.protobuf.Parser< FlowNodeProto > parser()
static com.google.ortools.graph.FlowNodeProto parseDelimitedFrom(java.io.InputStream input)
static com.google.ortools.graph.FlowNodeProto parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.graph.FlowNodeProto parseFrom(com.google.protobuf.ByteString data)
void writeTo(com.google.protobuf.CodedOutputStream output)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.graph.FlowNodeProto getDefaultInstance()
static com.google.ortools.graph.FlowNodeProto parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
com.google.ortools.graph.FlowNodeProto getDefaultInstanceForType()
com.google.protobuf.Parser< FlowNodeProto > getParserForType()
static com.google.ortools.graph.FlowNodeProto parseFrom(java.io.InputStream input)
static com.google.ortools.graph.FlowNodeProto parseFrom(com.google.protobuf.CodedInputStream input)
static com.google.ortools.graph.FlowNodeProto parseFrom(java.nio.ByteBuffer data)