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