5package com.google.ortools.sat;
33 com.google.protobuf.GeneratedMessage implements
36private static final long serialVersionUID = 0L;
38 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
39 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
52 domain_ = emptyLongList();
55 public static final com.google.protobuf.Descriptors.Descriptor
57 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_descriptor;
61 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
63 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_fieldAccessorTable
64 .ensureFieldAccessorsInitialized(
65 com.google.ortools.sat.IntegerVariableProto.class, com.google.ortools.sat.IntegerVariableProto.Builder.class);
69 @SuppressWarnings(
"serial")
70 private volatile java.lang.Object name_ = "";
81 java.lang.Object ref = name_;
82 if (ref instanceof java.lang.String) {
83 return (java.lang.String) ref;
85 com.google.protobuf.ByteString bs =
86 (com.google.protobuf.ByteString) ref;
87 java.lang.String s = bs.toStringUtf8();
101 public com.google.protobuf.ByteString
103 java.lang.Object ref = name_;
104 if (ref instanceof java.lang.String) {
105 com.google.protobuf.ByteString b =
106 com.google.protobuf.ByteString.copyFromUtf8(
107 (java.lang.String) ref);
111 return (com.google.protobuf.ByteString) ref;
116 @SuppressWarnings(
"serial")
117 private com.google.protobuf.Internal.LongList domain_ =
144 public java.util.List<java.lang.Long>
173 return domain_.size();
201 return domain_.getLong(index);
203 private int domainMemoizedSerializedSize = -1;
205 private byte memoizedIsInitialized = -1;
212 memoizedIsInitialized = 1;
217 public void writeTo(com.google.protobuf.CodedOutputStream output)
218 throws java.io.IOException {
220 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
221 com.google.protobuf.GeneratedMessage.writeString(output, 1, name_);
224 output.writeUInt32NoTag(18);
225 output.writeUInt32NoTag(domainMemoizedSerializedSize);
227 for (
int i = 0; i < domain_.size(); i++) {
228 output.writeInt64NoTag(domain_.getLong(i));
230 getUnknownFields().writeTo(output);
235 int size = memoizedSize;
236 if (size != -1)
return size;
239 if (!com.google.protobuf.GeneratedMessage.isStringEmpty(name_)) {
240 size += com.google.protobuf.GeneratedMessage.computeStringSize(1, name_);
244 for (
int i = 0; i < domain_.size(); i++) {
245 dataSize += com.google.protobuf.CodedOutputStream
246 .computeInt64SizeNoTag(domain_.getLong(i));
251 size += com.google.protobuf.CodedOutputStream
252 .computeInt32SizeNoTag(dataSize);
254 domainMemoizedSerializedSize = dataSize;
256 size += getUnknownFields().getSerializedSize();
262 public boolean equals(
final java.lang.Object obj) {
266 if (!(obj instanceof com.google.ortools.sat.IntegerVariableProto)) {
267 return super.equals(obj);
275 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
281 if (memoizedHashCode != 0) {
282 return memoizedHashCode;
287 hash = (53 * hash) +
getName().hashCode();
292 hash = (29 * hash) + getUnknownFields().hashCode();
293 memoizedHashCode = hash;
298 java.nio.ByteBuffer data)
299 throws com.google.protobuf.InvalidProtocolBufferException {
300 return PARSER.parseFrom(data);
303 java.nio.ByteBuffer data,
304 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
305 throws com.google.protobuf.InvalidProtocolBufferException {
306 return PARSER.parseFrom(data, extensionRegistry);
309 com.google.protobuf.ByteString data)
310 throws com.google.protobuf.InvalidProtocolBufferException {
311 return PARSER.parseFrom(data);
314 com.google.protobuf.ByteString data,
315 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
316 throws com.google.protobuf.InvalidProtocolBufferException {
317 return PARSER.parseFrom(data, extensionRegistry);
320 throws com.google.protobuf.InvalidProtocolBufferException {
321 return PARSER.parseFrom(data);
325 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
326 throws com.google.protobuf.InvalidProtocolBufferException {
327 return PARSER.parseFrom(data, extensionRegistry);
330 throws java.io.IOException {
331 return com.google.protobuf.GeneratedMessage
332 .parseWithIOException(PARSER, input);
335 java.io.InputStream input,
336 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
337 throws java.io.IOException {
338 return com.google.protobuf.GeneratedMessage
339 .parseWithIOException(PARSER, input, extensionRegistry);
343 throws java.io.IOException {
344 return com.google.protobuf.GeneratedMessage
345 .parseDelimitedWithIOException(PARSER, input);
349 java.io.InputStream input,
350 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
351 throws java.io.IOException {
352 return com.google.protobuf.GeneratedMessage
353 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
356 com.google.protobuf.CodedInputStream input)
357 throws java.io.IOException {
358 return com.google.protobuf.GeneratedMessage
359 .parseWithIOException(PARSER, input);
362 com.google.protobuf.CodedInputStream input,
363 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
364 throws java.io.IOException {
365 return com.google.protobuf.GeneratedMessage
366 .parseWithIOException(PARSER, input, extensionRegistry);
379 return this == DEFAULT_INSTANCE
385 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
415 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
418 public static final com.google.protobuf.Descriptors.Descriptor
420 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_descriptor;
424 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
426 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_fieldAccessorTable
427 .ensureFieldAccessorsInitialized(
428 com.google.ortools.sat.IntegerVariableProto.class, com.google.ortools.sat.IntegerVariableProto.Builder.class);
437 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
446 domain_ = emptyLongList();
451 public com.google.protobuf.Descriptors.Descriptor
453 return com.google.ortools.sat.CpModelProtobuf.internal_static_operations_research_sat_IntegerVariableProto_descriptor;
458 return com.google.ortools.sat.IntegerVariableProto.getDefaultInstance();
465 throw newUninitializedMessageException(result);
473 if (bitField0_ != 0) { buildPartial0(result); }
478 private void buildPartial0(com.google.ortools.sat.IntegerVariableProto result) {
479 int from_bitField0_ = bitField0_;
480 if (((from_bitField0_ & 0x00000001) != 0)) {
481 result.name_ = name_;
483 if (((from_bitField0_ & 0x00000002) != 0)) {
484 domain_.makeImmutable();
485 result.domain_ = domain_;
491 if (other instanceof com.google.ortools.sat.IntegerVariableProto) {
492 return mergeFrom((com.google.ortools.sat.IntegerVariableProto)other);
494 super.mergeFrom(other);
500 if (other == com.google.ortools.sat.IntegerVariableProto.getDefaultInstance())
return this;
501 if (!other.getName().isEmpty()) {
503 bitField0_ |= 0x00000001;
506 if (!other.domain_.isEmpty()) {
507 if (domain_.isEmpty()) {
508 domain_ = other.domain_;
509 domain_.makeImmutable();
510 bitField0_ |= 0x00000002;
512 ensureDomainIsMutable();
513 domain_.addAll(other.domain_);
517 this.mergeUnknownFields(other.getUnknownFields());
529 com.google.protobuf.CodedInputStream input,
530 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
531 throws java.io.IOException {
532 if (extensionRegistry ==
null) {
533 throw new java.lang.NullPointerException();
536 boolean done =
false;
538 int tag = input.readTag();
544 name_ = input.readStringRequireUtf8();
545 bitField0_ |= 0x00000001;
549 long v = input.readInt64();
550 ensureDomainIsMutable();
555 int length = input.readRawVarint32();
556 int limit = input.pushLimit(length);
557 ensureDomainIsMutable();
558 while (input.getBytesUntilLimit() > 0) {
559 domain_.addLong(input.readInt64());
561 input.popLimit(limit);
565 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
572 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
573 throw e.unwrapIOException();
579 private int bitField0_;
581 private java.lang.Object name_ =
"";
591 java.lang.Object ref = name_;
592 if (!(ref instanceof java.lang.String)) {
593 com.google.protobuf.ByteString bs =
594 (com.google.protobuf.ByteString) ref;
595 java.lang.String s = bs.toStringUtf8();
599 return (java.lang.String) ref;
610 public com.google.protobuf.ByteString
612 java.lang.Object ref = name_;
613 if (ref instanceof String) {
614 com.google.protobuf.ByteString b =
615 com.google.protobuf.ByteString.copyFromUtf8(
616 (java.lang.String) ref);
620 return (com.google.protobuf.ByteString) ref;
633 java.lang.String value) {
634 if (value ==
null) {
throw new NullPointerException(); }
636 bitField0_ |= 0x00000001;
650 bitField0_ = (bitField0_ & ~0x00000001);
664 com.google.protobuf.ByteString value) {
665 if (value ==
null) {
throw new NullPointerException(); }
666 checkByteStringIsUtf8(value);
668 bitField0_ |= 0x00000001;
673 private com.google.protobuf.Internal.LongList domain_ = emptyLongList();
674 private void ensureDomainIsMutable() {
675 if (!domain_.isModifiable()) {
676 domain_ = makeMutableCopy(domain_);
678 bitField0_ |= 0x00000002;
704 public java.util.List<java.lang.Long>
706 domain_.makeImmutable();
734 return domain_.size();
762 return domain_.getLong(index);
791 int index,
long value) {
793 ensureDomainIsMutable();
794 domain_.setLong(index, value);
795 bitField0_ |= 0x00000002;
826 ensureDomainIsMutable();
827 domain_.addLong(value);
828 bitField0_ |= 0x00000002;
858 java.lang.Iterable<? extends java.lang.Long> values) {
859 ensureDomainIsMutable();
860 com.google.protobuf.AbstractMessageLite.Builder.addAll(
862 bitField0_ |= 0x00000002;
891 domain_ = emptyLongList();
892 bitField0_ = (bitField0_ & ~0x00000002);
903 DEFAULT_INSTANCE =
new com.google.ortools.sat.IntegerVariableProto();
907 return DEFAULT_INSTANCE;
914 com.google.protobuf.CodedInputStream input,
915 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
916 throws com.google.protobuf.InvalidProtocolBufferException {
919 builder.mergeFrom(input, extensionRegistry);
920 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
921 throw e.setUnfinishedMessage(builder.buildPartial());
922 }
catch (com.google.protobuf.UninitializedMessageException e) {
923 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
924 }
catch (java.io.IOException e) {
925 throw new com.google.protobuf.InvalidProtocolBufferException(e)
926 .setUnfinishedMessage(builder.buildPartial());
928 return builder.buildPartial();
943 return DEFAULT_INSTANCE;