5package com.google.ortools.sat;
33 com.google.protobuf.GeneratedMessageV3 implements
36private static final long serialVersionUID = 0L;
43 domain_ = emptyLongList();
47 @SuppressWarnings({
"unused"})
49 UnusedPrivateParameter unused) {
53 public static final com.google.protobuf.Descriptors.Descriptor
55 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_descriptor;
59 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
61 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_fieldAccessorTable
62 .ensureFieldAccessorsInitialized(
63 com.google.ortools.sat.IntegerVariableProto.class, com.google.ortools.sat.IntegerVariableProto.Builder.class);
67 @SuppressWarnings(
"serial")
68 private volatile java.lang.Object name_ = "";
79 java.lang.Object ref = name_;
80 if (ref instanceof java.lang.String) {
81 return (java.lang.String) ref;
83 com.google.protobuf.ByteString bs =
84 (com.google.protobuf.ByteString) ref;
85 java.lang.String s = bs.toStringUtf8();
99 public com.google.protobuf.ByteString
101 java.lang.Object ref = name_;
102 if (ref instanceof java.lang.String) {
103 com.google.protobuf.ByteString b =
104 com.google.protobuf.ByteString.copyFromUtf8(
105 (java.lang.String) ref);
109 return (com.google.protobuf.ByteString) ref;
114 @SuppressWarnings(
"serial")
115 private com.google.protobuf.Internal.LongList domain_ =
142 public java.util.List<java.lang.Long>
171 return domain_.size();
199 return domain_.getLong(index);
201 private int domainMemoizedSerializedSize = -1;
203 private byte memoizedIsInitialized = -1;
210 memoizedIsInitialized = 1;
215 public void writeTo(com.google.protobuf.CodedOutputStream output)
216 throws java.io.IOException {
218 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
219 com.google.protobuf.GeneratedMessageV3.writeString(output, 1, name_);
222 output.writeUInt32NoTag(18);
223 output.writeUInt32NoTag(domainMemoizedSerializedSize);
225 for (
int i = 0; i < domain_.size(); i++) {
226 output.writeInt64NoTag(domain_.getLong(i));
228 getUnknownFields().writeTo(output);
233 int size = memoizedSize;
234 if (size != -1)
return size;
237 if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(name_)) {
238 size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, name_);
242 for (
int i = 0; i < domain_.size(); i++) {
243 dataSize += com.google.protobuf.CodedOutputStream
244 .computeInt64SizeNoTag(domain_.getLong(i));
249 size += com.google.protobuf.CodedOutputStream
250 .computeInt32SizeNoTag(dataSize);
252 domainMemoizedSerializedSize = dataSize;
254 size += getUnknownFields().getSerializedSize();
260 public boolean equals(
final java.lang.Object obj) {
264 if (!(obj instanceof com.google.ortools.sat.IntegerVariableProto)) {
265 return super.equals(obj);
270 .equals(other.
getName()))
return false;
273 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
279 if (memoizedHashCode != 0) {
280 return memoizedHashCode;
285 hash = (53 * hash) +
getName().hashCode();
290 hash = (29 * hash) + getUnknownFields().hashCode();
291 memoizedHashCode = hash;
296 java.nio.ByteBuffer data)
297 throws com.google.protobuf.InvalidProtocolBufferException {
298 return PARSER.parseFrom(data);
301 java.nio.ByteBuffer data,
302 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
303 throws com.google.protobuf.InvalidProtocolBufferException {
304 return PARSER.parseFrom(data, extensionRegistry);
307 com.google.protobuf.ByteString data)
308 throws com.google.protobuf.InvalidProtocolBufferException {
309 return PARSER.parseFrom(data);
312 com.google.protobuf.ByteString data,
313 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
314 throws com.google.protobuf.InvalidProtocolBufferException {
315 return PARSER.parseFrom(data, extensionRegistry);
318 throws com.google.protobuf.InvalidProtocolBufferException {
319 return PARSER.parseFrom(data);
323 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
324 throws com.google.protobuf.InvalidProtocolBufferException {
325 return PARSER.parseFrom(data, extensionRegistry);
328 throws java.io.IOException {
329 return com.google.protobuf.GeneratedMessageV3
330 .parseWithIOException(PARSER, input);
333 java.io.InputStream input,
334 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
335 throws java.io.IOException {
336 return com.google.protobuf.GeneratedMessageV3
337 .parseWithIOException(PARSER, input, extensionRegistry);
341 throws java.io.IOException {
342 return com.google.protobuf.GeneratedMessageV3
343 .parseDelimitedWithIOException(PARSER, input);
347 java.io.InputStream input,
348 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
349 throws java.io.IOException {
350 return com.google.protobuf.GeneratedMessageV3
351 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
354 com.google.protobuf.CodedInputStream input)
355 throws java.io.IOException {
356 return com.google.protobuf.GeneratedMessageV3
357 .parseWithIOException(PARSER, input);
360 com.google.protobuf.CodedInputStream input,
361 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
362 throws java.io.IOException {
363 return com.google.protobuf.GeneratedMessageV3
364 .parseWithIOException(PARSER, input, extensionRegistry);
377 return this == DEFAULT_INSTANCE
383 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
413 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
416 public static final com.google.protobuf.Descriptors.Descriptor
418 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_descriptor;
422 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
424 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_fieldAccessorTable
425 .ensureFieldAccessorsInitialized(
426 com.google.ortools.sat.IntegerVariableProto.class, com.google.ortools.sat.IntegerVariableProto.Builder.class);
435 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
444 domain_ = emptyLongList();
449 public com.google.protobuf.Descriptors.Descriptor
451 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_descriptor;
456 return com.google.ortools.sat.IntegerVariableProto.getDefaultInstance();
463 throw newUninitializedMessageException(result);
471 if (bitField0_ != 0) { buildPartial0(result); }
476 private void buildPartial0(com.google.ortools.sat.IntegerVariableProto result) {
477 int from_bitField0_ = bitField0_;
478 if (((from_bitField0_ & 0x00000001) != 0)) {
479 result.name_ = name_;
481 if (((from_bitField0_ & 0x00000002) != 0)) {
482 domain_.makeImmutable();
483 result.domain_ = domain_;
489 return super.
clone();
493 com.google.protobuf.Descriptors.FieldDescriptor field,
494 java.lang.Object value) {
495 return super.
setField(field, value);
499 com.google.protobuf.Descriptors.FieldDescriptor field) {
504 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
509 com.google.protobuf.Descriptors.FieldDescriptor field,
510 int index, java.lang.Object value) {
515 com.google.protobuf.Descriptors.FieldDescriptor field,
516 java.lang.Object value) {
521 if (other instanceof com.google.ortools.sat.IntegerVariableProto) {
522 return mergeFrom((com.google.ortools.sat.IntegerVariableProto)other);
524 super.mergeFrom(other);
530 if (other == com.google.ortools.sat.IntegerVariableProto.getDefaultInstance())
return this;
531 if (!other.getName().isEmpty()) {
533 bitField0_ |= 0x00000001;
536 if (!other.domain_.isEmpty()) {
537 if (domain_.isEmpty()) {
538 domain_ = other.domain_;
539 domain_.makeImmutable();
540 bitField0_ |= 0x00000002;
542 ensureDomainIsMutable();
543 domain_.addAll(other.domain_);
559 com.google.protobuf.CodedInputStream input,
560 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
561 throws java.io.IOException {
562 if (extensionRegistry ==
null) {
563 throw new java.lang.NullPointerException();
566 boolean done =
false;
568 int tag = input.readTag();
574 name_ = input.readStringRequireUtf8();
575 bitField0_ |= 0x00000001;
579 long v = input.readInt64();
580 ensureDomainIsMutable();
585 int length = input.readRawVarint32();
586 int limit = input.pushLimit(length);
587 ensureDomainIsMutable();
588 while (input.getBytesUntilLimit() > 0) {
589 domain_.addLong(input.readInt64());
591 input.popLimit(limit);
595 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
602 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
603 throw e.unwrapIOException();
609 private int bitField0_;
611 private java.lang.Object name_ =
"";
621 java.lang.Object ref = name_;
622 if (!(ref instanceof java.lang.String)) {
623 com.google.protobuf.ByteString bs =
624 (com.google.protobuf.ByteString) ref;
625 java.lang.String s = bs.toStringUtf8();
629 return (java.lang.String) ref;
640 public com.google.protobuf.ByteString
642 java.lang.Object ref = name_;
643 if (ref instanceof String) {
644 com.google.protobuf.ByteString b =
645 com.google.protobuf.ByteString.copyFromUtf8(
646 (java.lang.String) ref);
650 return (com.google.protobuf.ByteString) ref;
663 java.lang.String value) {
664 if (value ==
null) {
throw new NullPointerException(); }
666 bitField0_ |= 0x00000001;
680 bitField0_ = (bitField0_ & ~0x00000001);
694 com.google.protobuf.ByteString value) {
695 if (value ==
null) {
throw new NullPointerException(); }
696 checkByteStringIsUtf8(value);
698 bitField0_ |= 0x00000001;
703 private com.google.protobuf.Internal.LongList domain_ = emptyLongList();
704 private void ensureDomainIsMutable() {
705 if (!domain_.isModifiable()) {
706 domain_ = makeMutableCopy(domain_);
708 bitField0_ |= 0x00000002;
734 public java.util.List<java.lang.Long>
736 domain_.makeImmutable();
764 return domain_.size();
792 return domain_.getLong(index);
821 int index,
long value) {
823 ensureDomainIsMutable();
824 domain_.setLong(index, value);
825 bitField0_ |= 0x00000002;
856 ensureDomainIsMutable();
857 domain_.addLong(value);
858 bitField0_ |= 0x00000002;
888 java.lang.Iterable<? extends java.lang.Long> values) {
889 ensureDomainIsMutable();
890 com.google.protobuf.AbstractMessageLite.Builder.addAll(
892 bitField0_ |= 0x00000002;
921 domain_ = emptyLongList();
922 bitField0_ = (bitField0_ & ~0x00000002);
928 final com.google.protobuf.UnknownFieldSet unknownFields) {
934 final com.google.protobuf.UnknownFieldSet unknownFields) {
945 DEFAULT_INSTANCE =
new com.google.ortools.sat.IntegerVariableProto();
949 return DEFAULT_INSTANCE;
956 com.google.protobuf.CodedInputStream input,
957 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
958 throws com.google.protobuf.InvalidProtocolBufferException {
961 builder.mergeFrom(input, extensionRegistry);
962 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
963 throw e.setUnfinishedMessage(builder.buildPartial());
964 }
catch (com.google.protobuf.UninitializedMessageException e) {
965 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
966 }
catch (java.io.IOException e) {
967 throw new com.google.protobuf.InvalidProtocolBufferException(e)
968 .setUnfinishedMessage(builder.buildPartial());
970 return builder.buildPartial();
985 return DEFAULT_INSTANCE;