5package com.google.ortools.linearsolver;
27 com.google.protobuf.GeneratedMessageV3 implements
30private static final long serialVersionUID = 0L;
32 private MPVariableProto(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
36 lowerBound_ = Double.NEGATIVE_INFINITY;
37 upperBound_ = Double.POSITIVE_INFINITY;
42 @SuppressWarnings({
"unused"})
44 UnusedPrivateParameter unused) {
48 public static final com.google.protobuf.Descriptors.Descriptor
50 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
54 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
56 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_fieldAccessorTable
57 .ensureFieldAccessorsInitialized(
58 com.google.ortools.linearsolver.MPVariableProto.class, com.google.ortools.linearsolver.MPVariableProto.Builder.class);
61 private int bitField0_;
63 private double lowerBound_ = Double.NEGATIVE_INFINITY;
74 return ((bitField0_ & 0x00000001) != 0);
90 private double upperBound_ = Double.POSITIVE_INFINITY;
97 return ((bitField0_ & 0x00000002) != 0);
109 private double objectiveCoefficient_ = 0D;
120 return ((bitField0_ & 0x00000004) != 0);
132 return objectiveCoefficient_;
136 private boolean isInteger_ =
false;
148 return ((bitField0_ & 0x00000008) != 0);
165 @SuppressWarnings(
"serial")
166 private volatile java.lang.Object name_ = "";
177 return ((bitField0_ & 0x00000010) != 0);
189 java.lang.Object ref = name_;
190 if (ref instanceof java.lang.String) {
191 return (java.lang.String) ref;
193 com.google.protobuf.ByteString bs =
194 (com.google.protobuf.ByteString) ref;
195 java.lang.String s = bs.toStringUtf8();
196 if (bs.isValidUtf8()) {
211 public com.google.protobuf.ByteString
213 java.lang.Object ref = name_;
214 if (ref instanceof java.lang.String) {
215 com.google.protobuf.ByteString b =
216 com.google.protobuf.ByteString.copyFromUtf8(
217 (java.lang.String) ref);
221 return (com.google.protobuf.ByteString) ref;
226 private int branchingPriority_ = 0;
233 return ((bitField0_ & 0x00000020) != 0);
241 return branchingPriority_;
244 private byte memoizedIsInitialized = -1;
251 memoizedIsInitialized = 1;
256 public void writeTo(com.google.protobuf.CodedOutputStream output)
257 throws java.io.IOException {
258 if (((bitField0_ & 0x00000001) != 0)) {
259 output.writeDouble(1, lowerBound_);
261 if (((bitField0_ & 0x00000002) != 0)) {
262 output.writeDouble(2, upperBound_);
264 if (((bitField0_ & 0x00000004) != 0)) {
265 output.writeDouble(3, objectiveCoefficient_);
267 if (((bitField0_ & 0x00000008) != 0)) {
268 output.writeBool(4, isInteger_);
270 if (((bitField0_ & 0x00000010) != 0)) {
271 com.google.protobuf.GeneratedMessageV3.writeString(output, 5, name_);
273 if (((bitField0_ & 0x00000020) != 0)) {
274 output.writeInt32(6, branchingPriority_);
276 getUnknownFields().writeTo(output);
281 int size = memoizedSize;
282 if (size != -1)
return size;
285 if (((bitField0_ & 0x00000001) != 0)) {
286 size += com.google.protobuf.CodedOutputStream
287 .computeDoubleSize(1, lowerBound_);
289 if (((bitField0_ & 0x00000002) != 0)) {
290 size += com.google.protobuf.CodedOutputStream
291 .computeDoubleSize(2, upperBound_);
293 if (((bitField0_ & 0x00000004) != 0)) {
294 size += com.google.protobuf.CodedOutputStream
295 .computeDoubleSize(3, objectiveCoefficient_);
297 if (((bitField0_ & 0x00000008) != 0)) {
298 size += com.google.protobuf.CodedOutputStream
299 .computeBoolSize(4, isInteger_);
301 if (((bitField0_ & 0x00000010) != 0)) {
302 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, name_);
304 if (((bitField0_ & 0x00000020) != 0)) {
305 size += com.google.protobuf.CodedOutputStream
306 .computeInt32Size(6, branchingPriority_);
308 size += getUnknownFields().getSerializedSize();
314 public boolean equals(
final java.lang.Object obj) {
318 if (!(obj instanceof com.google.ortools.linearsolver.MPVariableProto)) {
319 return super.equals(obj);
326 != java.lang.Double.doubleToLongBits(
332 != java.lang.Double.doubleToLongBits(
338 != java.lang.Double.doubleToLongBits(
349 .equals(other.
getName()))
return false;
356 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
362 if (memoizedHashCode != 0) {
363 return memoizedHashCode;
369 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
374 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
379 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
384 hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
389 hash = (53 * hash) +
getName().hashCode();
395 hash = (29 * hash) + getUnknownFields().hashCode();
396 memoizedHashCode = hash;
401 java.nio.ByteBuffer data)
402 throws com.google.protobuf.InvalidProtocolBufferException {
406 java.nio.ByteBuffer data,
407 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
408 throws com.google.protobuf.InvalidProtocolBufferException {
412 com.google.protobuf.ByteString data)
413 throws com.google.protobuf.InvalidProtocolBufferException {
417 com.google.protobuf.ByteString data,
418 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
419 throws com.google.protobuf.InvalidProtocolBufferException {
423 throws com.google.protobuf.InvalidProtocolBufferException {
428 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
429 throws com.google.protobuf.InvalidProtocolBufferException {
433 throws java.io.IOException {
434 return com.google.protobuf.GeneratedMessageV3
435 .parseWithIOException(
PARSER, input);
438 java.io.InputStream input,
439 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
440 throws java.io.IOException {
441 return com.google.protobuf.GeneratedMessageV3
442 .parseWithIOException(
PARSER, input, extensionRegistry);
446 throws java.io.IOException {
447 return com.google.protobuf.GeneratedMessageV3
448 .parseDelimitedWithIOException(
PARSER, input);
452 java.io.InputStream input,
453 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
454 throws java.io.IOException {
455 return com.google.protobuf.GeneratedMessageV3
456 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
459 com.google.protobuf.CodedInputStream input)
460 throws java.io.IOException {
461 return com.google.protobuf.GeneratedMessageV3
462 .parseWithIOException(
PARSER, input);
465 com.google.protobuf.CodedInputStream input,
466 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
467 throws java.io.IOException {
468 return com.google.protobuf.GeneratedMessageV3
469 .parseWithIOException(
PARSER, input, extensionRegistry);
482 return this == DEFAULT_INSTANCE
488 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
512 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
515 public static final com.google.protobuf.Descriptors.Descriptor
517 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
521 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
523 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_fieldAccessorTable
524 .ensureFieldAccessorsInitialized(
525 com.google.ortools.linearsolver.MPVariableProto.class, com.google.ortools.linearsolver.MPVariableProto.Builder.class);
534 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
542 lowerBound_ = Double.NEGATIVE_INFINITY;
543 upperBound_ = Double.POSITIVE_INFINITY;
544 objectiveCoefficient_ = 0D;
547 branchingPriority_ = 0;
552 public com.google.protobuf.Descriptors.Descriptor
554 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPVariableProto_descriptor;
559 return com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance();
566 throw newUninitializedMessageException(result);
574 if (bitField0_ != 0) { buildPartial0(result); }
579 private void buildPartial0(com.google.ortools.linearsolver.MPVariableProto result) {
580 int from_bitField0_ = bitField0_;
581 int to_bitField0_ = 0;
582 if (((from_bitField0_ & 0x00000001) != 0)) {
583 result.lowerBound_ = lowerBound_;
584 to_bitField0_ |= 0x00000001;
586 if (((from_bitField0_ & 0x00000002) != 0)) {
587 result.upperBound_ = upperBound_;
588 to_bitField0_ |= 0x00000002;
590 if (((from_bitField0_ & 0x00000004) != 0)) {
591 result.objectiveCoefficient_ = objectiveCoefficient_;
592 to_bitField0_ |= 0x00000004;
594 if (((from_bitField0_ & 0x00000008) != 0)) {
595 result.isInteger_ = isInteger_;
596 to_bitField0_ |= 0x00000008;
598 if (((from_bitField0_ & 0x00000010) != 0)) {
599 result.name_ = name_;
600 to_bitField0_ |= 0x00000010;
602 if (((from_bitField0_ & 0x00000020) != 0)) {
603 result.branchingPriority_ = branchingPriority_;
604 to_bitField0_ |= 0x00000020;
606 result.bitField0_ |= to_bitField0_;
611 return super.
clone();
615 com.google.protobuf.Descriptors.FieldDescriptor field,
616 java.lang.Object value) {
617 return super.
setField(field, value);
621 com.google.protobuf.Descriptors.FieldDescriptor field) {
626 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
631 com.google.protobuf.Descriptors.FieldDescriptor field,
632 int index, java.lang.Object value) {
637 com.google.protobuf.Descriptors.FieldDescriptor field,
638 java.lang.Object value) {
643 if (other instanceof com.google.ortools.linearsolver.MPVariableProto) {
644 return mergeFrom((com.google.ortools.linearsolver.MPVariableProto)other);
646 super.mergeFrom(other);
652 if (other == com.google.ortools.linearsolver.MPVariableProto.getDefaultInstance())
return this;
653 if (other.hasLowerBound()) {
656 if (other.hasUpperBound()) {
659 if (other.hasObjectiveCoefficient()) {
662 if (other.hasIsInteger()) {
665 if (other.hasName()) {
667 bitField0_ |= 0x00000010;
670 if (other.hasBranchingPriority()) {
685 com.google.protobuf.CodedInputStream input,
686 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
687 throws java.io.IOException {
688 if (extensionRegistry ==
null) {
689 throw new java.lang.NullPointerException();
692 boolean done =
false;
694 int tag = input.readTag();
700 lowerBound_ = input.readDouble();
701 bitField0_ |= 0x00000001;
705 upperBound_ = input.readDouble();
706 bitField0_ |= 0x00000002;
710 objectiveCoefficient_ = input.readDouble();
711 bitField0_ |= 0x00000004;
715 isInteger_ = input.readBool();
716 bitField0_ |= 0x00000008;
720 name_ = input.readBytes();
721 bitField0_ |= 0x00000010;
725 branchingPriority_ = input.readInt32();
726 bitField0_ |= 0x00000020;
730 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
737 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
738 throw e.unwrapIOException();
744 private int bitField0_;
746 private double lowerBound_ = Double.NEGATIVE_INFINITY;
757 return ((bitField0_ & 0x00000001) != 0);
783 bitField0_ |= 0x00000001;
796 bitField0_ = (bitField0_ & ~0x00000001);
797 lowerBound_ = Double.NEGATIVE_INFINITY;
802 private double upperBound_ = Double.POSITIVE_INFINITY;
809 return ((bitField0_ & 0x00000002) != 0);
827 bitField0_ |= 0x00000002;
836 bitField0_ = (bitField0_ & ~0x00000002);
837 upperBound_ = Double.POSITIVE_INFINITY;
842 private double objectiveCoefficient_ ;
853 return ((bitField0_ & 0x00000004) != 0);
865 return objectiveCoefficient_;
878 objectiveCoefficient_ = value;
879 bitField0_ |= 0x00000004;
892 bitField0_ = (bitField0_ & ~0x00000004);
893 objectiveCoefficient_ = 0D;
898 private boolean isInteger_ ;
910 return ((bitField0_ & 0x00000008) != 0);
938 bitField0_ |= 0x00000008;
952 bitField0_ = (bitField0_ & ~0x00000008);
958 private java.lang.Object name_ =
"";
968 return ((bitField0_ & 0x00000010) != 0);
979 java.lang.Object ref = name_;
980 if (!(ref instanceof java.lang.String)) {
981 com.google.protobuf.ByteString bs =
982 (com.google.protobuf.ByteString) ref;
983 java.lang.String s = bs.toStringUtf8();
984 if (bs.isValidUtf8()) {
989 return (java.lang.String) ref;
1000 public com.google.protobuf.ByteString
1002 java.lang.Object ref = name_;
1003 if (ref instanceof String) {
1004 com.google.protobuf.ByteString b =
1005 com.google.protobuf.ByteString.copyFromUtf8(
1006 (java.lang.String) ref);
1010 return (com.google.protobuf.ByteString) ref;
1023 java.lang.String value) {
1024 if (value ==
null) {
throw new NullPointerException(); }
1026 bitField0_ |= 0x00000010;
1040 bitField0_ = (bitField0_ & ~0x00000010);
1054 com.google.protobuf.ByteString value) {
1055 if (value ==
null) {
throw new NullPointerException(); }
1057 bitField0_ |= 0x00000010;
1062 private int branchingPriority_ ;
1069 return ((bitField0_ & 0x00000020) != 0);
1077 return branchingPriority_;
1086 branchingPriority_ = value;
1087 bitField0_ |= 0x00000020;
1096 bitField0_ = (bitField0_ & ~0x00000020);
1097 branchingPriority_ = 0;
1103 final com.google.protobuf.UnknownFieldSet unknownFields) {
1109 final com.google.protobuf.UnknownFieldSet unknownFields) {
1120 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPVariableProto();
1124 return DEFAULT_INSTANCE;
1127 @java.lang.Deprecated
public static final com.google.protobuf.Parser<
MPVariableProto>
1131 com.google.protobuf.CodedInputStream input,
1132 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
1133 throws com.google.protobuf.InvalidProtocolBufferException {
1136 builder.
mergeFrom(input, extensionRegistry);
1137 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
1139 }
catch (com.google.protobuf.UninitializedMessageException e) {
1140 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
1141 }
catch (java.io.IOException e) {
1142 throw new com.google.protobuf.InvalidProtocolBufferException(e)
1160 return DEFAULT_INSTANCE;