6package com.google.ortools.linearsolver;
15@com.google.protobuf.Generated
16public final class MPAbsConstraint
extends
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
28 MPAbsConstraint.class.getName());
31 private MPAbsConstraint(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private MPAbsConstraint() {
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.linearsolver.MPAbsConstraint.class, com.google.ortools.linearsolver.MPAbsConstraint.Builder.class);
50 private int bitField0_;
52 private int varIndex_ = 0;
64 return ((bitField0_ & 0x00000001) != 0);
81 private int resultantVarIndex_ = 0;
88 return ((bitField0_ & 0x00000002) != 0);
96 return resultantVarIndex_;
99 private byte memoizedIsInitialized = -1;
106 memoizedIsInitialized = 1;
111 public void writeTo(com.google.protobuf.CodedOutputStream output)
112 throws java.io.IOException {
113 if (((bitField0_ & 0x00000001) != 0)) {
114 output.writeInt32(1, varIndex_);
116 if (((bitField0_ & 0x00000002) != 0)) {
117 output.writeInt32(2, resultantVarIndex_);
119 getUnknownFields().writeTo(output);
124 int size = memoizedSize;
125 if (size != -1)
return size;
128 if (((bitField0_ & 0x00000001) != 0)) {
129 size += com.google.protobuf.CodedOutputStream
130 .computeInt32Size(1, varIndex_);
132 if (((bitField0_ & 0x00000002) != 0)) {
133 size += com.google.protobuf.CodedOutputStream
134 .computeInt32Size(2, resultantVarIndex_);
136 size += getUnknownFields().getSerializedSize();
142 public boolean equals(
final java.lang.Object obj) {
146 if (!(obj instanceof com.google.ortools.linearsolver.MPAbsConstraint)) {
147 return super.equals(obj);
161 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
167 if (memoizedHashCode != 0) {
168 return memoizedHashCode;
180 hash = (29 * hash) + getUnknownFields().hashCode();
181 memoizedHashCode = hash;
186 java.nio.ByteBuffer data)
187 throws com.google.protobuf.InvalidProtocolBufferException {
188 return PARSER.parseFrom(data);
191 java.nio.ByteBuffer data,
192 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
193 throws com.google.protobuf.InvalidProtocolBufferException {
194 return PARSER.parseFrom(data, extensionRegistry);
197 com.google.protobuf.ByteString data)
198 throws com.google.protobuf.InvalidProtocolBufferException {
199 return PARSER.parseFrom(data);
202 com.google.protobuf.ByteString data,
203 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
204 throws com.google.protobuf.InvalidProtocolBufferException {
205 return PARSER.parseFrom(data, extensionRegistry);
208 throws com.google.protobuf.InvalidProtocolBufferException {
209 return PARSER.parseFrom(data);
213 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
214 throws com.google.protobuf.InvalidProtocolBufferException {
215 return PARSER.parseFrom(data, extensionRegistry);
218 throws java.io.IOException {
219 return com.google.protobuf.GeneratedMessage
220 .parseWithIOException(PARSER, input);
223 java.io.InputStream input,
224 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
225 throws java.io.IOException {
226 return com.google.protobuf.GeneratedMessage
227 .parseWithIOException(PARSER, input, extensionRegistry);
231 throws java.io.IOException {
232 return com.google.protobuf.GeneratedMessage
233 .parseDelimitedWithIOException(PARSER, input);
237 java.io.InputStream input,
238 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
239 throws java.io.IOException {
240 return com.google.protobuf.GeneratedMessage
241 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
244 com.google.protobuf.CodedInputStream input)
245 throws java.io.IOException {
246 return com.google.protobuf.GeneratedMessage
247 .parseWithIOException(PARSER, input);
250 com.google.protobuf.CodedInputStream input,
251 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
252 throws java.io.IOException {
253 return com.google.protobuf.GeneratedMessage
254 .parseWithIOException(PARSER, input, extensionRegistry);
260 return DEFAULT_INSTANCE.toBuilder();
263 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
267 return this == DEFAULT_INSTANCE
273 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
284 public static final class Builder
extends
285 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
288 public static final com.google.protobuf.Descriptors.Descriptor
290 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
294 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
296 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_fieldAccessorTable
297 .ensureFieldAccessorsInitialized(
298 com.google.ortools.linearsolver.MPAbsConstraint.class, com.google.ortools.linearsolver.MPAbsConstraint.Builder.class);
307 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
316 resultantVarIndex_ = 0;
321 public com.google.protobuf.Descriptors.Descriptor
323 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
328 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
335 throw newUninitializedMessageException(result);
343 if (bitField0_ != 0) { buildPartial0(result); }
348 private void buildPartial0(com.google.ortools.linearsolver.MPAbsConstraint result) {
349 int from_bitField0_ = bitField0_;
350 int to_bitField0_ = 0;
351 if (((from_bitField0_ & 0x00000001) != 0)) {
352 result.varIndex_ = varIndex_;
353 to_bitField0_ |= 0x00000001;
355 if (((from_bitField0_ & 0x00000002) != 0)) {
356 result.resultantVarIndex_ = resultantVarIndex_;
357 to_bitField0_ |= 0x00000002;
359 result.bitField0_ |= to_bitField0_;
363 public Builder
mergeFrom(com.google.protobuf.Message other) {
364 if (other instanceof com.google.ortools.linearsolver.MPAbsConstraint) {
365 return mergeFrom((com.google.ortools.linearsolver.MPAbsConstraint)other);
367 super.mergeFrom(other);
372 public Builder
mergeFrom(com.google.ortools.linearsolver.MPAbsConstraint other) {
373 if (other == com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance())
return this;
374 if (other.hasVarIndex()) {
377 if (other.hasResultantVarIndex()) {
380 this.mergeUnknownFields(other.getUnknownFields());
392 com.google.protobuf.CodedInputStream input,
393 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
394 throws java.io.IOException {
395 if (extensionRegistry ==
null) {
396 throw new java.lang.NullPointerException();
399 boolean done =
false;
401 int tag = input.readTag();
407 varIndex_ = input.readInt32();
408 bitField0_ |= 0x00000001;
412 resultantVarIndex_ = input.readInt32();
413 bitField0_ |= 0x00000002;
417 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
424 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
425 throw e.unwrapIOException();
431 private int bitField0_;
433 private int varIndex_ ;
445 return ((bitField0_ & 0x00000001) != 0);
473 bitField0_ |= 0x00000001;
487 bitField0_ = (bitField0_ & ~0x00000001);
493 private int resultantVarIndex_ ;
500 return ((bitField0_ & 0x00000002) != 0);
508 return resultantVarIndex_;
517 resultantVarIndex_ = value;
518 bitField0_ |= 0x00000002;
527 bitField0_ = (bitField0_ & ~0x00000002);
528 resultantVarIndex_ = 0;
539 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPAbsConstraint();
543 return DEFAULT_INSTANCE;
550 com.google.protobuf.CodedInputStream input,
551 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
552 throws com.google.protobuf.InvalidProtocolBufferException {
555 builder.mergeFrom(input, extensionRegistry);
556 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
557 throw e.setUnfinishedMessage(builder.buildPartial());
558 }
catch (com.google.protobuf.UninitializedMessageException e) {
559 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
560 }
catch (java.io.IOException e) {
561 throw new com.google.protobuf.InvalidProtocolBufferException(e)
562 .setUnfinishedMessage(builder.buildPartial());
564 return builder.buildPartial();
568 public static com.google.protobuf.Parser<MPAbsConstraint>
parser() {
579 return DEFAULT_INSTANCE;