6package com.google.ortools.linearsolver;
27public final class MPVariableProto
extends
28 com.google.protobuf.GeneratedMessage implements
31private static final long serialVersionUID = 0L;
33 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
34 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
39 MPVariableProto.class.getName());
42 private MPVariableProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
45 private MPVariableProto() {
46 lowerBound_ = Double.NEGATIVE_INFINITY;
47 upperBound_ = Double.POSITIVE_INFINITY;
51 public static final com.google.protobuf.Descriptors.Descriptor
53 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
57 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
59 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_fieldAccessorTable
60 .ensureFieldAccessorsInitialized(
61 com.google.ortools.linearsolver.MPVariableProto.class, com.google.ortools.linearsolver.MPVariableProto.Builder.class);
64 private int bitField0_;
66 private double lowerBound_ = Double.NEGATIVE_INFINITY;
77 return ((bitField0_ & 0x00000001) != 0);
93 private double upperBound_ = Double.POSITIVE_INFINITY;
100 return ((bitField0_ & 0x00000002) != 0);
112 private double objectiveCoefficient_ = 0D;
123 return ((bitField0_ & 0x00000004) != 0);
135 return objectiveCoefficient_;
139 private boolean isInteger_ =
false;
151 return ((bitField0_ & 0x00000008) != 0);
168 @SuppressWarnings(
"serial")
169 private volatile java.lang.Object name_ =
"";
180 return ((bitField0_ & 0x00000010) != 0);
192 java.lang.Object ref = name_;
193 if (ref instanceof java.lang.String) {
194 return (java.lang.String) ref;
196 com.google.protobuf.ByteString bs =
197 (com.google.protobuf.ByteString) ref;
198 java.lang.String s = bs.toStringUtf8();
199 if (bs.isValidUtf8()) {
214 public com.google.protobuf.ByteString
216 java.lang.Object ref = name_;
217 if (ref instanceof java.lang.String) {
218 com.google.protobuf.ByteString b =
219 com.google.protobuf.ByteString.copyFromUtf8(
220 (java.lang.String) ref);
224 return (com.google.protobuf.ByteString) ref;
229 private int branchingPriority_ = 0;
236 return ((bitField0_ & 0x00000020) != 0);
244 return branchingPriority_;
247 private byte memoizedIsInitialized = -1;
254 memoizedIsInitialized = 1;
259 public void writeTo(com.google.protobuf.CodedOutputStream output)
260 throws java.io.IOException {
261 if (((bitField0_ & 0x00000001) != 0)) {
262 output.writeDouble(1, lowerBound_);
264 if (((bitField0_ & 0x00000002) != 0)) {
265 output.writeDouble(2, upperBound_);
267 if (((bitField0_ & 0x00000004) != 0)) {
268 output.writeDouble(3, objectiveCoefficient_);
270 if (((bitField0_ & 0x00000008) != 0)) {
271 output.writeBool(4, isInteger_);
273 if (((bitField0_ & 0x00000010) != 0)) {
274 com.google.protobuf.GeneratedMessage.writeString(output, 5, name_);
276 if (((bitField0_ & 0x00000020) != 0)) {
277 output.writeInt32(6, branchingPriority_);
279 getUnknownFields().writeTo(output);
284 int size = memoizedSize;
285 if (size != -1)
return size;
288 if (((bitField0_ & 0x00000001) != 0)) {
289 size += com.google.protobuf.CodedOutputStream
290 .computeDoubleSize(1, lowerBound_);
292 if (((bitField0_ & 0x00000002) != 0)) {
293 size += com.google.protobuf.CodedOutputStream
294 .computeDoubleSize(2, upperBound_);
296 if (((bitField0_ & 0x00000004) != 0)) {
297 size += com.google.protobuf.CodedOutputStream
298 .computeDoubleSize(3, objectiveCoefficient_);
300 if (((bitField0_ & 0x00000008) != 0)) {
301 size += com.google.protobuf.CodedOutputStream
302 .computeBoolSize(4, isInteger_);
304 if (((bitField0_ & 0x00000010) != 0)) {
305 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, name_);
307 if (((bitField0_ & 0x00000020) != 0)) {
308 size += com.google.protobuf.CodedOutputStream
309 .computeInt32Size(6, branchingPriority_);
311 size += getUnknownFields().getSerializedSize();
317 public boolean equals(
final java.lang.Object obj) {
321 if (!(obj instanceof com.google.ortools.linearsolver.MPVariableProto)) {
322 return super.equals(obj);
329 != java.lang.Double.doubleToLongBits(
335 != java.lang.Double.doubleToLongBits(
341 != java.lang.Double.doubleToLongBits(
359 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
365 if (memoizedHashCode != 0) {
366 return memoizedHashCode;
372 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
377 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
382 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
387 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
392 hash = (53 * hash) +
getName().hashCode();
398 hash = (29 * hash) + getUnknownFields().hashCode();
399 memoizedHashCode = hash;
404 java.nio.ByteBuffer data)
405 throws com.google.protobuf.InvalidProtocolBufferException {
406 return PARSER.parseFrom(data);
409 java.nio.ByteBuffer data,
410 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
411 throws com.google.protobuf.InvalidProtocolBufferException {
412 return PARSER.parseFrom(data, extensionRegistry);
415 com.google.protobuf.ByteString data)
416 throws com.google.protobuf.InvalidProtocolBufferException {
417 return PARSER.parseFrom(data);
420 com.google.protobuf.ByteString data,
421 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
422 throws com.google.protobuf.InvalidProtocolBufferException {
423 return PARSER.parseFrom(data, extensionRegistry);
426 throws com.google.protobuf.InvalidProtocolBufferException {
427 return PARSER.parseFrom(data);
431 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
432 throws com.google.protobuf.InvalidProtocolBufferException {
433 return PARSER.parseFrom(data, extensionRegistry);
436 throws java.io.IOException {
437 return com.google.protobuf.GeneratedMessage
438 .parseWithIOException(PARSER, input);
441 java.io.InputStream input,
442 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
443 throws java.io.IOException {
444 return com.google.protobuf.GeneratedMessage
445 .parseWithIOException(PARSER, input, extensionRegistry);
449 throws java.io.IOException {
450 return com.google.protobuf.GeneratedMessage
451 .parseDelimitedWithIOException(PARSER, input);
455 java.io.InputStream input,
456 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
457 throws java.io.IOException {
458 return com.google.protobuf.GeneratedMessage
459 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
462 com.google.protobuf.CodedInputStream input)
463 throws java.io.IOException {
464 return com.google.protobuf.GeneratedMessage
465 .parseWithIOException(PARSER, input);
468 com.google.protobuf.CodedInputStream input,
469 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
470 throws java.io.IOException {
471 return com.google.protobuf.GeneratedMessage
472 .parseWithIOException(PARSER, input, extensionRegistry);
478 return DEFAULT_INSTANCE.toBuilder();
481 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
485 return this == DEFAULT_INSTANCE
491 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
514 public static final class Builder
extends
515 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
518 public static final com.google.protobuf.Descriptors.Descriptor
520 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
524 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
526 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_fieldAccessorTable
527 .ensureFieldAccessorsInitialized(
528 com.google.ortools.linearsolver.MPVariableProto.class, com.google.ortools.linearsolver.MPVariableProto.Builder.class);
537 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
545 lowerBound_ = Double.NEGATIVE_INFINITY;
546 upperBound_ = Double.POSITIVE_INFINITY;
547 objectiveCoefficient_ = 0D;
550 branchingPriority_ = 0;
555 public com.google.protobuf.Descriptors.Descriptor
557 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
562 return com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance();
569 throw newUninitializedMessageException(result);
577 if (bitField0_ != 0) { buildPartial0(result); }
582 private void buildPartial0(com.google.ortools.linearsolver.MPVariableProto result) {
583 int from_bitField0_ = bitField0_;
584 int to_bitField0_ = 0;
585 if (((from_bitField0_ & 0x00000001) != 0)) {
586 result.lowerBound_ = lowerBound_;
587 to_bitField0_ |= 0x00000001;
589 if (((from_bitField0_ & 0x00000002) != 0)) {
590 result.upperBound_ = upperBound_;
591 to_bitField0_ |= 0x00000002;
593 if (((from_bitField0_ & 0x00000004) != 0)) {
594 result.objectiveCoefficient_ = objectiveCoefficient_;
595 to_bitField0_ |= 0x00000004;
597 if (((from_bitField0_ & 0x00000008) != 0)) {
598 result.isInteger_ = isInteger_;
599 to_bitField0_ |= 0x00000008;
601 if (((from_bitField0_ & 0x00000010) != 0)) {
602 result.name_ = name_;
603 to_bitField0_ |= 0x00000010;
605 if (((from_bitField0_ & 0x00000020) != 0)) {
606 result.branchingPriority_ = branchingPriority_;
607 to_bitField0_ |= 0x00000020;
609 result.bitField0_ |= to_bitField0_;
613 public Builder
mergeFrom(com.google.protobuf.Message other) {
614 if (other instanceof com.google.ortools.linearsolver.MPVariableProto) {
615 return mergeFrom((com.google.ortools.linearsolver.MPVariableProto)other);
617 super.mergeFrom(other);
622 public Builder
mergeFrom(com.google.ortools.linearsolver.MPVariableProto other) {
623 if (other == com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance())
return this;
624 if (other.hasLowerBound()) {
627 if (other.hasUpperBound()) {
630 if (other.hasObjectiveCoefficient()) {
633 if (other.hasIsInteger()) {
636 if (other.hasName()) {
638 bitField0_ |= 0x00000010;
641 if (other.hasBranchingPriority()) {
644 this.mergeUnknownFields(other.getUnknownFields());
656 com.google.protobuf.CodedInputStream input,
657 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
658 throws java.io.IOException {
659 if (extensionRegistry ==
null) {
660 throw new java.lang.NullPointerException();
663 boolean done =
false;
665 int tag = input.readTag();
671 lowerBound_ = input.readDouble();
672 bitField0_ |= 0x00000001;
676 upperBound_ = input.readDouble();
677 bitField0_ |= 0x00000002;
681 objectiveCoefficient_ = input.readDouble();
682 bitField0_ |= 0x00000004;
686 isInteger_ = input.readBool();
687 bitField0_ |= 0x00000008;
691 name_ = input.readBytes();
692 bitField0_ |= 0x00000010;
696 branchingPriority_ = input.readInt32();
697 bitField0_ |= 0x00000020;
701 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
708 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
709 throw e.unwrapIOException();
715 private int bitField0_;
717 private double lowerBound_ = Double.NEGATIVE_INFINITY;
728 return ((bitField0_ & 0x00000001) != 0);
754 bitField0_ |= 0x00000001;
767 bitField0_ = (bitField0_ & ~0x00000001);
768 lowerBound_ = Double.NEGATIVE_INFINITY;
773 private double upperBound_ = Double.POSITIVE_INFINITY;
780 return ((bitField0_ & 0x00000002) != 0);
798 bitField0_ |= 0x00000002;
807 bitField0_ = (bitField0_ & ~0x00000002);
808 upperBound_ = Double.POSITIVE_INFINITY;
813 private double objectiveCoefficient_ ;
824 return ((bitField0_ & 0x00000004) != 0);
836 return objectiveCoefficient_;
849 objectiveCoefficient_ = value;
850 bitField0_ |= 0x00000004;
863 bitField0_ = (bitField0_ & ~0x00000004);
864 objectiveCoefficient_ = 0D;
869 private boolean isInteger_ ;
881 return ((bitField0_ & 0x00000008) != 0);
909 bitField0_ |= 0x00000008;
923 bitField0_ = (bitField0_ & ~0x00000008);
929 private java.lang.Object name_ =
"";
939 return ((bitField0_ & 0x00000010) != 0);
950 java.lang.Object ref = name_;
951 if (!(ref instanceof java.lang.String)) {
952 com.google.protobuf.ByteString bs =
953 (com.google.protobuf.ByteString) ref;
954 java.lang.String s = bs.toStringUtf8();
955 if (bs.isValidUtf8()) {
960 return (java.lang.String) ref;
971 public com.google.protobuf.ByteString
973 java.lang.Object ref = name_;
974 if (ref instanceof String) {
975 com.google.protobuf.ByteString b =
976 com.google.protobuf.ByteString.copyFromUtf8(
977 (java.lang.String) ref);
981 return (com.google.protobuf.ByteString) ref;
994 java.lang.String value) {
995 if (value ==
null) {
throw new NullPointerException(); }
997 bitField0_ |= 0x00000010;
1011 bitField0_ = (bitField0_ & ~0x00000010);
1025 com.google.protobuf.ByteString value) {
1026 if (value ==
null) {
throw new NullPointerException(); }
1028 bitField0_ |= 0x00000010;
1033 private int branchingPriority_ ;
1040 return ((bitField0_ & 0x00000020) != 0);
1048 return branchingPriority_;
1057 branchingPriority_ = value;
1058 bitField0_ |= 0x00000020;
1067 bitField0_ = (bitField0_ & ~0x00000020);
1068 branchingPriority_ = 0;
1079 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPVariableProto();
1083 return DEFAULT_INSTANCE;
1090 com.google.protobuf.CodedInputStream input,
1091 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1092 throws com.google.protobuf.InvalidProtocolBufferException {
1095 builder.mergeFrom(input, extensionRegistry);
1096 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1097 throw e.setUnfinishedMessage(builder.buildPartial());
1098 }
catch (com.google.protobuf.UninitializedMessageException e) {
1099 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1100 }
catch (java.io.IOException e) {
1101 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1102 .setUnfinishedMessage(builder.buildPartial());
1104 return builder.buildPartial();
1108 public static com.google.protobuf.Parser<MPVariableProto>
parser() {
1119 return DEFAULT_INSTANCE;