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