6package com.google.ortools.linearsolver;
15public final class MPAbsConstraint
extends
16 com.google.protobuf.GeneratedMessage implements
19private static final long serialVersionUID = 0L;
21 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
22 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
27 MPAbsConstraint.class.getName());
30 private MPAbsConstraint(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
33 private MPAbsConstraint() {
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
42 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
44 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.linearsolver.MPAbsConstraint.class, com.google.ortools.linearsolver.MPAbsConstraint.Builder.class);
49 private int bitField0_;
51 private int varIndex_ = 0;
63 return ((bitField0_ & 0x00000001) != 0);
80 private int resultantVarIndex_ = 0;
87 return ((bitField0_ & 0x00000002) != 0);
95 return resultantVarIndex_;
98 private byte memoizedIsInitialized = -1;
105 memoizedIsInitialized = 1;
110 public void writeTo(com.google.protobuf.CodedOutputStream output)
111 throws java.io.IOException {
112 if (((bitField0_ & 0x00000001) != 0)) {
113 output.writeInt32(1, varIndex_);
115 if (((bitField0_ & 0x00000002) != 0)) {
116 output.writeInt32(2, resultantVarIndex_);
118 getUnknownFields().writeTo(output);
123 int size = memoizedSize;
124 if (size != -1)
return size;
127 if (((bitField0_ & 0x00000001) != 0)) {
128 size += com.google.protobuf.CodedOutputStream
129 .computeInt32Size(1, varIndex_);
131 if (((bitField0_ & 0x00000002) != 0)) {
132 size += com.google.protobuf.CodedOutputStream
133 .computeInt32Size(2, resultantVarIndex_);
135 size += getUnknownFields().getSerializedSize();
141 public boolean equals(
final java.lang.Object obj) {
145 if (!(obj instanceof com.google.ortools.linearsolver.MPAbsConstraint)) {
146 return super.equals(obj);
160 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
166 if (memoizedHashCode != 0) {
167 return memoizedHashCode;
179 hash = (29 * hash) + getUnknownFields().hashCode();
180 memoizedHashCode = hash;
185 java.nio.ByteBuffer data)
186 throws com.google.protobuf.InvalidProtocolBufferException {
187 return PARSER.parseFrom(data);
190 java.nio.ByteBuffer data,
191 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
192 throws com.google.protobuf.InvalidProtocolBufferException {
193 return PARSER.parseFrom(data, extensionRegistry);
196 com.google.protobuf.ByteString data)
197 throws com.google.protobuf.InvalidProtocolBufferException {
198 return PARSER.parseFrom(data);
201 com.google.protobuf.ByteString data,
202 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
203 throws com.google.protobuf.InvalidProtocolBufferException {
204 return PARSER.parseFrom(data, extensionRegistry);
207 throws com.google.protobuf.InvalidProtocolBufferException {
208 return PARSER.parseFrom(data);
212 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
213 throws com.google.protobuf.InvalidProtocolBufferException {
214 return PARSER.parseFrom(data, extensionRegistry);
217 throws java.io.IOException {
218 return com.google.protobuf.GeneratedMessage
219 .parseWithIOException(PARSER, input);
222 java.io.InputStream input,
223 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
224 throws java.io.IOException {
225 return com.google.protobuf.GeneratedMessage
226 .parseWithIOException(PARSER, input, extensionRegistry);
230 throws java.io.IOException {
231 return com.google.protobuf.GeneratedMessage
232 .parseDelimitedWithIOException(PARSER, input);
236 java.io.InputStream input,
237 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
238 throws java.io.IOException {
239 return com.google.protobuf.GeneratedMessage
240 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
243 com.google.protobuf.CodedInputStream input)
244 throws java.io.IOException {
245 return com.google.protobuf.GeneratedMessage
246 .parseWithIOException(PARSER, input);
249 com.google.protobuf.CodedInputStream input,
250 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
251 throws java.io.IOException {
252 return com.google.protobuf.GeneratedMessage
253 .parseWithIOException(PARSER, input, extensionRegistry);
259 return DEFAULT_INSTANCE.toBuilder();
262 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
266 return this == DEFAULT_INSTANCE
272 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
283 public static final class Builder
extends
284 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
287 public static final com.google.protobuf.Descriptors.Descriptor
289 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
293 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
295 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_fieldAccessorTable
296 .ensureFieldAccessorsInitialized(
297 com.google.ortools.linearsolver.MPAbsConstraint.class, com.google.ortools.linearsolver.MPAbsConstraint.Builder.class);
306 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
315 resultantVarIndex_ = 0;
320 public com.google.protobuf.Descriptors.Descriptor
322 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_MPAbsConstraint_descriptor;
327 return com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance();
334 throw newUninitializedMessageException(result);
342 if (bitField0_ != 0) { buildPartial0(result); }
347 private void buildPartial0(com.google.ortools.linearsolver.MPAbsConstraint result) {
348 int from_bitField0_ = bitField0_;
349 int to_bitField0_ = 0;
350 if (((from_bitField0_ & 0x00000001) != 0)) {
351 result.varIndex_ = varIndex_;
352 to_bitField0_ |= 0x00000001;
354 if (((from_bitField0_ & 0x00000002) != 0)) {
355 result.resultantVarIndex_ = resultantVarIndex_;
356 to_bitField0_ |= 0x00000002;
358 result.bitField0_ |= to_bitField0_;
362 public Builder
mergeFrom(com.google.protobuf.Message other) {
363 if (other instanceof com.google.ortools.linearsolver.MPAbsConstraint) {
364 return mergeFrom((com.google.ortools.linearsolver.MPAbsConstraint)other);
366 super.mergeFrom(other);
371 public Builder
mergeFrom(com.google.ortools.linearsolver.MPAbsConstraint other) {
372 if (other == com.google.ortools.linearsolver.MPAbsConstraint.getDefaultInstance())
return this;
373 if (other.hasVarIndex()) {
376 if (other.hasResultantVarIndex()) {
379 this.mergeUnknownFields(other.getUnknownFields());
391 com.google.protobuf.CodedInputStream input,
392 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
393 throws java.io.IOException {
394 if (extensionRegistry ==
null) {
395 throw new java.lang.NullPointerException();
398 boolean done =
false;
400 int tag = input.readTag();
406 varIndex_ = input.readInt32();
407 bitField0_ |= 0x00000001;
411 resultantVarIndex_ = input.readInt32();
412 bitField0_ |= 0x00000002;
416 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
423 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
424 throw e.unwrapIOException();
430 private int bitField0_;
432 private int varIndex_ ;
444 return ((bitField0_ & 0x00000001) != 0);
472 bitField0_ |= 0x00000001;
486 bitField0_ = (bitField0_ & ~0x00000001);
492 private int resultantVarIndex_ ;
499 return ((bitField0_ & 0x00000002) != 0);
507 return resultantVarIndex_;
516 resultantVarIndex_ = value;
517 bitField0_ |= 0x00000002;
526 bitField0_ = (bitField0_ & ~0x00000002);
527 resultantVarIndex_ = 0;
538 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.MPAbsConstraint();
542 return DEFAULT_INSTANCE;
549 com.google.protobuf.CodedInputStream input,
550 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
551 throws com.google.protobuf.InvalidProtocolBufferException {
554 builder.mergeFrom(input, extensionRegistry);
555 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
556 throw e.setUnfinishedMessage(builder.buildPartial());
557 }
catch (com.google.protobuf.UninitializedMessageException e) {
558 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
559 }
catch (java.io.IOException e) {
560 throw new com.google.protobuf.InvalidProtocolBufferException(e)
561 .setUnfinishedMessage(builder.buildPartial());
563 return builder.buildPartial();
567 public static com.google.protobuf.Parser<MPAbsConstraint>
parser() {
578 return DEFAULT_INSTANCE;