Google OR-Tools v9.9
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// source: ortools/graph/flow_problem.proto
3
4// Protobuf Java Version: 3.25.3
5package com.google.ortools.graph;
6
10public final class FlowNodeProto extends
11 com.google.protobuf.GeneratedMessageV3 implements
12 // @@protoc_insertion_point(message_implements:operations_research.FlowNodeProto)
14private static final long serialVersionUID = 0L;
15 // Use FlowNodeProto.newBuilder() to construct.
16 private FlowNodeProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
17 super(builder);
18 }
19 private FlowNodeProto() {
20 }
21
22 @java.lang.Override
23 @SuppressWarnings({"unused"})
24 protected java.lang.Object newInstance(
25 UnusedPrivateParameter unused) {
26 return new FlowNodeProto();
27 }
28
29 public static final com.google.protobuf.Descriptors.Descriptor
31 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_descriptor;
32 }
33
34 @java.lang.Override
35 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
37 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_fieldAccessorTable
38 .ensureFieldAccessorsInitialized(
39 com.google.ortools.graph.FlowNodeProto.class, com.google.ortools.graph.FlowNodeProto.Builder.class);
40 }
41
42 private int bitField0_;
43 public static final int ID_FIELD_NUMBER = 1;
44 private long id_ = 0L;
55 @java.lang.Override
56 public boolean hasId() {
57 return ((bitField0_ & 0x00000001) != 0);
58 }
69 @java.lang.Override
70 public long getId() {
71 return id_;
72 }
73
74 public static final int SUPPLY_FIELD_NUMBER = 2;
75 private long supply_ = 0L;
85 @java.lang.Override
86 public boolean hasSupply() {
87 return ((bitField0_ & 0x00000002) != 0);
88 }
98 @java.lang.Override
99 public long getSupply() {
100 return supply_;
101 }
102
103 private byte memoizedIsInitialized = -1;
104 @java.lang.Override
105 public final boolean isInitialized() {
106 byte isInitialized = memoizedIsInitialized;
107 if (isInitialized == 1) return true;
108 if (isInitialized == 0) return false;
109
110 memoizedIsInitialized = 1;
111 return true;
112 }
113
114 @java.lang.Override
115 public void writeTo(com.google.protobuf.CodedOutputStream output)
116 throws java.io.IOException {
117 if (((bitField0_ & 0x00000001) != 0)) {
118 output.writeInt64(1, id_);
119 }
120 if (((bitField0_ & 0x00000002) != 0)) {
121 output.writeInt64(2, supply_);
122 }
123 getUnknownFields().writeTo(output);
124 }
125
126 @java.lang.Override
127 public int getSerializedSize() {
128 int size = memoizedSize;
129 if (size != -1) return size;
130
131 size = 0;
132 if (((bitField0_ & 0x00000001) != 0)) {
133 size += com.google.protobuf.CodedOutputStream
134 .computeInt64Size(1, id_);
135 }
136 if (((bitField0_ & 0x00000002) != 0)) {
137 size += com.google.protobuf.CodedOutputStream
138 .computeInt64Size(2, supply_);
139 }
140 size += getUnknownFields().getSerializedSize();
141 memoizedSize = size;
142 return size;
143 }
144
145 @java.lang.Override
146 public boolean equals(final java.lang.Object obj) {
147 if (obj == this) {
148 return true;
149 }
150 if (!(obj instanceof com.google.ortools.graph.FlowNodeProto)) {
151 return super.equals(obj);
152 }
153 com.google.ortools.graph.FlowNodeProto other = (com.google.ortools.graph.FlowNodeProto) obj;
154
155 if (hasId() != other.hasId()) return false;
156 if (hasId()) {
157 if (getId()
158 != other.getId()) return false;
159 }
160 if (hasSupply() != other.hasSupply()) return false;
161 if (hasSupply()) {
162 if (getSupply()
163 != other.getSupply()) return false;
164 }
165 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
166 return true;
167 }
168
169 @java.lang.Override
170 public int hashCode() {
171 if (memoizedHashCode != 0) {
172 return memoizedHashCode;
173 }
174 int hash = 41;
175 hash = (19 * hash) + getDescriptor().hashCode();
176 if (hasId()) {
177 hash = (37 * hash) + ID_FIELD_NUMBER;
178 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
179 getId());
180 }
181 if (hasSupply()) {
182 hash = (37 * hash) + SUPPLY_FIELD_NUMBER;
183 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
184 getSupply());
185 }
186 hash = (29 * hash) + getUnknownFields().hashCode();
187 memoizedHashCode = hash;
188 return hash;
189 }
190
192 java.nio.ByteBuffer data)
193 throws com.google.protobuf.InvalidProtocolBufferException {
194 return PARSER.parseFrom(data);
195 }
197 java.nio.ByteBuffer data,
198 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
199 throws com.google.protobuf.InvalidProtocolBufferException {
200 return PARSER.parseFrom(data, extensionRegistry);
201 }
203 com.google.protobuf.ByteString data)
204 throws com.google.protobuf.InvalidProtocolBufferException {
205 return PARSER.parseFrom(data);
206 }
208 com.google.protobuf.ByteString data,
209 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
210 throws com.google.protobuf.InvalidProtocolBufferException {
211 return PARSER.parseFrom(data, extensionRegistry);
212 }
214 throws com.google.protobuf.InvalidProtocolBufferException {
215 return PARSER.parseFrom(data);
216 }
218 byte[] data,
219 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
220 throws com.google.protobuf.InvalidProtocolBufferException {
221 return PARSER.parseFrom(data, extensionRegistry);
222 }
223 public static com.google.ortools.graph.FlowNodeProto parseFrom(java.io.InputStream input)
224 throws java.io.IOException {
225 return com.google.protobuf.GeneratedMessageV3
226 .parseWithIOException(PARSER, input);
227 }
229 java.io.InputStream input,
230 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
231 throws java.io.IOException {
232 return com.google.protobuf.GeneratedMessageV3
233 .parseWithIOException(PARSER, input, extensionRegistry);
234 }
235
236 public static com.google.ortools.graph.FlowNodeProto parseDelimitedFrom(java.io.InputStream input)
237 throws java.io.IOException {
238 return com.google.protobuf.GeneratedMessageV3
239 .parseDelimitedWithIOException(PARSER, input);
240 }
241
243 java.io.InputStream input,
244 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
245 throws java.io.IOException {
246 return com.google.protobuf.GeneratedMessageV3
247 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
248 }
250 com.google.protobuf.CodedInputStream input)
251 throws java.io.IOException {
252 return com.google.protobuf.GeneratedMessageV3
253 .parseWithIOException(PARSER, input);
254 }
256 com.google.protobuf.CodedInputStream input,
257 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
258 throws java.io.IOException {
259 return com.google.protobuf.GeneratedMessageV3
260 .parseWithIOException(PARSER, input, extensionRegistry);
261 }
262
263 @java.lang.Override
264 public Builder newBuilderForType() { return newBuilder(); }
265 public static Builder newBuilder() {
266 return DEFAULT_INSTANCE.toBuilder();
267 }
268 public static Builder newBuilder(com.google.ortools.graph.FlowNodeProto prototype) {
269 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
270 }
271 @java.lang.Override
273 return this == DEFAULT_INSTANCE
274 ? new Builder() : new Builder().mergeFrom(this);
275 }
276
277 @java.lang.Override
279 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
280 Builder builder = new Builder(parent);
281 return builder;
282 }
286 public static final class Builder extends
287 com.google.protobuf.GeneratedMessageV3.Builder<Builder> implements
288 // @@protoc_insertion_point(builder_implements:operations_research.FlowNodeProto)
289 com.google.ortools.graph.FlowNodeProtoOrBuilder {
290 public static final com.google.protobuf.Descriptors.Descriptor
292 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_descriptor;
293 }
294
295 @java.lang.Override
296 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
298 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_fieldAccessorTable
299 .ensureFieldAccessorsInitialized(
300 com.google.ortools.graph.FlowNodeProto.class, com.google.ortools.graph.FlowNodeProto.Builder.class);
301 }
302
303 // Construct using com.google.ortools.graph.FlowNodeProto.newBuilder()
304 private Builder() {
305
306 }
307
308 private Builder(
309 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
310 super(parent);
311
312 }
313 @java.lang.Override
314 public Builder clear() {
315 super.clear();
316 bitField0_ = 0;
317 id_ = 0L;
318 supply_ = 0L;
319 return this;
320 }
321
322 @java.lang.Override
323 public com.google.protobuf.Descriptors.Descriptor
325 return com.google.ortools.graph.FlowProblem.internal_static_operations_research_FlowNodeProto_descriptor;
326 }
327
328 @java.lang.Override
330 return com.google.ortools.graph.FlowNodeProto.getDefaultInstance();
331 }
332
333 @java.lang.Override
336 if (!result.isInitialized()) {
337 throw newUninitializedMessageException(result);
338 }
339 return result;
340 }
341
342 @java.lang.Override
344 com.google.ortools.graph.FlowNodeProto result = new com.google.ortools.graph.FlowNodeProto(this);
345 if (bitField0_ != 0) { buildPartial0(result); }
346 onBuilt();
347 return result;
348 }
349
350 private void buildPartial0(com.google.ortools.graph.FlowNodeProto result) {
351 int from_bitField0_ = bitField0_;
352 int to_bitField0_ = 0;
353 if (((from_bitField0_ & 0x00000001) != 0)) {
354 result.id_ = id_;
355 to_bitField0_ |= 0x00000001;
356 }
357 if (((from_bitField0_ & 0x00000002) != 0)) {
358 result.supply_ = supply_;
359 to_bitField0_ |= 0x00000002;
360 }
361 result.bitField0_ |= to_bitField0_;
362 }
363
364 @java.lang.Override
365 public Builder clone() {
366 return super.clone();
367 }
368 @java.lang.Override
370 com.google.protobuf.Descriptors.FieldDescriptor field,
371 java.lang.Object value) {
372 return super.setField(field, value);
373 }
374 @java.lang.Override
376 com.google.protobuf.Descriptors.FieldDescriptor field) {
377 return super.clearField(field);
378 }
379 @java.lang.Override
381 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
382 return super.clearOneof(oneof);
383 }
384 @java.lang.Override
386 com.google.protobuf.Descriptors.FieldDescriptor field,
387 int index, java.lang.Object value) {
388 return super.setRepeatedField(field, index, value);
389 }
390 @java.lang.Override
392 com.google.protobuf.Descriptors.FieldDescriptor field,
393 java.lang.Object value) {
394 return super.addRepeatedField(field, value);
395 }
396 @java.lang.Override
397 public Builder mergeFrom(com.google.protobuf.Message other) {
398 if (other instanceof com.google.ortools.graph.FlowNodeProto) {
399 return mergeFrom((com.google.ortools.graph.FlowNodeProto)other);
400 } else {
401 super.mergeFrom(other);
402 return this;
403 }
404 }
405
406 public Builder mergeFrom(com.google.ortools.graph.FlowNodeProto other) {
407 if (other == com.google.ortools.graph.FlowNodeProto.getDefaultInstance()) return this;
408 if (other.hasId()) {
409 setId(other.getId());
410 }
411 if (other.hasSupply()) {
412 setSupply(other.getSupply());
413 }
414 this.mergeUnknownFields(other.getUnknownFields());
415 onChanged();
416 return this;
417 }
418
419 @java.lang.Override
420 public final boolean isInitialized() {
421 return true;
422 }
423
424 @java.lang.Override
426 com.google.protobuf.CodedInputStream input,
427 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
428 throws java.io.IOException {
429 if (extensionRegistry == null) {
430 throw new java.lang.NullPointerException();
431 }
432 try {
433 boolean done = false;
434 while (!done) {
435 int tag = input.readTag();
436 switch (tag) {
437 case 0:
438 done = true;
439 break;
440 case 8: {
441 id_ = input.readInt64();
442 bitField0_ |= 0x00000001;
443 break;
444 } // case 8
445 case 16: {
446 supply_ = input.readInt64();
447 bitField0_ |= 0x00000002;
448 break;
449 } // case 16
450 default: {
451 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
452 done = true; // was an endgroup tag
453 }
454 break;
455 } // default:
456 } // switch (tag)
457 } // while (!done)
458 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
459 throw e.unwrapIOException();
460 } finally {
461 onChanged();
462 } // finally
463 return this;
464 }
465 private int bitField0_;
466
467 private long id_ ;
478 @java.lang.Override
479 public boolean hasId() {
480 return ((bitField0_ & 0x00000001) != 0);
481 }
492 @java.lang.Override
493 public long getId() {
494 return id_;
495 }
507 public Builder setId(long value) {
508
509 id_ = value;
510 bitField0_ |= 0x00000001;
511 onChanged();
512 return this;
513 }
524 public Builder clearId() {
525 bitField0_ = (bitField0_ & ~0x00000001);
526 id_ = 0L;
527 onChanged();
528 return this;
529 }
530
531 private long supply_ ;
541 @java.lang.Override
542 public boolean hasSupply() {
543 return ((bitField0_ & 0x00000002) != 0);
544 }
554 @java.lang.Override
555 public long getSupply() {
556 return supply_;
557 }
568 public Builder setSupply(long value) {
569
570 supply_ = value;
571 bitField0_ |= 0x00000002;
572 onChanged();
573 return this;
574 }
585 bitField0_ = (bitField0_ & ~0x00000002);
586 supply_ = 0L;
587 onChanged();
588 return this;
589 }
590 @java.lang.Override
592 final com.google.protobuf.UnknownFieldSet unknownFields) {
593 return super.setUnknownFields(unknownFields);
594 }
595
596 @java.lang.Override
598 final com.google.protobuf.UnknownFieldSet unknownFields) {
599 return super.mergeUnknownFields(unknownFields);
600 }
601
602
603 // @@protoc_insertion_point(builder_scope:operations_research.FlowNodeProto)
604 }
605
606 // @@protoc_insertion_point(class_scope:operations_research.FlowNodeProto)
607 private static final com.google.ortools.graph.FlowNodeProto DEFAULT_INSTANCE;
608 static {
609 DEFAULT_INSTANCE = new com.google.ortools.graph.FlowNodeProto();
610 }
611
613 return DEFAULT_INSTANCE;
614 }
615
616 @java.lang.Deprecated public static final com.google.protobuf.Parser<FlowNodeProto>
617 PARSER = new com.google.protobuf.AbstractParser<FlowNodeProto>() {
618 @java.lang.Override
619 public FlowNodeProto parsePartialFrom(
620 com.google.protobuf.CodedInputStream input,
621 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
622 throws com.google.protobuf.InvalidProtocolBufferException {
623 Builder builder = newBuilder();
624 try {
625 builder.mergeFrom(input, extensionRegistry);
626 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
627 throw e.setUnfinishedMessage(builder.buildPartial());
628 } catch (com.google.protobuf.UninitializedMessageException e) {
629 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
630 } catch (java.io.IOException e) {
631 throw new com.google.protobuf.InvalidProtocolBufferException(e)
632 .setUnfinishedMessage(builder.buildPartial());
633 }
634 return builder.buildPartial();
635 }
636 };
637
638 public static com.google.protobuf.Parser<FlowNodeProto> parser() {
639 return PARSER;
640 }
641
642 @java.lang.Override
643 public com.google.protobuf.Parser<FlowNodeProto> getParserForType() {
644 return PARSER;
645 }
646
647 @java.lang.Override
649 return DEFAULT_INSTANCE;
650 }
651
652}
653
final Builder setUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
com.google.ortools.graph.FlowNodeProto getDefaultInstanceForType()
Builder clearOneof(com.google.protobuf.Descriptors.OneofDescriptor oneof)
com.google.ortools.graph.FlowNodeProto build()
Builder mergeFrom(com.google.ortools.graph.FlowNodeProto other)
Builder setField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
final Builder mergeUnknownFields(final com.google.protobuf.UnknownFieldSet unknownFields)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
Builder addRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, java.lang.Object value)
Builder mergeFrom(com.google.protobuf.Message other)
Builder clearField(com.google.protobuf.Descriptors.FieldDescriptor field)
com.google.ortools.graph.FlowNodeProto buildPartial()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
Builder setRepeatedField(com.google.protobuf.Descriptors.FieldDescriptor field, int index, java.lang.Object value)
static Builder newBuilder(com.google.ortools.graph.FlowNodeProto prototype)
Builder newBuilderForType(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
static com.google.ortools.graph.FlowNodeProto parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
java.lang.Object newInstance(UnusedPrivateParameter unused)
com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
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)
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 final com.google.protobuf.Parser< FlowNodeProto > PARSER
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)
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)