5package com.google.ortools.linearsolver;
16 com.google.protobuf.GeneratedMessageV3 implements
19private static final long serialVersionUID = 0L;
21 private OptionalDouble(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {
28 @SuppressWarnings({
"unused"})
30 UnusedPrivateParameter unused) {
34 public static final com.google.protobuf.Descriptors.Descriptor
36 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
40 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
42 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_fieldAccessorTable
43 .ensureFieldAccessorsInitialized(
44 com.google.ortools.linearsolver.OptionalDouble.class, com.google.ortools.linearsolver.OptionalDouble.Builder.class);
47 private int bitField0_;
49 private double value_ = 0D;
56 return ((bitField0_ & 0x00000001) != 0);
67 private byte memoizedIsInitialized = -1;
74 memoizedIsInitialized = 1;
79 public void writeTo(com.google.protobuf.CodedOutputStream output)
80 throws java.io.IOException {
81 if (((bitField0_ & 0x00000001) != 0)) {
82 output.writeDouble(1, value_);
84 getUnknownFields().writeTo(output);
89 int size = memoizedSize;
90 if (size != -1)
return size;
93 if (((bitField0_ & 0x00000001) != 0)) {
94 size += com.google.protobuf.CodedOutputStream
95 .computeDoubleSize(1, value_);
97 size += getUnknownFields().getSerializedSize();
103 public boolean equals(
final java.lang.Object obj) {
107 if (!(obj instanceof com.google.ortools.linearsolver.OptionalDouble)) {
108 return super.equals(obj);
114 if (java.lang.Double.doubleToLongBits(
getValue())
115 != java.lang.Double.doubleToLongBits(
118 if (!getUnknownFields().equals(other.getUnknownFields()))
return false;
124 if (memoizedHashCode != 0) {
125 return memoizedHashCode;
131 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
132 java.lang.Double.doubleToLongBits(
getValue()));
134 hash = (29 * hash) + getUnknownFields().hashCode();
135 memoizedHashCode = hash;
140 java.nio.ByteBuffer data)
141 throws com.google.protobuf.InvalidProtocolBufferException {
145 java.nio.ByteBuffer data,
146 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
147 throws com.google.protobuf.InvalidProtocolBufferException {
151 com.google.protobuf.ByteString data)
152 throws com.google.protobuf.InvalidProtocolBufferException {
156 com.google.protobuf.ByteString data,
157 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
158 throws com.google.protobuf.InvalidProtocolBufferException {
162 throws com.google.protobuf.InvalidProtocolBufferException {
167 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
168 throws com.google.protobuf.InvalidProtocolBufferException {
172 throws java.io.IOException {
173 return com.google.protobuf.GeneratedMessageV3
174 .parseWithIOException(
PARSER, input);
177 java.io.InputStream input,
178 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
179 throws java.io.IOException {
180 return com.google.protobuf.GeneratedMessageV3
181 .parseWithIOException(
PARSER, input, extensionRegistry);
185 throws java.io.IOException {
186 return com.google.protobuf.GeneratedMessageV3
187 .parseDelimitedWithIOException(
PARSER, input);
191 java.io.InputStream input,
192 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
193 throws java.io.IOException {
194 return com.google.protobuf.GeneratedMessageV3
195 .parseDelimitedWithIOException(
PARSER, input, extensionRegistry);
198 com.google.protobuf.CodedInputStream input)
199 throws java.io.IOException {
200 return com.google.protobuf.GeneratedMessageV3
201 .parseWithIOException(
PARSER, input);
204 com.google.protobuf.CodedInputStream input,
205 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
206 throws java.io.IOException {
207 return com.google.protobuf.GeneratedMessageV3
208 .parseWithIOException(
PARSER, input, extensionRegistry);
221 return this == DEFAULT_INSTANCE
227 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
240 com.google.protobuf.GeneratedMessageV3.
Builder<Builder> implements
243 public static final com.google.protobuf.Descriptors.Descriptor
245 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
249 protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
251 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_fieldAccessorTable
252 .ensureFieldAccessorsInitialized(
253 com.google.ortools.linearsolver.OptionalDouble.class, com.google.ortools.linearsolver.OptionalDouble.Builder.class);
262 com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
275 public com.google.protobuf.Descriptors.Descriptor
277 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
282 return com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance();
289 throw newUninitializedMessageException(result);
297 if (bitField0_ != 0) { buildPartial0(result); }
302 private void buildPartial0(com.google.ortools.linearsolver.OptionalDouble result) {
303 int from_bitField0_ = bitField0_;
304 int to_bitField0_ = 0;
305 if (((from_bitField0_ & 0x00000001) != 0)) {
306 result.value_ = value_;
307 to_bitField0_ |= 0x00000001;
309 result.bitField0_ |= to_bitField0_;
314 return super.
clone();
318 com.google.protobuf.Descriptors.FieldDescriptor field,
319 java.lang.Object value) {
320 return super.
setField(field, value);
324 com.google.protobuf.Descriptors.FieldDescriptor field) {
329 com.google.protobuf.Descriptors.OneofDescriptor oneof) {
334 com.google.protobuf.Descriptors.FieldDescriptor field,
335 int index, java.lang.Object value) {
340 com.google.protobuf.Descriptors.FieldDescriptor field,
341 java.lang.Object value) {
346 if (other instanceof com.google.ortools.linearsolver.OptionalDouble) {
347 return mergeFrom((com.google.ortools.linearsolver.OptionalDouble)other);
349 super.mergeFrom(other);
355 if (other == com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance())
return this;
356 if (other.hasValue()) {
371 com.google.protobuf.CodedInputStream input,
372 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
373 throws java.io.IOException {
374 if (extensionRegistry ==
null) {
375 throw new java.lang.NullPointerException();
378 boolean done =
false;
380 int tag = input.readTag();
386 value_ = input.readDouble();
387 bitField0_ |= 0x00000001;
391 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
398 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
399 throw e.unwrapIOException();
405 private int bitField0_;
407 private double value_ ;
414 return ((bitField0_ & 0x00000001) != 0);
432 bitField0_ |= 0x00000001;
441 bitField0_ = (bitField0_ & ~0x00000001);
448 final com.google.protobuf.UnknownFieldSet unknownFields) {
454 final com.google.protobuf.UnknownFieldSet unknownFields) {
465 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.OptionalDouble();
469 return DEFAULT_INSTANCE;
472 @java.lang.Deprecated
public static final com.google.protobuf.Parser<
OptionalDouble>
476 com.google.protobuf.CodedInputStream input,
477 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
478 throws com.google.protobuf.InvalidProtocolBufferException {
481 builder.
mergeFrom(input, extensionRegistry);
482 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
484 }
catch (com.google.protobuf.UninitializedMessageException e) {
485 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.
buildPartial());
486 }
catch (java.io.IOException e) {
487 throw new com.google.protobuf.InvalidProtocolBufferException(e)
505 return DEFAULT_INSTANCE;