6package com.google.ortools.linearsolver;
16@com.google.protobuf.Generated
17public final class OptionalDouble
extends
18 com.google.protobuf.GeneratedMessage implements
21private static final long serialVersionUID = 0L;
23 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
24 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
29 OptionalDouble.class.getName());
32 private OptionalDouble(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
35 private OptionalDouble() {
38 public static final com.google.protobuf.Descriptors.Descriptor
40 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
44 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
46 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_fieldAccessorTable
47 .ensureFieldAccessorsInitialized(
48 com.google.ortools.linearsolver.OptionalDouble.class, com.google.ortools.linearsolver.OptionalDouble.Builder.class);
51 private int bitField0_;
53 private double value_ = 0D;
60 return ((bitField0_ & 0x00000001) != 0);
71 private byte memoizedIsInitialized = -1;
78 memoizedIsInitialized = 1;
83 public void writeTo(com.google.protobuf.CodedOutputStream output)
84 throws java.io.IOException {
85 if (((bitField0_ & 0x00000001) != 0)) {
86 output.writeDouble(1, value_);
88 getUnknownFields().writeTo(output);
93 int size = memoizedSize;
94 if (size != -1)
return size;
97 if (((bitField0_ & 0x00000001) != 0)) {
98 size += com.google.protobuf.CodedOutputStream
99 .computeDoubleSize(1, value_);
101 size += getUnknownFields().getSerializedSize();
107 public boolean equals(
final java.lang.Object obj) {
111 if (!(obj instanceof com.google.ortools.linearsolver.OptionalDouble)) {
112 return super.equals(obj);
118 if (java.lang.Double.doubleToLongBits(
getValue())
119 != java.lang.Double.doubleToLongBits(
122 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
128 if (memoizedHashCode != 0) {
129 return memoizedHashCode;
135 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
136 java.lang.Double.doubleToLongBits(
getValue()));
138 hash = (29 * hash) + getUnknownFields().hashCode();
139 memoizedHashCode = hash;
144 java.nio.ByteBuffer data)
145 throws com.google.protobuf.InvalidProtocolBufferException {
146 return PARSER.parseFrom(data);
149 java.nio.ByteBuffer data,
150 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
151 throws com.google.protobuf.InvalidProtocolBufferException {
152 return PARSER.parseFrom(data, extensionRegistry);
155 com.google.protobuf.ByteString data)
156 throws com.google.protobuf.InvalidProtocolBufferException {
157 return PARSER.parseFrom(data);
160 com.google.protobuf.ByteString data,
161 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
162 throws com.google.protobuf.InvalidProtocolBufferException {
163 return PARSER.parseFrom(data, extensionRegistry);
166 throws com.google.protobuf.InvalidProtocolBufferException {
167 return PARSER.parseFrom(data);
171 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
172 throws com.google.protobuf.InvalidProtocolBufferException {
173 return PARSER.parseFrom(data, extensionRegistry);
176 throws java.io.IOException {
177 return com.google.protobuf.GeneratedMessage
178 .parseWithIOException(PARSER, input);
181 java.io.InputStream input,
182 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
183 throws java.io.IOException {
184 return com.google.protobuf.GeneratedMessage
185 .parseWithIOException(PARSER, input, extensionRegistry);
189 throws java.io.IOException {
190 return com.google.protobuf.GeneratedMessage
191 .parseDelimitedWithIOException(PARSER, input);
195 java.io.InputStream input,
196 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
197 throws java.io.IOException {
198 return com.google.protobuf.GeneratedMessage
199 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
202 com.google.protobuf.CodedInputStream input)
203 throws java.io.IOException {
204 return com.google.protobuf.GeneratedMessage
205 .parseWithIOException(PARSER, input);
208 com.google.protobuf.CodedInputStream input,
209 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
210 throws java.io.IOException {
211 return com.google.protobuf.GeneratedMessage
212 .parseWithIOException(PARSER, input, extensionRegistry);
218 return DEFAULT_INSTANCE.toBuilder();
221 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
225 return this == DEFAULT_INSTANCE
231 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
243 public static final class Builder
extends
244 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
247 public static final com.google.protobuf.Descriptors.Descriptor
249 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
253 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
255 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_fieldAccessorTable
256 .ensureFieldAccessorsInitialized(
257 com.google.ortools.linearsolver.OptionalDouble.class, com.google.ortools.linearsolver.OptionalDouble.Builder.class);
266 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
279 public com.google.protobuf.Descriptors.Descriptor
281 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
286 return com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance();
293 throw newUninitializedMessageException(result);
301 if (bitField0_ != 0) { buildPartial0(result); }
306 private void buildPartial0(com.google.ortools.linearsolver.OptionalDouble result) {
307 int from_bitField0_ = bitField0_;
308 int to_bitField0_ = 0;
309 if (((from_bitField0_ & 0x00000001) != 0)) {
310 result.value_ = value_;
311 to_bitField0_ |= 0x00000001;
313 result.bitField0_ |= to_bitField0_;
317 public Builder
mergeFrom(com.google.protobuf.Message other) {
318 if (other instanceof com.google.ortools.linearsolver.OptionalDouble) {
319 return mergeFrom((com.google.ortools.linearsolver.OptionalDouble)other);
321 super.mergeFrom(other);
326 public Builder
mergeFrom(com.google.ortools.linearsolver.OptionalDouble other) {
327 if (other == com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance())
return this;
328 if (other.hasValue()) {
331 this.mergeUnknownFields(other.getUnknownFields());
343 com.google.protobuf.CodedInputStream input,
344 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
345 throws java.io.IOException {
346 if (extensionRegistry ==
null) {
347 throw new java.lang.NullPointerException();
350 boolean done =
false;
352 int tag = input.readTag();
358 value_ = input.readDouble();
359 bitField0_ |= 0x00000001;
363 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
370 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
371 throw e.unwrapIOException();
377 private int bitField0_;
379 private double value_ ;
386 return ((bitField0_ & 0x00000001) != 0);
404 bitField0_ |= 0x00000001;
413 bitField0_ = (bitField0_ & ~0x00000001);
425 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.OptionalDouble();
429 return DEFAULT_INSTANCE;
433 PARSER =
new com.google.protobuf.AbstractParser<
OptionalDouble>() {
436 com.google.protobuf.CodedInputStream input,
437 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
438 throws com.google.protobuf.InvalidProtocolBufferException {
441 builder.mergeFrom(input, extensionRegistry);
442 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
443 throw e.setUnfinishedMessage(builder.buildPartial());
444 }
catch (com.google.protobuf.UninitializedMessageException e) {
445 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
446 }
catch (java.io.IOException e) {
447 throw new com.google.protobuf.InvalidProtocolBufferException(e)
448 .setUnfinishedMessage(builder.buildPartial());
450 return builder.buildPartial();
454 public static com.google.protobuf.Parser<OptionalDouble>
parser() {
465 return DEFAULT_INSTANCE;