Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
MPAbsConstraint.java
Go to the documentation of this file.
1// Generated by the protocol buffer compiler. DO NOT EDIT!
2// source: ortools/linear_solver/linear_solver.proto
3
4// Protobuf Java Version: 4.26.1
5package com.google.ortools.linearsolver;
6
14public final class MPAbsConstraint extends
15 com.google.protobuf.GeneratedMessage implements
16 // @@protoc_insertion_point(message_implements:operations_research.MPAbsConstraint)
18private static final long serialVersionUID = 0L;
19 static {
20 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
21 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
22 /* major= */ 4,
23 /* minor= */ 26,
24 /* patch= */ 1,
25 /* suffix= */ "",
26 MPAbsConstraint.class.getName());
27 }
28 // Use MPAbsConstraint.newBuilder() to construct.
29 private MPAbsConstraint(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
30 super(builder);
31 }
32 private MPAbsConstraint() {
33 }
34
35 public static final com.google.protobuf.Descriptors.Descriptor
37 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
38 }
39
40 @java.lang.Override
41 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
43 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_fieldAccessorTable
44 .ensureFieldAccessorsInitialized(
45 com.google.ortools.linearsolver.MPAbsConstraint.class, com.google.ortools.linearsolver.MPAbsConstraint.Builder.class);
46 }
47
48 private int bitField0_;
49 public static final int VAR_INDEX_FIELD_NUMBER = 1;
50 private int varIndex_ = 0;
60 @java.lang.Override
61 public boolean hasVarIndex() {
62 return ((bitField0_ & 0x00000001) != 0);
63 }
73 @java.lang.Override
74 public int getVarIndex() {
75 return varIndex_;
76 }
77
78 public static final int RESULTANT_VAR_INDEX_FIELD_NUMBER = 2;
79 private int resultantVarIndex_ = 0;
84 @java.lang.Override
85 public boolean hasResultantVarIndex() {
86 return ((bitField0_ & 0x00000002) != 0);
87 }
92 @java.lang.Override
93 public int getResultantVarIndex() {
94 return resultantVarIndex_;
95 }
96
97 private byte memoizedIsInitialized = -1;
98 @java.lang.Override
99 public final boolean isInitialized() {
100 byte isInitialized = memoizedIsInitialized;
101 if (isInitialized == 1) return true;
102 if (isInitialized == 0) return false;
103
104 memoizedIsInitialized = 1;
105 return true;
106 }
107
108 @java.lang.Override
109 public void writeTo(com.google.protobuf.CodedOutputStream output)
110 throws java.io.IOException {
111 if (((bitField0_ & 0x00000001) != 0)) {
112 output.writeInt32(1, varIndex_);
113 }
114 if (((bitField0_ & 0x00000002) != 0)) {
115 output.writeInt32(2, resultantVarIndex_);
116 }
117 getUnknownFields().writeTo(output);
118 }
119
120 @java.lang.Override
121 public int getSerializedSize() {
122 int size = memoizedSize;
123 if (size != -1) return size;
124
125 size = 0;
126 if (((bitField0_ & 0x00000001) != 0)) {
127 size += com.google.protobuf.CodedOutputStream
128 .computeInt32Size(1, varIndex_);
129 }
130 if (((bitField0_ & 0x00000002) != 0)) {
131 size += com.google.protobuf.CodedOutputStream
132 .computeInt32Size(2, resultantVarIndex_);
133 }
134 size += getUnknownFields().getSerializedSize();
135 memoizedSize = size;
136 return size;
137 }
138
139 @java.lang.Override
140 public boolean equals(final java.lang.Object obj) {
141 if (obj == this) {
142 return true;
143 }
144 if (!(obj instanceof com.google.ortools.linearsolver.MPAbsConstraint)) {
145 return super.equals(obj);
146 }
147 com.google.ortools.linearsolver.MPAbsConstraint other = (com.google.ortools.linearsolver.MPAbsConstraint) obj;
148
149 if (hasVarIndex() != other.hasVarIndex()) return false;
150 if (hasVarIndex()) {
151 if (getVarIndex()
152 != other.getVarIndex()) return false;
153 }
154 if (hasResultantVarIndex() != other.hasResultantVarIndex()) return false;
155 if (hasResultantVarIndex()) {
157 != other.getResultantVarIndex()) return false;
158 }
159 if (!getUnknownFields().equals(other.getUnknownFields())) return false;
160 return true;
161 }
162
163 @java.lang.Override
164 public int hashCode() {
165 if (memoizedHashCode != 0) {
166 return memoizedHashCode;
167 }
168 int hash = 41;
169 hash = (19 * hash) + getDescriptor().hashCode();
170 if (hasVarIndex()) {
171 hash = (37 * hash) + VAR_INDEX_FIELD_NUMBER;
172 hash = (53 * hash) + getVarIndex();
173 }
174 if (hasResultantVarIndex()) {
175 hash = (37 * hash) + RESULTANT_VAR_INDEX_FIELD_NUMBER;
176 hash = (53 * hash) + getResultantVarIndex();
177 }
178 hash = (29 * hash) + getUnknownFields().hashCode();
179 memoizedHashCode = hash;
180 return hash;
181 }
182
184 java.nio.ByteBuffer data)
185 throws com.google.protobuf.InvalidProtocolBufferException {
186 return PARSER.parseFrom(data);
187 }
189 java.nio.ByteBuffer data,
190 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
191 throws com.google.protobuf.InvalidProtocolBufferException {
192 return PARSER.parseFrom(data, extensionRegistry);
193 }
195 com.google.protobuf.ByteString data)
196 throws com.google.protobuf.InvalidProtocolBufferException {
197 return PARSER.parseFrom(data);
198 }
200 com.google.protobuf.ByteString data,
201 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
202 throws com.google.protobuf.InvalidProtocolBufferException {
203 return PARSER.parseFrom(data, extensionRegistry);
204 }
206 throws com.google.protobuf.InvalidProtocolBufferException {
207 return PARSER.parseFrom(data);
208 }
210 byte[] data,
211 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
212 throws com.google.protobuf.InvalidProtocolBufferException {
213 return PARSER.parseFrom(data, extensionRegistry);
214 }
215 public static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(java.io.InputStream input)
216 throws java.io.IOException {
217 return com.google.protobuf.GeneratedMessage
218 .parseWithIOException(PARSER, input);
219 }
221 java.io.InputStream input,
222 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
223 throws java.io.IOException {
224 return com.google.protobuf.GeneratedMessage
225 .parseWithIOException(PARSER, input, extensionRegistry);
226 }
227
229 throws java.io.IOException {
230 return com.google.protobuf.GeneratedMessage
231 .parseDelimitedWithIOException(PARSER, input);
232 }
233
235 java.io.InputStream input,
236 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
237 throws java.io.IOException {
238 return com.google.protobuf.GeneratedMessage
239 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
240 }
242 com.google.protobuf.CodedInputStream input)
243 throws java.io.IOException {
244 return com.google.protobuf.GeneratedMessage
245 .parseWithIOException(PARSER, input);
246 }
248 com.google.protobuf.CodedInputStream input,
249 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
250 throws java.io.IOException {
251 return com.google.protobuf.GeneratedMessage
252 .parseWithIOException(PARSER, input, extensionRegistry);
253 }
254
255 @java.lang.Override
256 public Builder newBuilderForType() { return newBuilder(); }
257 public static Builder newBuilder() {
258 return DEFAULT_INSTANCE.toBuilder();
259 }
260 public static Builder newBuilder(com.google.ortools.linearsolver.MPAbsConstraint prototype) {
261 return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
262 }
263 @java.lang.Override
265 return this == DEFAULT_INSTANCE
266 ? new Builder() : new Builder().mergeFrom(this);
267 }
268
269 @java.lang.Override
271 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
272 Builder builder = new Builder(parent);
273 return builder;
274 }
282 public static final class Builder extends
283 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
284 // @@protoc_insertion_point(builder_implements:operations_research.MPAbsConstraint)
285 com.google.ortools.linearsolver.MPAbsConstraintOrBuilder {
286 public static final com.google.protobuf.Descriptors.Descriptor
288 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
289 }
290
291 @java.lang.Override
292 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
294 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_fieldAccessorTable
295 .ensureFieldAccessorsInitialized(
296 com.google.ortools.linearsolver.MPAbsConstraint.class, com.google.ortools.linearsolver.MPAbsConstraint.Builder.class);
297 }
298
299 // Construct using com.google.ortools.linearsolver.MPAbsConstraint.newBuilder()
300 private Builder() {
301
302 }
303
304 private Builder(
305 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
306 super(parent);
307
308 }
309 @java.lang.Override
310 public Builder clear() {
311 super.clear();
312 bitField0_ = 0;
313 varIndex_ = 0;
314 resultantVarIndex_ = 0;
315 return this;
316 }
317
318 @java.lang.Override
319 public com.google.protobuf.Descriptors.Descriptor
321 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
322 }
323
324 @java.lang.Override
326 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
327 }
328
329 @java.lang.Override
332 if (!result.isInitialized()) {
333 throw newUninitializedMessageException(result);
334 }
335 return result;
336 }
337
338 @java.lang.Override
340 com.google.ortools.linearsolver.MPAbsConstraint result = new com.google.ortools.linearsolver.MPAbsConstraint(this);
341 if (bitField0_ != 0) { buildPartial0(result); }
342 onBuilt();
343 return result;
344 }
345
346 private void buildPartial0(com.google.ortools.linearsolver.MPAbsConstraint result) {
347 int from_bitField0_ = bitField0_;
348 int to_bitField0_ = 0;
349 if (((from_bitField0_ & 0x00000001) != 0)) {
350 result.varIndex_ = varIndex_;
351 to_bitField0_ |= 0x00000001;
352 }
353 if (((from_bitField0_ & 0x00000002) != 0)) {
354 result.resultantVarIndex_ = resultantVarIndex_;
355 to_bitField0_ |= 0x00000002;
356 }
357 result.bitField0_ |= to_bitField0_;
358 }
359
360 @java.lang.Override
361 public Builder mergeFrom(com.google.protobuf.Message other) {
362 if (other instanceof com.google.ortools.linearsolver.MPAbsConstraint) {
363 return mergeFrom((com.google.ortools.linearsolver.MPAbsConstraint)other);
364 } else {
365 super.mergeFrom(other);
366 return this;
367 }
368 }
369
370 public Builder mergeFrom(com.google.ortools.linearsolver.MPAbsConstraint other) {
371 if (other == com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance()) return this;
372 if (other.hasVarIndex()) {
373 setVarIndex(other.getVarIndex());
374 }
375 if (other.hasResultantVarIndex()) {
376 setResultantVarIndex(other.getResultantVarIndex());
377 }
378 this.mergeUnknownFields(other.getUnknownFields());
379 onChanged();
380 return this;
381 }
382
383 @java.lang.Override
384 public final boolean isInitialized() {
385 return true;
386 }
387
388 @java.lang.Override
390 com.google.protobuf.CodedInputStream input,
391 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
392 throws java.io.IOException {
393 if (extensionRegistry == null) {
394 throw new java.lang.NullPointerException();
395 }
396 try {
397 boolean done = false;
398 while (!done) {
399 int tag = input.readTag();
400 switch (tag) {
401 case 0:
402 done = true;
403 break;
404 case 8: {
405 varIndex_ = input.readInt32();
406 bitField0_ |= 0x00000001;
407 break;
408 } // case 8
409 case 16: {
410 resultantVarIndex_ = input.readInt32();
411 bitField0_ |= 0x00000002;
412 break;
413 } // case 16
414 default: {
415 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
416 done = true; // was an endgroup tag
417 }
418 break;
419 } // default:
420 } // switch (tag)
421 } // while (!done)
422 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
423 throw e.unwrapIOException();
424 } finally {
425 onChanged();
426 } // finally
427 return this;
428 }
429 private int bitField0_;
430
431 private int varIndex_ ;
441 @java.lang.Override
442 public boolean hasVarIndex() {
443 return ((bitField0_ & 0x00000001) != 0);
444 }
454 @java.lang.Override
455 public int getVarIndex() {
456 return varIndex_;
457 }
468 public Builder setVarIndex(int value) {
469
470 varIndex_ = value;
471 bitField0_ |= 0x00000001;
472 onChanged();
473 return this;
474 }
485 bitField0_ = (bitField0_ & ~0x00000001);
486 varIndex_ = 0;
487 onChanged();
488 return this;
489 }
490
491 private int resultantVarIndex_ ;
496 @java.lang.Override
497 public boolean hasResultantVarIndex() {
498 return ((bitField0_ & 0x00000002) != 0);
499 }
504 @java.lang.Override
505 public int getResultantVarIndex() {
506 return resultantVarIndex_;
507 }
513 public Builder setResultantVarIndex(int value) {
514
515 resultantVarIndex_ = value;
516 bitField0_ |= 0x00000002;
517 onChanged();
518 return this;
519 }
525 bitField0_ = (bitField0_ & ~0x00000002);
526 resultantVarIndex_ = 0;
527 onChanged();
528 return this;
529 }
530
531 // @@protoc_insertion_point(builder_scope:operations_research.MPAbsConstraint)
532 }
533
534 // @@protoc_insertion_point(class_scope:operations_research.MPAbsConstraint)
535 private static final com.google.ortools.linearsolver.MPAbsConstraint DEFAULT_INSTANCE;
536 static {
537 DEFAULT_INSTANCE = new com.google.ortools.linearsolver.MPAbsConstraint();
538 }
539
541 return DEFAULT_INSTANCE;
542 }
543
544 private static final com.google.protobuf.Parser<MPAbsConstraint>
545 PARSER = new com.google.protobuf.AbstractParser<MPAbsConstraint>() {
546 @java.lang.Override
547 public MPAbsConstraint parsePartialFrom(
548 com.google.protobuf.CodedInputStream input,
549 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
550 throws com.google.protobuf.InvalidProtocolBufferException {
551 Builder builder = newBuilder();
552 try {
553 builder.mergeFrom(input, extensionRegistry);
554 } catch (com.google.protobuf.InvalidProtocolBufferException e) {
555 throw e.setUnfinishedMessage(builder.buildPartial());
556 } catch (com.google.protobuf.UninitializedMessageException e) {
557 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
558 } catch (java.io.IOException e) {
559 throw new com.google.protobuf.InvalidProtocolBufferException(e)
560 .setUnfinishedMessage(builder.buildPartial());
561 }
562 return builder.buildPartial();
563 }
564 };
565
566 public static com.google.protobuf.Parser<MPAbsConstraint> parser() {
567 return PARSER;
568 }
569
570 @java.lang.Override
571 public com.google.protobuf.Parser<MPAbsConstraint> getParserForType() {
572 return PARSER;
573 }
574
575 @java.lang.Override
579
580}
581
Builder mergeFrom(com.google.protobuf.Message other)
com.google.ortools.linearsolver.MPAbsConstraint getDefaultInstanceForType()
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
Builder mergeFrom(com.google.ortools.linearsolver.MPAbsConstraint other)
Builder mergeFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
com.google.ortools.linearsolver.MPAbsConstraint buildPartial()
com.google.ortools.linearsolver.MPAbsConstraint build()
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
com.google.protobuf.Parser< MPAbsConstraint > getParserForType()
Builder newBuilderForType(com.google.protobuf.GeneratedMessage.BuilderParent parent)
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
boolean equals(final java.lang.Object obj)
static com.google.protobuf.Parser< MPAbsConstraint > parser()
static com.google.ortools.linearsolver.MPAbsConstraint parseDelimitedFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static Builder newBuilder(com.google.ortools.linearsolver.MPAbsConstraint prototype)
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(byte[] data)
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(byte[] data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(java.io.InputStream input)
com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable()
static com.google.ortools.linearsolver.MPAbsConstraint getDefaultInstance()
com.google.ortools.linearsolver.MPAbsConstraint getDefaultInstanceForType()
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(com.google.protobuf.ByteString data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(java.io.InputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(com.google.protobuf.CodedInputStream input)
static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(java.nio.ByteBuffer data)
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(java.nio.ByteBuffer data, com.google.protobuf.ExtensionRegistryLite extensionRegistry)
static com.google.ortools.linearsolver.MPAbsConstraint parseFrom(com.google.protobuf.ByteString data)
void writeTo(com.google.protobuf.CodedOutputStream output)
static com.google.ortools.linearsolver.MPAbsConstraint parseDelimitedFrom(java.io.InputStream input)