5package com.google.ortools.linearsolver;
21 com.google.protobuf.GeneratedMessage implements
24private static final long serialVersionUID = 0L;
26 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
27 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
41 public static final com.google.protobuf.Descriptors.Descriptor
43 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_descriptor;
47 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
49 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_fieldAccessorTable
50 .ensureFieldAccessorsInitialized(
51 com.google.ortools.linearsolver.MPIndicatorConstraint.class, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder.class);
54 private int bitField0_;
56 private int varIndex_ = 0;
68 return ((bitField0_ & 0x00000001) != 0);
85 private int varValue_ = 0;
96 return ((bitField0_ & 0x00000002) != 0);
123 return ((bitField0_ & 0x00000004) != 0);
135 return constraint_ ==
null ? com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance() : constraint_;
146 return constraint_ ==
null ? com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance() : constraint_;
149 private byte memoizedIsInitialized = -1;
156 memoizedIsInitialized = 1;
161 public void writeTo(com.google.protobuf.CodedOutputStream output)
162 throws java.io.IOException {
163 if (((bitField0_ & 0x00000001) != 0)) {
164 output.writeInt32(1, varIndex_);
166 if (((bitField0_ & 0x00000002) != 0)) {
167 output.writeInt32(2, varValue_);
169 if (((bitField0_ & 0x00000004) != 0)) {
172 getUnknownFields().writeTo(output);
177 int size = memoizedSize;
178 if (size != -1)
return size;
181 if (((bitField0_ & 0x00000001) != 0)) {
182 size += com.google.protobuf.CodedOutputStream
183 .computeInt32Size(1, varIndex_);
185 if (((bitField0_ & 0x00000002) != 0)) {
186 size += com.google.protobuf.CodedOutputStream
187 .computeInt32Size(2, varValue_);
189 if (((bitField0_ & 0x00000004) != 0)) {
190 size += com.google.protobuf.CodedOutputStream
193 size += getUnknownFields().getSerializedSize();
199 public boolean equals(
final java.lang.Object obj) {
203 if (!(obj instanceof com.google.ortools.linearsolver.MPIndicatorConstraint)) {
204 return super.equals(obj);
223 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
229 if (memoizedHashCode != 0) {
230 return memoizedHashCode;
246 hash = (29 * hash) + getUnknownFields().hashCode();
247 memoizedHashCode = hash;
252 java.nio.ByteBuffer data)
253 throws com.google.protobuf.InvalidProtocolBufferException {
254 return PARSER.parseFrom(data);
257 java.nio.ByteBuffer data,
258 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
259 throws com.google.protobuf.InvalidProtocolBufferException {
260 return PARSER.parseFrom(data, extensionRegistry);
263 com.google.protobuf.ByteString data)
264 throws com.google.protobuf.InvalidProtocolBufferException {
265 return PARSER.parseFrom(data);
268 com.google.protobuf.ByteString data,
269 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
270 throws com.google.protobuf.InvalidProtocolBufferException {
271 return PARSER.parseFrom(data, extensionRegistry);
274 throws com.google.protobuf.InvalidProtocolBufferException {
275 return PARSER.parseFrom(data);
279 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
280 throws com.google.protobuf.InvalidProtocolBufferException {
281 return PARSER.parseFrom(data, extensionRegistry);
284 throws java.io.IOException {
285 return com.google.protobuf.GeneratedMessage
286 .parseWithIOException(PARSER, input);
289 java.io.InputStream input,
290 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
291 throws java.io.IOException {
292 return com.google.protobuf.GeneratedMessage
293 .parseWithIOException(PARSER, input, extensionRegistry);
297 throws java.io.IOException {
298 return com.google.protobuf.GeneratedMessage
299 .parseDelimitedWithIOException(PARSER, input);
303 java.io.InputStream input,
304 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
305 throws java.io.IOException {
306 return com.google.protobuf.GeneratedMessage
307 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
310 com.google.protobuf.CodedInputStream input)
311 throws java.io.IOException {
312 return com.google.protobuf.GeneratedMessage
313 .parseWithIOException(PARSER, input);
316 com.google.protobuf.CodedInputStream input,
317 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
318 throws java.io.IOException {
319 return com.google.protobuf.GeneratedMessage
320 .parseWithIOException(PARSER, input, extensionRegistry);
328 public static Builder newBuilder(com.google.ortools.linearsolver.MPIndicatorConstraint prototype) {
333 return this == DEFAULT_INSTANCE
339 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
357 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
360 public static final com.google.protobuf.Descriptors.Descriptor
362 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_descriptor;
366 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
368 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_fieldAccessorTable
369 .ensureFieldAccessorsInitialized(
370 com.google.ortools.linearsolver.MPIndicatorConstraint.class, com.google.ortools.linearsolver.MPIndicatorConstraint.Builder.class);
375 maybeForceBuilderInitialization();
379 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
381 maybeForceBuilderInitialization();
383 private void maybeForceBuilderInitialization() {
384 if (com.google.protobuf.GeneratedMessage
385 .alwaysUseFieldBuilders) {
386 getConstraintFieldBuilder();
396 if (constraintBuilder_ !=
null) {
397 constraintBuilder_.dispose();
398 constraintBuilder_ =
null;
404 public com.google.protobuf.Descriptors.Descriptor
406 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPIndicatorConstraint_descriptor;
411 return com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance();
418 throw newUninitializedMessageException(result);
426 if (bitField0_ != 0) { buildPartial0(result); }
431 private void buildPartial0(com.google.ortools.linearsolver.MPIndicatorConstraint result) {
432 int from_bitField0_ = bitField0_;
433 int to_bitField0_ = 0;
434 if (((from_bitField0_ & 0x00000001) != 0)) {
435 result.varIndex_ = varIndex_;
436 to_bitField0_ |= 0x00000001;
438 if (((from_bitField0_ & 0x00000002) != 0)) {
439 result.varValue_ = varValue_;
440 to_bitField0_ |= 0x00000002;
442 if (((from_bitField0_ & 0x00000004) != 0)) {
443 result.constraint_ = constraintBuilder_ ==
null
445 : constraintBuilder_.build();
446 to_bitField0_ |= 0x00000004;
448 result.bitField0_ |= to_bitField0_;
453 if (other instanceof com.google.ortools.linearsolver.MPIndicatorConstraint) {
454 return mergeFrom((com.google.ortools.linearsolver.MPIndicatorConstraint)other);
456 super.mergeFrom(other);
462 if (other == com.google.ortools.linearsolver.MPIndicatorConstraint.getDefaultInstance())
return this;
463 if (other.hasVarIndex()) {
466 if (other.hasVarValue()) {
469 if (other.hasConstraint()) {
472 this.mergeUnknownFields(other.getUnknownFields());
484 com.google.protobuf.CodedInputStream input,
485 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
486 throws java.io.IOException {
487 if (extensionRegistry ==
null) {
488 throw new java.lang.NullPointerException();
491 boolean done =
false;
493 int tag = input.readTag();
499 varIndex_ = input.readInt32();
500 bitField0_ |= 0x00000001;
504 varValue_ = input.readInt32();
505 bitField0_ |= 0x00000002;
510 getConstraintFieldBuilder().getBuilder(),
512 bitField0_ |= 0x00000004;
516 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
523 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
524 throw e.unwrapIOException();
530 private int bitField0_;
532 private int varIndex_ ;
544 return ((bitField0_ & 0x00000001) != 0);
572 bitField0_ |= 0x00000001;
586 bitField0_ = (bitField0_ & ~0x00000001);
592 private int varValue_ ;
603 return ((bitField0_ & 0x00000002) != 0);
629 bitField0_ |= 0x00000002;
642 bitField0_ = (bitField0_ & ~0x00000002);
649 private com.google.protobuf.SingleFieldBuilder<
650 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder> constraintBuilder_;
660 return ((bitField0_ & 0x00000004) != 0);
671 if (constraintBuilder_ ==
null) {
672 return constraint_ ==
null ? com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance() : constraint_;
674 return constraintBuilder_.getMessage();
685 if (constraintBuilder_ ==
null) {
687 throw new NullPointerException();
691 constraintBuilder_.setMessage(value);
693 bitField0_ |= 0x00000004;
705 com.google.ortools.linearsolver.MPConstraintProto.Builder builderForValue) {
706 if (constraintBuilder_ ==
null) {
707 constraint_ = builderForValue.build();
709 constraintBuilder_.setMessage(builderForValue.build());
711 bitField0_ |= 0x00000004;
723 if (constraintBuilder_ ==
null) {
724 if (((bitField0_ & 0x00000004) != 0) &&
725 constraint_ !=
null &&
726 constraint_ != com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance()) {
732 constraintBuilder_.mergeFrom(value);
734 if (constraint_ !=
null) {
735 bitField0_ |= 0x00000004;
748 bitField0_ = (bitField0_ & ~0x00000004);
750 if (constraintBuilder_ !=
null) {
751 constraintBuilder_.dispose();
752 constraintBuilder_ =
null;
765 bitField0_ |= 0x00000004;
767 return getConstraintFieldBuilder().getBuilder();
777 if (constraintBuilder_ !=
null) {
778 return constraintBuilder_.getMessageOrBuilder();
780 return constraint_ ==
null ?
781 com.google.ortools.linearsolver.MPConstraintProto.getDefaultInstance() : constraint_;
791 private com.google.protobuf.SingleFieldBuilder<
792 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>
793 getConstraintFieldBuilder() {
794 if (constraintBuilder_ ==
null) {
795 constraintBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
796 com.google.ortools.linearsolver.MPConstraintProto, com.google.ortools.linearsolver.MPConstraintProto.Builder, com.google.ortools.linearsolver.MPConstraintProtoOrBuilder>(
798 getParentForChildren(),
802 return constraintBuilder_;
811 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPIndicatorConstraint();
815 return DEFAULT_INSTANCE;
822 com.google.protobuf.CodedInputStream input,
823 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
824 throws com.google.protobuf.InvalidProtocolBufferException {
827 builder.mergeFrom(input, extensionRegistry);
828 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
829 throw e.setUnfinishedMessage(builder.buildPartial());
830 }
catch (com.google.protobuf.UninitializedMessageException e) {
831 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
832 }
catch (java.io.IOException e) {
833 throw new com.google.protobuf.InvalidProtocolBufferException(e)
834 .setUnfinishedMessage(builder.buildPartial());
836 return builder.buildPartial();
851 return DEFAULT_INSTANCE;