5package com.google.ortools.linearsolver;
21 com.google.protobuf.GeneratedMessageV3 implements
24private static final long serialVersionUID = 0L;
33 @SuppressWarnings({
"unused"})
35 UnusedPrivateParameter unused) {
39 public static final com.google.protobuf.Descriptors.Descriptor
41 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_descriptor;
45 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
47 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_fieldAccessorTable
48 .ensureFieldAccessorsInitialized(
49 com.google.ortools.linearsolver.MPIndicatorConstraint.class, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder.class);
52 private int bitField0_;
54 private int varIndex_ = 0;
66 return ((bitField0_ & 0x00000001) != 0);
83 private int varValue_ = 0;
94 return ((bitField0_ & 0x00000002) != 0);
121 return ((bitField0_ & 0x00000004) != 0);
133 return constraint_ ==
null ? com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance() : constraint_;
144 return constraint_ ==
null ? com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance() : constraint_;
147 private byte memoizedIsInitialized = -1;
154 memoizedIsInitialized = 1;
159 public void writeTo(com.google.protobuf.CodedOutputStream output)
160 throws java.io.IOException {
161 if (((bitField0_ & 0x00000001) != 0)) {
162 output.writeInt32(1, varIndex_);
164 if (((bitField0_ & 0x00000002) != 0)) {
165 output.writeInt32(2, varValue_);
167 if (((bitField0_ & 0x00000004) != 0)) {
170 getUnknownFields().writeTo(output);
175 int size = memoizedSize;
176 if (size != -1)
return size;
179 if (((bitField0_ & 0x00000001) != 0)) {
180 size += com.google.protobuf.CodedOutputStream
181 .computeInt32Size(1, varIndex_);
183 if (((bitField0_ & 0x00000002) != 0)) {
184 size += com.google.protobuf.CodedOutputStream
185 .computeInt32Size(2, varValue_);
187 if (((bitField0_ & 0x00000004) != 0)) {
188 size += com.google.protobuf.CodedOutputStream
191 size += getUnknownFields().getSerializedSize();
197 public boolean equals(
final java.lang.Object obj) {
201 if (!(obj instanceof com.google.ortools.linearsolver.MPIndicatorConstraint)) {
202 return super.equals(obj);
221 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
227 if (memoizedHashCode != 0) {
228 return memoizedHashCode;
244 hash = (29 * hash) + getUnknownFields().hashCode();
245 memoizedHashCode = hash;
250 java.nio.ByteBuffer data)
251 throws com.google.protobuf.InvalidProtocolBufferException {
255 java.nio.ByteBuffer data,
256 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
257 throws com.google.protobuf.InvalidProtocolBufferException {
261 com.google.protobuf.ByteString data)
262 throws com.google.protobuf.InvalidProtocolBufferException {
266 com.google.protobuf.ByteString data,
267 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
268 throws com.google.protobuf.InvalidProtocolBufferException {
272 throws com.google.protobuf.InvalidProtocolBufferException {
277 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
278 throws com.google.protobuf.InvalidProtocolBufferException {
282 throws java.io.IOException {
283 return com.google.protobuf.GeneratedMessageV3
284 .parseWithIOException(
PARSER, input);
287 java.io.InputStream input,
288 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
289 throws java.io.IOException {
290 return com.google.protobuf.GeneratedMessageV3
291 .parseWithIOException(
PARSER, input, extensionRegistry);
295 throws java.io.IOException {
296 return com.google.protobuf.GeneratedMessageV3
297 .parseDelimitedWithIOException(
PARSER, input);
301 java.io.InputStream input,
302 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
303 throws java.io.IOException {
304 return com.google.protobuf.GeneratedMessageV3
305 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
308 com.google.protobuf.CodedInputStream input)
309 throws java.io.IOException {
310 return com.google.protobuf.GeneratedMessageV3
311 .parseWithIOException(
PARSER, input);
314 com.google.protobuf.CodedInputStream input,
315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316 throws java.io.IOException {
317 return com.google.protobuf.GeneratedMessageV3
318 .parseWithIOException(
PARSER, input, extensionRegistry);
326 public static Builder newBuilder(com.google.ortools.linearsolver.MPIndicatorConstraint prototype) {
331 return this == DEFAULT_INSTANCE
337 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
355 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
358 public static final com.google.protobuf.Descriptors.Descriptor
360 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_descriptor;
364 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
366 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_fieldAccessorTable
367 .ensureFieldAccessorsInitialized(
368 com.google.ortools.linearsolver.MPIndicatorConstraint.class, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder.class);
373 maybeForceBuilderInitialization();
377 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
379 maybeForceBuilderInitialization();
381 private void maybeForceBuilderInitialization() {
382 if (com.google.protobuf.GeneratedMessageV3
383 .alwaysUseFieldBuilders) {
384 getConstraintFieldBuilder();
394 if (constraintBuilder_ !=
null) {
395 constraintBuilder_.dispose();
396 constraintBuilder_ =
null;
402 public com.google.protobuf.Descriptors.Descriptor
404 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_descriptor;
409 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
416 throw newUninitializedMessageException(result);
424 if (bitField0_ != 0) { buildPartial0(result); }
429 private void buildPartial0(com.google.ortools.linearsolver.MPIndicatorConstraint result) {
430 int from_bitField0_ = bitField0_;
431 int to_bitField0_ = 0;
432 if (((from_bitField0_ & 0x00000001) != 0)) {
433 result.varIndex_ = varIndex_;
434 to_bitField0_ |= 0x00000001;
436 if (((from_bitField0_ & 0x00000002) != 0)) {
437 result.varValue_ = varValue_;
438 to_bitField0_ |= 0x00000002;
440 if (((from_bitField0_ & 0x00000004) != 0)) {
441 result.constraint_ = constraintBuilder_ ==
null
443 : constraintBuilder_.build();
444 to_bitField0_ |= 0x00000004;
446 result.bitField0_ |= to_bitField0_;
451 return super.
clone();
455 com.google.protobuf.Descriptors.FieldDescriptor field,
456 java.lang.Object value) {
457 return super.
setField(field, value);
461 com.google.protobuf.Descriptors.FieldDescriptor field) {
466 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
471 com.google.protobuf.Descriptors.FieldDescriptor field,
472 int index, java.lang.Object value) {
477 com.google.protobuf.Descriptors.FieldDescriptor field,
478 java.lang.Object value) {
483 if (other instanceof com.google.ortools.linearsolver.MPIndicatorConstraint) {
484 return mergeFrom((com.google.ortools.linearsolver.MPIndicatorConstraint)other);
486 super.mergeFrom(other);
492 if (other == com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance())
return this;
493 if (other.hasVarIndex()) {
496 if (other.hasVarValue()) {
499 if (other.hasConstraint()) {
514 com.google.protobuf.CodedInputStream input,
515 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
516 throws java.io.IOException {
517 if (extensionRegistry ==
null) {
518 throw new java.lang.NullPointerException();
521 boolean done =
false;
523 int tag = input.readTag();
529 varIndex_ = input.readInt32();
530 bitField0_ |= 0x00000001;
534 varValue_ = input.readInt32();
535 bitField0_ |= 0x00000002;
540 getConstraintFieldBuilder().getBuilder(),
542 bitField0_ |= 0x00000004;
546 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
553 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
554 throw e.unwrapIOException();
560 private int bitField0_;
562 private int varIndex_ ;
574 return ((bitField0_ & 0x00000001) != 0);
602 bitField0_ |= 0x00000001;
616 bitField0_ = (bitField0_ & ~0x00000001);
622 private int varValue_ ;
633 return ((bitField0_ & 0x00000002) != 0);
659 bitField0_ |= 0x00000002;
672 bitField0_ = (bitField0_ & ~0x00000002);
679 private com.google.protobuf.SingleFieldBuilderV3<
680 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> constraintBuilder_;
690 return ((bitField0_ & 0x00000004) != 0);
701 if (constraintBuilder_ ==
null) {
702 return constraint_ ==
null ? com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance() : constraint_;
704 return constraintBuilder_.getMessage();
715 if (constraintBuilder_ ==
null) {
717 throw new NullPointerException();
721 constraintBuilder_.setMessage(value);
723 bitField0_ |= 0x00000004;
735 com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
736 if (constraintBuilder_ ==
null) {
737 constraint_ = builderForValue.build();
739 constraintBuilder_.setMessage(builderForValue.build());
741 bitField0_ |= 0x00000004;
753 if (constraintBuilder_ ==
null) {
754 if (((bitField0_ & 0x00000004) != 0) &&
755 constraint_ !=
null &&
756 constraint_ != com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance()) {
762 constraintBuilder_.mergeFrom(value);
764 if (constraint_ !=
null) {
765 bitField0_ |= 0x00000004;
778 bitField0_ = (bitField0_ & ~0x00000004);
780 if (constraintBuilder_ !=
null) {
781 constraintBuilder_.dispose();
782 constraintBuilder_ =
null;
795 bitField0_ |= 0x00000004;
797 return getConstraintFieldBuilder().getBuilder();
807 if (constraintBuilder_ !=
null) {
808 return constraintBuilder_.getMessageOrBuilder();
810 return constraint_ ==
null ?
811 com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance() : constraint_;
821 private com.google.protobuf.SingleFieldBuilderV3<
822 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
823 getConstraintFieldBuilder() {
824 if (constraintBuilder_ ==
null) {
825 constraintBuilder_ =
new com.google.protobuf.SingleFieldBuilderV3<
826 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>(
828 getParentForChildren(),
832 return constraintBuilder_;
836 final com.google.protobuf.UnknownFieldSet unknownFields) {
842 final com.google.protobuf.UnknownFieldSet unknownFields) {
853 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPIndicatorConstraint();
857 return DEFAULT_INSTANCE;
864 com.google.protobuf.CodedInputStream input,
865 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
866 throws com.google.protobuf.InvalidProtocolBufferException {
869 builder.
mergeFrom(input, extensionRegistry);
870 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
872 }
catch (com.google.protobuf.UninitializedMessageException e) {
873 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
874 }
catch (java.io.IOException e) {
875 throw new com.google.protobuf.InvalidProtocolBufferException(e)
893 return DEFAULT_INSTANCE;