5package com.google.ortools.linearsolver;
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,
30 private OptionalDouble(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
36 public static final com.google.protobuf.Descriptors.Descriptor
38 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
42 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
44 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_fieldAccessorTable
45 .ensureFieldAccessorsInitialized(
46 com.google.ortools.linearsolver.OptionalDouble.class, com.google.ortools.linearsolver.OptionalDouble.Builder.class);
49 private int bitField0_;
51 private double value_ = 0D;
58 return ((bitField0_ & 0x00000001) != 0);
69 private byte memoizedIsInitialized = -1;
76 memoizedIsInitialized = 1;
81 public void writeTo(com.google.protobuf.CodedOutputStream output)
82 throws java.io.IOException {
83 if (((bitField0_ & 0x00000001) != 0)) {
84 output.writeDouble(1, value_);
86 getUnknownFields().writeTo(output);
91 int size = memoizedSize;
92 if (size != -1)
return size;
95 if (((bitField0_ & 0x00000001) != 0)) {
96 size += com.google.protobuf.CodedOutputStream
97 .computeDoubleSize(1, value_);
99 size += getUnknownFields().getSerializedSize();
105 public boolean equals(
final java.lang.Object obj) {
109 if (!(obj instanceof com.google.ortools.linearsolver.OptionalDouble)) {
110 return super.equals(obj);
116 if (java.lang.Double.doubleToLongBits(
getValue())
117 != java.lang.Double.doubleToLongBits(
120 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
126 if (memoizedHashCode != 0) {
127 return memoizedHashCode;
133 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
134 java.lang.Double.doubleToLongBits(
getValue()));
136 hash = (29 * hash) + getUnknownFields().hashCode();
137 memoizedHashCode = hash;
142 java.nio.ByteBuffer data)
143 throws com.google.protobuf.InvalidProtocolBufferException {
144 return PARSER.parseFrom(data);
147 java.nio.ByteBuffer data,
148 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
149 throws com.google.protobuf.InvalidProtocolBufferException {
150 return PARSER.parseFrom(data, extensionRegistry);
153 com.google.protobuf.ByteString data)
154 throws com.google.protobuf.InvalidProtocolBufferException {
155 return PARSER.parseFrom(data);
158 com.google.protobuf.ByteString data,
159 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
160 throws com.google.protobuf.InvalidProtocolBufferException {
161 return PARSER.parseFrom(data, extensionRegistry);
164 throws com.google.protobuf.InvalidProtocolBufferException {
165 return PARSER.parseFrom(data);
169 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
170 throws com.google.protobuf.InvalidProtocolBufferException {
171 return PARSER.parseFrom(data, extensionRegistry);
174 throws java.io.IOException {
175 return com.google.protobuf.GeneratedMessage
176 .parseWithIOException(PARSER, input);
179 java.io.InputStream input,
180 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
181 throws java.io.IOException {
182 return com.google.protobuf.GeneratedMessage
183 .parseWithIOException(PARSER, input, extensionRegistry);
187 throws java.io.IOException {
188 return com.google.protobuf.GeneratedMessage
189 .parseDelimitedWithIOException(PARSER, input);
193 java.io.InputStream input,
194 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
195 throws java.io.IOException {
196 return com.google.protobuf.GeneratedMessage
197 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
200 com.google.protobuf.CodedInputStream input)
201 throws java.io.IOException {
202 return com.google.protobuf.GeneratedMessage
203 .parseWithIOException(PARSER, input);
206 com.google.protobuf.CodedInputStream input,
207 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
208 throws java.io.IOException {
209 return com.google.protobuf.GeneratedMessage
210 .parseWithIOException(PARSER, input, extensionRegistry);
223 return this == DEFAULT_INSTANCE
229 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
242 com.google.protobuf.GeneratedMessage.
Builder<Builder> implements
245 public static final com.google.protobuf.Descriptors.Descriptor
247 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
251 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
253 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_fieldAccessorTable
254 .ensureFieldAccessorsInitialized(
255 com.google.ortools.linearsolver.OptionalDouble.class, com.google.ortools.linearsolver.OptionalDouble.Builder.class);
264 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
277 public com.google.protobuf.Descriptors.Descriptor
279 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
284 return com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance();
291 throw newUninitializedMessageException(result);
299 if (bitField0_ != 0) { buildPartial0(result); }
304 private void buildPartial0(com.google.ortools.linearsolver.OptionalDouble result) {
305 int from_bitField0_ = bitField0_;
306 int to_bitField0_ = 0;
307 if (((from_bitField0_ & 0x00000001) != 0)) {
308 result.value_ = value_;
309 to_bitField0_ |= 0x00000001;
311 result.bitField0_ |= to_bitField0_;
316 if (other instanceof com.google.ortools.linearsolver.OptionalDouble) {
317 return mergeFrom((com.google.ortools.linearsolver.OptionalDouble)other);
319 super.mergeFrom(other);
325 if (other == com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance())
return this;
326 if (other.hasValue()) {
329 this.mergeUnknownFields(other.getUnknownFields());
341 com.google.protobuf.CodedInputStream input,
342 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
343 throws java.io.IOException {
344 if (extensionRegistry ==
null) {
345 throw new java.lang.NullPointerException();
348 boolean done =
false;
350 int tag = input.readTag();
356 value_ = input.readDouble();
357 bitField0_ |= 0x00000001;
361 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
368 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
369 throw e.unwrapIOException();
375 private int bitField0_;
377 private double value_ ;
384 return ((bitField0_ & 0x00000001) != 0);
402 bitField0_ |= 0x00000001;
411 bitField0_ = (bitField0_ & ~0x00000001);
423 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.OptionalDouble();
427 return DEFAULT_INSTANCE;
431 PARSER =
new com.google.protobuf.AbstractParser<
OptionalDouble>() {
434 com.google.protobuf.CodedInputStream input,
435 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
436 throws com.google.protobuf.InvalidProtocolBufferException {
439 builder.mergeFrom(input, extensionRegistry);
440 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
441 throw e.setUnfinishedMessage(builder.buildPartial());
442 }
catch (com.google.protobuf.UninitializedMessageException e) {
443 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
444 }
catch (java.io.IOException e) {
445 throw new com.google.protobuf.InvalidProtocolBufferException(e)
446 .setUnfinishedMessage(builder.buildPartial());
448 return builder.buildPartial();
463 return DEFAULT_INSTANCE;