5package com.google.ortools.sat;
25 com.google.protobuf.GeneratedMessage implements
28private static final long serialVersionUID = 0L;
30 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
31 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
45 public static final com.google.protobuf.Descriptors.Descriptor
47 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_descriptor;
51 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
53 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_fieldAccessorTable
54 .ensureFieldAccessorsInitialized(
55 com.google.ortools.sat.IntervalConstraintProto.class, com.google.ortools.sat.IntervalConstraintProto.Builder.class);
58 private int bitField0_;
67 return ((bitField0_ & 0x00000001) != 0);
75 return start_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : start_;
82 return start_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : start_;
93 return ((bitField0_ & 0x00000002) != 0);
101 return end_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : end_;
108 return end_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : end_;
119 return ((bitField0_ & 0x00000004) != 0);
127 return size_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : size_;
134 return size_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : size_;
137 private byte memoizedIsInitialized = -1;
144 memoizedIsInitialized = 1;
149 public void writeTo(com.google.protobuf.CodedOutputStream output)
150 throws java.io.IOException {
151 if (((bitField0_ & 0x00000001) != 0)) {
154 if (((bitField0_ & 0x00000002) != 0)) {
155 output.writeMessage(5,
getEnd());
157 if (((bitField0_ & 0x00000004) != 0)) {
158 output.writeMessage(6,
getSize());
160 getUnknownFields().writeTo(output);
165 int size = memoizedSize;
166 if (size != -1)
return size;
169 if (((bitField0_ & 0x00000001) != 0)) {
170 size += com.google.protobuf.CodedOutputStream
173 if (((bitField0_ & 0x00000002) != 0)) {
174 size += com.google.protobuf.CodedOutputStream
175 .computeMessageSize(5,
getEnd());
177 if (((bitField0_ & 0x00000004) != 0)) {
178 size += com.google.protobuf.CodedOutputStream
179 .computeMessageSize(6,
getSize());
181 size += getUnknownFields().getSerializedSize();
187 public boolean equals(
final java.lang.Object obj) {
191 if (!(obj instanceof com.google.ortools.sat.IntervalConstraintProto)) {
192 return super.equals(obj);
211 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
217 if (memoizedHashCode != 0) {
218 return memoizedHashCode;
234 hash = (29 * hash) + getUnknownFields().hashCode();
235 memoizedHashCode = hash;
240 java.nio.ByteBuffer data)
241 throws com.google.protobuf.InvalidProtocolBufferException {
242 return PARSER.parseFrom(data);
245 java.nio.ByteBuffer data,
246 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
247 throws com.google.protobuf.InvalidProtocolBufferException {
248 return PARSER.parseFrom(data, extensionRegistry);
251 com.google.protobuf.ByteString data)
252 throws com.google.protobuf.InvalidProtocolBufferException {
253 return PARSER.parseFrom(data);
256 com.google.protobuf.ByteString data,
257 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
258 throws com.google.protobuf.InvalidProtocolBufferException {
259 return PARSER.parseFrom(data, extensionRegistry);
262 throws com.google.protobuf.InvalidProtocolBufferException {
263 return PARSER.parseFrom(data);
267 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
268 throws com.google.protobuf.InvalidProtocolBufferException {
269 return PARSER.parseFrom(data, extensionRegistry);
272 throws java.io.IOException {
273 return com.google.protobuf.GeneratedMessage
274 .parseWithIOException(PARSER, input);
277 java.io.InputStream input,
278 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
279 throws java.io.IOException {
280 return com.google.protobuf.GeneratedMessage
281 .parseWithIOException(PARSER, input, extensionRegistry);
285 throws java.io.IOException {
286 return com.google.protobuf.GeneratedMessage
287 .parseDelimitedWithIOException(PARSER, input);
291 java.io.InputStream input,
292 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
293 throws java.io.IOException {
294 return com.google.protobuf.GeneratedMessage
295 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
298 com.google.protobuf.CodedInputStream input)
299 throws java.io.IOException {
300 return com.google.protobuf.GeneratedMessage
301 .parseWithIOException(PARSER, input);
304 com.google.protobuf.CodedInputStream input,
305 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
306 throws java.io.IOException {
307 return com.google.protobuf.GeneratedMessage
308 .parseWithIOException(PARSER, input, extensionRegistry);
321 return this == DEFAULT_INSTANCE
327 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
349 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
352 public static final com.google.protobuf.Descriptors.Descriptor
354 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_descriptor;
358 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
360 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_fieldAccessorTable
361 .ensureFieldAccessorsInitialized(
362 com.google.ortools.sat.IntervalConstraintProto.class, com.google.ortools.sat.IntervalConstraintProto.Builder.class);
367 maybeForceBuilderInitialization();
371 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
373 maybeForceBuilderInitialization();
375 private void maybeForceBuilderInitialization() {
376 if (com.google.protobuf.GeneratedMessage
377 .alwaysUseFieldBuilders) {
378 getStartFieldBuilder();
379 getEndFieldBuilder();
380 getSizeFieldBuilder();
388 if (startBuilder_ !=
null) {
389 startBuilder_.dispose();
390 startBuilder_ =
null;
393 if (endBuilder_ !=
null) {
394 endBuilder_.dispose();
398 if (sizeBuilder_ !=
null) {
399 sizeBuilder_.dispose();
406 public com.google.protobuf.Descriptors.Descriptor
408 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntervalConstraintProto_descriptor;
413 return com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance();
420 throw newUninitializedMessageException(result);
428 if (bitField0_ != 0) { buildPartial0(result); }
433 private void buildPartial0(com.google.ortools.sat.IntervalConstraintProto result) {
434 int from_bitField0_ = bitField0_;
435 int to_bitField0_ = 0;
436 if (((from_bitField0_ & 0x00000001) != 0)) {
437 result.start_ = startBuilder_ ==
null
439 : startBuilder_.build();
440 to_bitField0_ |= 0x00000001;
442 if (((from_bitField0_ & 0x00000002) != 0)) {
443 result.end_ = endBuilder_ ==
null
445 : endBuilder_.build();
446 to_bitField0_ |= 0x00000002;
448 if (((from_bitField0_ & 0x00000004) != 0)) {
449 result.size_ = sizeBuilder_ ==
null
451 : sizeBuilder_.build();
452 to_bitField0_ |= 0x00000004;
454 result.bitField0_ |= to_bitField0_;
459 if (other instanceof com.google.ortools.sat.IntervalConstraintProto) {
460 return mergeFrom((com.google.ortools.sat.IntervalConstraintProto)other);
462 super.mergeFrom(other);
468 if (other == com.google.ortools.sat.IntervalConstraintProto.getDefaultInstance())
return this;
469 if (other.hasStart()) {
472 if (other.hasEnd()) {
475 if (other.hasSize()) {
478 this.mergeUnknownFields(other.getUnknownFields());
490 com.google.protobuf.CodedInputStream input,
491 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
492 throws java.io.IOException {
493 if (extensionRegistry ==
null) {
494 throw new java.lang.NullPointerException();
497 boolean done =
false;
499 int tag = input.readTag();
506 getStartFieldBuilder().getBuilder(),
508 bitField0_ |= 0x00000001;
513 getEndFieldBuilder().getBuilder(),
515 bitField0_ |= 0x00000002;
520 getSizeFieldBuilder().getBuilder(),
522 bitField0_ |= 0x00000004;
526 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
533 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
534 throw e.unwrapIOException();
540 private int bitField0_;
543 private com.google.protobuf.SingleFieldBuilder<
544 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> startBuilder_;
550 return ((bitField0_ & 0x00000001) != 0);
557 if (startBuilder_ ==
null) {
558 return start_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : start_;
560 return startBuilder_.getMessage();
567 if (startBuilder_ ==
null) {
569 throw new NullPointerException();
573 startBuilder_.setMessage(value);
575 bitField0_ |= 0x00000001;
583 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
584 if (startBuilder_ ==
null) {
585 start_ = builderForValue.build();
587 startBuilder_.setMessage(builderForValue.build());
589 bitField0_ |= 0x00000001;
597 if (startBuilder_ ==
null) {
598 if (((bitField0_ & 0x00000001) != 0) &&
600 start_ != com.google.ortools.sat.LinearExpressionProto.getDefaultInstance()) {
606 startBuilder_.mergeFrom(value);
608 if (start_ !=
null) {
609 bitField0_ |= 0x00000001;
618 bitField0_ = (bitField0_ & ~0x00000001);
620 if (startBuilder_ !=
null) {
621 startBuilder_.dispose();
622 startBuilder_ =
null;
631 bitField0_ |= 0x00000001;
633 return getStartFieldBuilder().getBuilder();
639 if (startBuilder_ !=
null) {
640 return startBuilder_.getMessageOrBuilder();
642 return start_ ==
null ?
643 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : start_;
649 private com.google.protobuf.SingleFieldBuilder<
650 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
651 getStartFieldBuilder() {
652 if (startBuilder_ ==
null) {
653 startBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
654 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
656 getParentForChildren(),
660 return startBuilder_;
664 private com.google.protobuf.SingleFieldBuilder<
665 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> endBuilder_;
671 return ((bitField0_ & 0x00000002) != 0);
678 if (endBuilder_ ==
null) {
679 return end_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : end_;
681 return endBuilder_.getMessage();
688 if (endBuilder_ ==
null) {
690 throw new NullPointerException();
694 endBuilder_.setMessage(value);
696 bitField0_ |= 0x00000002;
704 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
705 if (endBuilder_ ==
null) {
706 end_ = builderForValue.build();
708 endBuilder_.setMessage(builderForValue.build());
710 bitField0_ |= 0x00000002;
718 if (endBuilder_ ==
null) {
719 if (((bitField0_ & 0x00000002) != 0) &&
721 end_ != com.google.ortools.sat.LinearExpressionProto.getDefaultInstance()) {
727 endBuilder_.mergeFrom(value);
730 bitField0_ |= 0x00000002;
739 bitField0_ = (bitField0_ & ~0x00000002);
741 if (endBuilder_ !=
null) {
742 endBuilder_.dispose();
752 bitField0_ |= 0x00000002;
754 return getEndFieldBuilder().getBuilder();
760 if (endBuilder_ !=
null) {
761 return endBuilder_.getMessageOrBuilder();
763 return end_ ==
null ?
764 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : end_;
770 private com.google.protobuf.SingleFieldBuilder<
771 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
772 getEndFieldBuilder() {
773 if (endBuilder_ ==
null) {
774 endBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
775 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
777 getParentForChildren(),
785 private com.google.protobuf.SingleFieldBuilder<
786 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder> sizeBuilder_;
792 return ((bitField0_ & 0x00000004) != 0);
799 if (sizeBuilder_ ==
null) {
800 return size_ ==
null ? com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : size_;
802 return sizeBuilder_.getMessage();
809 if (sizeBuilder_ ==
null) {
811 throw new NullPointerException();
815 sizeBuilder_.setMessage(value);
817 bitField0_ |= 0x00000004;
825 com.google.ortools.sat.LinearExpressionProto.Builder builderForValue) {
826 if (sizeBuilder_ ==
null) {
827 size_ = builderForValue.build();
829 sizeBuilder_.setMessage(builderForValue.build());
831 bitField0_ |= 0x00000004;
839 if (sizeBuilder_ ==
null) {
840 if (((bitField0_ & 0x00000004) != 0) &&
842 size_ != com.google.ortools.sat.LinearExpressionProto.getDefaultInstance()) {
848 sizeBuilder_.mergeFrom(value);
851 bitField0_ |= 0x00000004;
860 bitField0_ = (bitField0_ & ~0x00000004);
862 if (sizeBuilder_ !=
null) {
863 sizeBuilder_.dispose();
873 bitField0_ |= 0x00000004;
875 return getSizeFieldBuilder().getBuilder();
881 if (sizeBuilder_ !=
null) {
882 return sizeBuilder_.getMessageOrBuilder();
884 return size_ ==
null ?
885 com.google.ortools.sat.LinearExpressionProto.getDefaultInstance() : size_;
891 private com.google.protobuf.SingleFieldBuilder<
892 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>
893 getSizeFieldBuilder() {
894 if (sizeBuilder_ ==
null) {
895 sizeBuilder_ =
new com.google.protobuf.SingleFieldBuilder<
896 com.google.ortools.sat.LinearExpressionProto, com.google.ortools.sat.LinearExpressionProto.Builder, com.google.ortools.sat.LinearExpressionProtoOrBuilder>(
898 getParentForChildren(),
911 DEFAULT_INSTANCE =
new com.google.ortools.sat.IntervalConstraintProto();
915 return DEFAULT_INSTANCE;
922 com.google.protobuf.CodedInputStream input,
923 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
924 throws com.google.protobuf.InvalidProtocolBufferException {
927 builder.mergeFrom(input, extensionRegistry);
928 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
929 throw e.setUnfinishedMessage(builder.buildPartial());
930 }
catch (com.google.protobuf.UninitializedMessageException e) {
931 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
932 }
catch (java.io.IOException e) {
933 throw new com.google.protobuf.InvalidProtocolBufferException(e)
934 .setUnfinishedMessage(builder.buildPartial());
936 return builder.buildPartial();
951 return DEFAULT_INSTANCE;