5package com.google.ortools.linearsolver;
27 com.google.protobuf.GeneratedMessage implements
30private static final long serialVersionUID = 0L;
32 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
33 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
41 private MPVariableProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
45 lowerBound_ = Double.NEGATIVE_INFINITY;
46 upperBound_ = Double.POSITIVE_INFINITY;
50 public static final com.google.protobuf.Descriptors.Descriptor
52 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
56 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
58 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_fieldAccessorTable
59 .ensureFieldAccessorsInitialized(
60 com.google.ortools.linearsolver.MPVariableProto.class, com.google.ortools.linearsolver.MPVariableProto.Builder.class);
63 private int bitField0_;
65 private double lowerBound_ = Double.NEGATIVE_INFINITY;
76 return ((bitField0_ & 0x00000001) != 0);
92 private double upperBound_ = Double.POSITIVE_INFINITY;
99 return ((bitField0_ & 0x00000002) != 0);
111 private double objectiveCoefficient_ = 0D;
122 return ((bitField0_ & 0x00000004) != 0);
134 return objectiveCoefficient_;
138 private boolean isInteger_ =
false;
150 return ((bitField0_ & 0x00000008) != 0);
167 @SuppressWarnings(
"serial")
168 private volatile java.lang.Object name_ = "";
179 return ((bitField0_ & 0x00000010) != 0);
191 java.lang.Object ref = name_;
192 if (ref instanceof java.lang.String) {
193 return (java.lang.String) ref;
195 com.google.protobuf.ByteString bs =
196 (com.google.protobuf.ByteString) ref;
197 java.lang.String s = bs.toStringUtf8();
198 if (bs.isValidUtf8()) {
213 public com.google.protobuf.ByteString
215 java.lang.Object ref = name_;
216 if (ref instanceof java.lang.String) {
217 com.google.protobuf.ByteString b =
218 com.google.protobuf.ByteString.copyFromUtf8(
219 (java.lang.String) ref);
223 return (com.google.protobuf.ByteString) ref;
228 private int branchingPriority_ = 0;
235 return ((bitField0_ & 0x00000020) != 0);
243 return branchingPriority_;
246 private byte memoizedIsInitialized = -1;
253 memoizedIsInitialized = 1;
258 public void writeTo(com.google.protobuf.CodedOutputStream output)
259 throws java.io.IOException {
260 if (((bitField0_ & 0x00000001) != 0)) {
261 output.writeDouble(1, lowerBound_);
263 if (((bitField0_ & 0x00000002) != 0)) {
264 output.writeDouble(2, upperBound_);
266 if (((bitField0_ & 0x00000004) != 0)) {
267 output.writeDouble(3, objectiveCoefficient_);
269 if (((bitField0_ & 0x00000008) != 0)) {
270 output.writeBool(4, isInteger_);
272 if (((bitField0_ & 0x00000010) != 0)) {
273 com.google.protobuf.GeneratedMessage.writeString(output, 5, name_);
275 if (((bitField0_ & 0x00000020) != 0)) {
276 output.writeInt32(6, branchingPriority_);
278 getUnknownFields().writeTo(output);
283 int size = memoizedSize;
284 if (size != -1)
return size;
287 if (((bitField0_ & 0x00000001) != 0)) {
288 size += com.google.protobuf.CodedOutputStream
289 .computeDoubleSize(1, lowerBound_);
291 if (((bitField0_ & 0x00000002) != 0)) {
292 size += com.google.protobuf.CodedOutputStream
293 .computeDoubleSize(2, upperBound_);
295 if (((bitField0_ & 0x00000004) != 0)) {
296 size += com.google.protobuf.CodedOutputStream
297 .computeDoubleSize(3, objectiveCoefficient_);
299 if (((bitField0_ & 0x00000008) != 0)) {
300 size += com.google.protobuf.CodedOutputStream
301 .computeBoolSize(4, isInteger_);
303 if (((bitField0_ & 0x00000010) != 0)) {
304 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, name_);
306 if (((bitField0_ & 0x00000020) != 0)) {
307 size += com.google.protobuf.CodedOutputStream
308 .computeInt32Size(6, branchingPriority_);
310 size += getUnknownFields().getSerializedSize();
316 public boolean equals(
final java.lang.Object obj) {
320 if (!(obj instanceof com.google.ortools.linearsolver.MPVariableProto)) {
321 return super.equals(obj);
328 != java.lang.Double.doubleToLongBits(
334 != java.lang.Double.doubleToLongBits(
340 != java.lang.Double.doubleToLongBits(
358 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
364 if (memoizedHashCode != 0) {
365 return memoizedHashCode;
371 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
376 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
381 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
386 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
391 hash = (53 * hash) +
getName().hashCode();
397 hash = (29 * hash) + getUnknownFields().hashCode();
398 memoizedHashCode = hash;
403 java.nio.ByteBuffer data)
404 throws com.google.protobuf.InvalidProtocolBufferException {
405 return PARSER.parseFrom(data);
408 java.nio.ByteBuffer data,
409 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
410 throws com.google.protobuf.InvalidProtocolBufferException {
411 return PARSER.parseFrom(data, extensionRegistry);
414 com.google.protobuf.ByteString data)
415 throws com.google.protobuf.InvalidProtocolBufferException {
416 return PARSER.parseFrom(data);
419 com.google.protobuf.ByteString data,
420 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
421 throws com.google.protobuf.InvalidProtocolBufferException {
422 return PARSER.parseFrom(data, extensionRegistry);
425 throws com.google.protobuf.InvalidProtocolBufferException {
426 return PARSER.parseFrom(data);
430 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
431 throws com.google.protobuf.InvalidProtocolBufferException {
432 return PARSER.parseFrom(data, extensionRegistry);
435 throws java.io.IOException {
436 return com.google.protobuf.GeneratedMessage
437 .parseWithIOException(PARSER, input);
440 java.io.InputStream input,
441 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
442 throws java.io.IOException {
443 return com.google.protobuf.GeneratedMessage
444 .parseWithIOException(PARSER, input, extensionRegistry);
448 throws java.io.IOException {
449 return com.google.protobuf.GeneratedMessage
450 .parseDelimitedWithIOException(PARSER, input);
454 java.io.InputStream input,
455 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
456 throws java.io.IOException {
457 return com.google.protobuf.GeneratedMessage
458 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
461 com.google.protobuf.CodedInputStream input)
462 throws java.io.IOException {
463 return com.google.protobuf.GeneratedMessage
464 .parseWithIOException(PARSER, input);
467 com.google.protobuf.CodedInputStream input,
468 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
469 throws java.io.IOException {
470 return com.google.protobuf.GeneratedMessage
471 .parseWithIOException(PARSER, input, extensionRegistry);
484 return this == DEFAULT_INSTANCE
490 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
514 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
517 public static final com.google.protobuf.Descriptors.Descriptor
519 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
523 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
525 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_fieldAccessorTable
526 .ensureFieldAccessorsInitialized(
527 com.google.ortools.linearsolver.MPVariableProto.class, com.google.ortools.linearsolver.MPVariableProto.Builder.class);
536 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
544 lowerBound_ = Double.NEGATIVE_INFINITY;
545 upperBound_ = Double.POSITIVE_INFINITY;
546 objectiveCoefficient_ = 0D;
549 branchingPriority_ = 0;
554 public com.google.protobuf.Descriptors.Descriptor
556 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
561 return com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance();
568 throw newUninitializedMessageException(result);
576 if (bitField0_ != 0) { buildPartial0(result); }
581 private void buildPartial0(com.google.ortools.linearsolver.MPVariableProto result) {
582 int from_bitField0_ = bitField0_;
583 int to_bitField0_ = 0;
584 if (((from_bitField0_ & 0x00000001) != 0)) {
585 result.lowerBound_ = lowerBound_;
586 to_bitField0_ |= 0x00000001;
588 if (((from_bitField0_ & 0x00000002) != 0)) {
589 result.upperBound_ = upperBound_;
590 to_bitField0_ |= 0x00000002;
592 if (((from_bitField0_ & 0x00000004) != 0)) {
593 result.objectiveCoefficient_ = objectiveCoefficient_;
594 to_bitField0_ |= 0x00000004;
596 if (((from_bitField0_ & 0x00000008) != 0)) {
597 result.isInteger_ = isInteger_;
598 to_bitField0_ |= 0x00000008;
600 if (((from_bitField0_ & 0x00000010) != 0)) {
601 result.name_ = name_;
602 to_bitField0_ |= 0x00000010;
604 if (((from_bitField0_ & 0x00000020) != 0)) {
605 result.branchingPriority_ = branchingPriority_;
606 to_bitField0_ |= 0x00000020;
608 result.bitField0_ |= to_bitField0_;
613 if (other instanceof com.google.ortools.linearsolver.MPVariableProto) {
614 return mergeFrom((com.google.ortools.linearsolver.MPVariableProto)other);
616 super.mergeFrom(other);
622 if (other == com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance())
return this;
623 if (other.hasLowerBound()) {
626 if (other.hasUpperBound()) {
629 if (other.hasObjectiveCoefficient()) {
632 if (other.hasIsInteger()) {
635 if (other.hasName()) {
637 bitField0_ |= 0x00000010;
640 if (other.hasBranchingPriority()) {
643 this.mergeUnknownFields(other.getUnknownFields());
655 com.google.protobuf.CodedInputStream input,
656 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
657 throws java.io.IOException {
658 if (extensionRegistry ==
null) {
659 throw new java.lang.NullPointerException();
662 boolean done =
false;
664 int tag = input.readTag();
670 lowerBound_ = input.readDouble();
671 bitField0_ |= 0x00000001;
675 upperBound_ = input.readDouble();
676 bitField0_ |= 0x00000002;
680 objectiveCoefficient_ = input.readDouble();
681 bitField0_ |= 0x00000004;
685 isInteger_ = input.readBool();
686 bitField0_ |= 0x00000008;
690 name_ = input.readBytes();
691 bitField0_ |= 0x00000010;
695 branchingPriority_ = input.readInt32();
696 bitField0_ |= 0x00000020;
700 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
707 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
708 throw e.unwrapIOException();
714 private int bitField0_;
716 private double lowerBound_ = Double.NEGATIVE_INFINITY;
727 return ((bitField0_ & 0x00000001) != 0);
753 bitField0_ |= 0x00000001;
766 bitField0_ = (bitField0_ & ~0x00000001);
767 lowerBound_ = Double.NEGATIVE_INFINITY;
772 private double upperBound_ = Double.POSITIVE_INFINITY;
779 return ((bitField0_ & 0x00000002) != 0);
797 bitField0_ |= 0x00000002;
806 bitField0_ = (bitField0_ & ~0x00000002);
807 upperBound_ = Double.POSITIVE_INFINITY;
812 private double objectiveCoefficient_ ;
823 return ((bitField0_ & 0x00000004) != 0);
835 return objectiveCoefficient_;
848 objectiveCoefficient_ = value;
849 bitField0_ |= 0x00000004;
862 bitField0_ = (bitField0_ & ~0x00000004);
863 objectiveCoefficient_ = 0D;
868 private boolean isInteger_ ;
880 return ((bitField0_ & 0x00000008) != 0);
908 bitField0_ |= 0x00000008;
922 bitField0_ = (bitField0_ & ~0x00000008);
928 private java.lang.Object name_ =
"";
938 return ((bitField0_ & 0x00000010) != 0);
949 java.lang.Object ref = name_;
950 if (!(ref instanceof java.lang.String)) {
951 com.google.protobuf.ByteString bs =
952 (com.google.protobuf.ByteString) ref;
953 java.lang.String s = bs.toStringUtf8();
954 if (bs.isValidUtf8()) {
959 return (java.lang.String) ref;
970 public com.google.protobuf.ByteString
972 java.lang.Object ref = name_;
973 if (ref instanceof String) {
974 com.google.protobuf.ByteString b =
975 com.google.protobuf.ByteString.copyFromUtf8(
976 (java.lang.String) ref);
980 return (com.google.protobuf.ByteString) ref;
993 java.lang.String value) {
994 if (value ==
null) {
throw new NullPointerException(); }
996 bitField0_ |= 0x00000010;
1010 bitField0_ = (bitField0_ & ~0x00000010);
1024 com.google.protobuf.ByteString value) {
1025 if (value ==
null) {
throw new NullPointerException(); }
1027 bitField0_ |= 0x00000010;
1032 private int branchingPriority_ ;
1039 return ((bitField0_ & 0x00000020) != 0);
1047 return branchingPriority_;
1056 branchingPriority_ = value;
1057 bitField0_ |= 0x00000020;
1066 bitField0_ = (bitField0_ & ~0x00000020);
1067 branchingPriority_ = 0;
1078 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPVariableProto();
1082 return DEFAULT_INSTANCE;
1089 com.google.protobuf.CodedInputStream input,
1090 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1091 throws com.google.protobuf.InvalidProtocolBufferException {
1094 builder.mergeFrom(input, extensionRegistry);
1095 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1096 throw e.setUnfinishedMessage(builder.buildPartial());
1097 }
catch (com.google.protobuf.UninitializedMessageException e) {
1098 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1099 }
catch (java.io.IOException e) {
1100 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1101 .setUnfinishedMessage(builder.buildPartial());
1103 return builder.buildPartial();
1118 return DEFAULT_INSTANCE;