6package com.google.ortools.linearsolver;
27@com.google.protobuf.Generated
28public final class MPVariableProto
extends
29 com.google.protobuf.GeneratedMessage implements
32private static final long serialVersionUID = 0L;
34 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
35 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
40 MPVariableProto.class.getName());
43 private MPVariableProto(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
46 private MPVariableProto() {
47 lowerBound_ = Double.NEGATIVE_INFINITY;
48 upperBound_ = Double.POSITIVE_INFINITY;
52 public static final com.google.protobuf.Descriptors.Descriptor
54 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
58 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
60 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_fieldAccessorTable
61 .ensureFieldAccessorsInitialized(
62 com.google.ortools.linearsolver.MPVariableProto.class, com.google.ortools.linearsolver.MPVariableProto.Builder.class);
65 private int bitField0_;
67 private double lowerBound_ = Double.NEGATIVE_INFINITY;
78 return ((bitField0_ & 0x00000001) != 0);
94 private double upperBound_ = Double.POSITIVE_INFINITY;
101 return ((bitField0_ & 0x00000002) != 0);
113 private double objectiveCoefficient_ = 0D;
124 return ((bitField0_ & 0x00000004) != 0);
136 return objectiveCoefficient_;
140 private boolean isInteger_ =
false;
152 return ((bitField0_ & 0x00000008) != 0);
169 @SuppressWarnings(
"serial")
170 private volatile java.lang.Object name_ =
"";
181 return ((bitField0_ & 0x00000010) != 0);
193 java.lang.Object ref = name_;
194 if (ref instanceof java.lang.String) {
195 return (java.lang.String) ref;
197 com.google.protobuf.ByteString bs =
198 (com.google.protobuf.ByteString) ref;
199 java.lang.String s = bs.toStringUtf8();
200 if (bs.isValidUtf8()) {
215 public com.google.protobuf.ByteString
217 java.lang.Object ref = name_;
218 if (ref instanceof java.lang.String) {
219 com.google.protobuf.ByteString b =
220 com.google.protobuf.ByteString.copyFromUtf8(
221 (java.lang.String) ref);
225 return (com.google.protobuf.ByteString) ref;
230 private int branchingPriority_ = 0;
237 return ((bitField0_ & 0x00000020) != 0);
245 return branchingPriority_;
248 private byte memoizedIsInitialized = -1;
255 memoizedIsInitialized = 1;
260 public void writeTo(com.google.protobuf.CodedOutputStream output)
261 throws java.io.IOException {
262 if (((bitField0_ & 0x00000001) != 0)) {
263 output.writeDouble(1, lowerBound_);
265 if (((bitField0_ & 0x00000002) != 0)) {
266 output.writeDouble(2, upperBound_);
268 if (((bitField0_ & 0x00000004) != 0)) {
269 output.writeDouble(3, objectiveCoefficient_);
271 if (((bitField0_ & 0x00000008) != 0)) {
272 output.writeBool(4, isInteger_);
274 if (((bitField0_ & 0x00000010) != 0)) {
275 com.google.protobuf.GeneratedMessage.writeString(output, 5, name_);
277 if (((bitField0_ & 0x00000020) != 0)) {
278 output.writeInt32(6, branchingPriority_);
280 getUnknownFields().writeTo(output);
285 int size = memoizedSize;
286 if (size != -1)
return size;
289 if (((bitField0_ & 0x00000001) != 0)) {
290 size += com.google.protobuf.CodedOutputStream
291 .computeDoubleSize(1, lowerBound_);
293 if (((bitField0_ & 0x00000002) != 0)) {
294 size += com.google.protobuf.CodedOutputStream
295 .computeDoubleSize(2, upperBound_);
297 if (((bitField0_ & 0x00000004) != 0)) {
298 size += com.google.protobuf.CodedOutputStream
299 .computeDoubleSize(3, objectiveCoefficient_);
301 if (((bitField0_ & 0x00000008) != 0)) {
302 size += com.google.protobuf.CodedOutputStream
303 .computeBoolSize(4, isInteger_);
305 if (((bitField0_ & 0x00000010) != 0)) {
306 size += com.google.protobuf.GeneratedMessage.computeStringSize(5, name_);
308 if (((bitField0_ & 0x00000020) != 0)) {
309 size += com.google.protobuf.CodedOutputStream
310 .computeInt32Size(6, branchingPriority_);
312 size += getUnknownFields().getSerializedSize();
318 public boolean equals(
final java.lang.Object obj) {
322 if (!(obj instanceof com.google.ortools.linearsolver.MPVariableProto)) {
323 return super.equals(obj);
330 != java.lang.Double.doubleToLongBits(
336 != java.lang.Double.doubleToLongBits(
342 != java.lang.Double.doubleToLongBits(
360 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
366 if (memoizedHashCode != 0) {
367 return memoizedHashCode;
373 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
378 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
383 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
388 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
393 hash = (53 * hash) +
getName().hashCode();
399 hash = (29 * hash) + getUnknownFields().hashCode();
400 memoizedHashCode = hash;
405 java.nio.ByteBuffer data)
406 throws com.google.protobuf.InvalidProtocolBufferException {
407 return PARSER.parseFrom(data);
410 java.nio.ByteBuffer data,
411 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
412 throws com.google.protobuf.InvalidProtocolBufferException {
413 return PARSER.parseFrom(data, extensionRegistry);
416 com.google.protobuf.ByteString data)
417 throws com.google.protobuf.InvalidProtocolBufferException {
418 return PARSER.parseFrom(data);
421 com.google.protobuf.ByteString data,
422 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
423 throws com.google.protobuf.InvalidProtocolBufferException {
424 return PARSER.parseFrom(data, extensionRegistry);
427 throws com.google.protobuf.InvalidProtocolBufferException {
428 return PARSER.parseFrom(data);
432 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
433 throws com.google.protobuf.InvalidProtocolBufferException {
434 return PARSER.parseFrom(data, extensionRegistry);
437 throws java.io.IOException {
438 return com.google.protobuf.GeneratedMessage
439 .parseWithIOException(PARSER, input);
442 java.io.InputStream input,
443 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
444 throws java.io.IOException {
445 return com.google.protobuf.GeneratedMessage
446 .parseWithIOException(PARSER, input, extensionRegistry);
450 throws java.io.IOException {
451 return com.google.protobuf.GeneratedMessage
452 .parseDelimitedWithIOException(PARSER, input);
456 java.io.InputStream input,
457 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
458 throws java.io.IOException {
459 return com.google.protobuf.GeneratedMessage
460 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
463 com.google.protobuf.CodedInputStream input)
464 throws java.io.IOException {
465 return com.google.protobuf.GeneratedMessage
466 .parseWithIOException(PARSER, input);
469 com.google.protobuf.CodedInputStream input,
470 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
471 throws java.io.IOException {
472 return com.google.protobuf.GeneratedMessage
473 .parseWithIOException(PARSER, input, extensionRegistry);
479 return DEFAULT_INSTANCE.toBuilder();
482 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
486 return this == DEFAULT_INSTANCE
492 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
515 public static final class Builder
extends
516 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
519 public static final com.google.protobuf.Descriptors.Descriptor
521 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
525 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
527 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_fieldAccessorTable
528 .ensureFieldAccessorsInitialized(
529 com.google.ortools.linearsolver.MPVariableProto.class, com.google.ortools.linearsolver.MPVariableProto.Builder.class);
538 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
546 lowerBound_ = Double.NEGATIVE_INFINITY;
547 upperBound_ = Double.POSITIVE_INFINITY;
548 objectiveCoefficient_ = 0D;
551 branchingPriority_ = 0;
556 public com.google.protobuf.Descriptors.Descriptor
558 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
563 return com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance();
570 throw newUninitializedMessageException(result);
578 if (bitField0_ != 0) { buildPartial0(result); }
583 private void buildPartial0(com.google.ortools.linearsolver.MPVariableProto result) {
584 int from_bitField0_ = bitField0_;
585 int to_bitField0_ = 0;
586 if (((from_bitField0_ & 0x00000001) != 0)) {
587 result.lowerBound_ = lowerBound_;
588 to_bitField0_ |= 0x00000001;
590 if (((from_bitField0_ & 0x00000002) != 0)) {
591 result.upperBound_ = upperBound_;
592 to_bitField0_ |= 0x00000002;
594 if (((from_bitField0_ & 0x00000004) != 0)) {
595 result.objectiveCoefficient_ = objectiveCoefficient_;
596 to_bitField0_ |= 0x00000004;
598 if (((from_bitField0_ & 0x00000008) != 0)) {
599 result.isInteger_ = isInteger_;
600 to_bitField0_ |= 0x00000008;
602 if (((from_bitField0_ & 0x00000010) != 0)) {
603 result.name_ = name_;
604 to_bitField0_ |= 0x00000010;
606 if (((from_bitField0_ & 0x00000020) != 0)) {
607 result.branchingPriority_ = branchingPriority_;
608 to_bitField0_ |= 0x00000020;
610 result.bitField0_ |= to_bitField0_;
614 public Builder
mergeFrom(com.google.protobuf.Message other) {
615 if (other instanceof com.google.ortools.linearsolver.MPVariableProto) {
616 return mergeFrom((com.google.ortools.linearsolver.MPVariableProto)other);
618 super.mergeFrom(other);
623 public Builder
mergeFrom(com.google.ortools.linearsolver.MPVariableProto other) {
624 if (other == com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance())
return this;
625 if (other.hasLowerBound()) {
628 if (other.hasUpperBound()) {
631 if (other.hasObjectiveCoefficient()) {
634 if (other.hasIsInteger()) {
637 if (other.hasName()) {
639 bitField0_ |= 0x00000010;
642 if (other.hasBranchingPriority()) {
645 this.mergeUnknownFields(other.getUnknownFields());
657 com.google.protobuf.CodedInputStream input,
658 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
659 throws java.io.IOException {
660 if (extensionRegistry ==
null) {
661 throw new java.lang.NullPointerException();
664 boolean done =
false;
666 int tag = input.readTag();
672 lowerBound_ = input.readDouble();
673 bitField0_ |= 0x00000001;
677 upperBound_ = input.readDouble();
678 bitField0_ |= 0x00000002;
682 objectiveCoefficient_ = input.readDouble();
683 bitField0_ |= 0x00000004;
687 isInteger_ = input.readBool();
688 bitField0_ |= 0x00000008;
692 name_ = input.readBytes();
693 bitField0_ |= 0x00000010;
697 branchingPriority_ = input.readInt32();
698 bitField0_ |= 0x00000020;
702 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
709 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
710 throw e.unwrapIOException();
716 private int bitField0_;
718 private double lowerBound_ = Double.NEGATIVE_INFINITY;
729 return ((bitField0_ & 0x00000001) != 0);
755 bitField0_ |= 0x00000001;
768 bitField0_ = (bitField0_ & ~0x00000001);
769 lowerBound_ = Double.NEGATIVE_INFINITY;
774 private double upperBound_ = Double.POSITIVE_INFINITY;
781 return ((bitField0_ & 0x00000002) != 0);
799 bitField0_ |= 0x00000002;
808 bitField0_ = (bitField0_ & ~0x00000002);
809 upperBound_ = Double.POSITIVE_INFINITY;
814 private double objectiveCoefficient_ ;
825 return ((bitField0_ & 0x00000004) != 0);
837 return objectiveCoefficient_;
850 objectiveCoefficient_ = value;
851 bitField0_ |= 0x00000004;
864 bitField0_ = (bitField0_ & ~0x00000004);
865 objectiveCoefficient_ = 0D;
870 private boolean isInteger_ ;
882 return ((bitField0_ & 0x00000008) != 0);
910 bitField0_ |= 0x00000008;
924 bitField0_ = (bitField0_ & ~0x00000008);
930 private java.lang.Object name_ =
"";
940 return ((bitField0_ & 0x00000010) != 0);
951 java.lang.Object ref = name_;
952 if (!(ref instanceof java.lang.String)) {
953 com.google.protobuf.ByteString bs =
954 (com.google.protobuf.ByteString) ref;
955 java.lang.String s = bs.toStringUtf8();
956 if (bs.isValidUtf8()) {
961 return (java.lang.String) ref;
972 public com.google.protobuf.ByteString
974 java.lang.Object ref = name_;
975 if (ref instanceof String) {
976 com.google.protobuf.ByteString b =
977 com.google.protobuf.ByteString.copyFromUtf8(
978 (java.lang.String) ref);
982 return (com.google.protobuf.ByteString) ref;
995 java.lang.String value) {
996 if (value ==
null) {
throw new NullPointerException(); }
998 bitField0_ |= 0x00000010;
1012 bitField0_ = (bitField0_ & ~0x00000010);
1026 com.google.protobuf.ByteString value) {
1027 if (value ==
null) {
throw new NullPointerException(); }
1029 bitField0_ |= 0x00000010;
1034 private int branchingPriority_ ;
1041 return ((bitField0_ & 0x00000020) != 0);
1049 return branchingPriority_;
1058 branchingPriority_ = value;
1059 bitField0_ |= 0x00000020;
1068 bitField0_ = (bitField0_ & ~0x00000020);
1069 branchingPriority_ = 0;
1080 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPVariableProto();
1084 return DEFAULT_INSTANCE;
1091 com.google.protobuf.CodedInputStream input,
1092 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1093 throws com.google.protobuf.InvalidProtocolBufferException {
1096 builder.mergeFrom(input, extensionRegistry);
1097 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1098 throw e.setUnfinishedMessage(builder.buildPartial());
1099 }
catch (com.google.protobuf.UninitializedMessageException e) {
1100 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
1101 }
catch (java.io.IOException e) {
1102 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1103 .setUnfinishedMessage(builder.buildPartial());
1105 return builder.buildPartial();
1109 public static com.google.protobuf.Parser<MPVariableProto>
parser() {
1120 return DEFAULT_INSTANCE;