6package com.google.ortools.linearsolver;
16public final class OptionalDouble
extends
17 com.google.protobuf.GeneratedMessage implements
20private static final long serialVersionUID = 0L;
22 com.google.protobuf.RuntimeVersion.validateProtobufGencodeVersion(
23 com.google.protobuf.RuntimeVersion.RuntimeDomain.PUBLIC,
28 OptionalDouble.class.getName());
31 private OptionalDouble(com.google.protobuf.GeneratedMessage.Builder<?> builder) {
34 private OptionalDouble() {
37 public static final com.google.protobuf.Descriptors.Descriptor
39 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
43 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
45 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_fieldAccessorTable
46 .ensureFieldAccessorsInitialized(
47 com.google.ortools.linearsolver.OptionalDouble.class, com.google.ortools.linearsolver.OptionalDouble.Builder.class);
50 private int bitField0_;
52 private double value_ = 0D;
59 return ((bitField0_ & 0x00000001) != 0);
70 private byte memoizedIsInitialized = -1;
77 memoizedIsInitialized = 1;
82 public void writeTo(com.google.protobuf.CodedOutputStream output)
83 throws java.io.IOException {
84 if (((bitField0_ & 0x00000001) != 0)) {
85 output.writeDouble(1, value_);
87 getUnknownFields().writeTo(output);
92 int size = memoizedSize;
93 if (size != -1)
return size;
96 if (((bitField0_ & 0x00000001) != 0)) {
97 size += com.google.protobuf.CodedOutputStream
98 .computeDoubleSize(1, value_);
100 size += getUnknownFields().getSerializedSize();
106 public boolean equals(
final java.lang.Object obj) {
110 if (!(obj instanceof com.google.ortools.linearsolver.OptionalDouble)) {
111 return super.equals(obj);
117 if (java.lang.Double.doubleToLongBits(
getValue())
118 != java.lang.Double.doubleToLongBits(
121 if (!getUnknownFields().
equals(other.getUnknownFields()))
return false;
127 if (memoizedHashCode != 0) {
128 return memoizedHashCode;
134 hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
135 java.lang.Double.doubleToLongBits(
getValue()));
137 hash = (29 * hash) + getUnknownFields().hashCode();
138 memoizedHashCode = hash;
143 java.nio.ByteBuffer data)
144 throws com.google.protobuf.InvalidProtocolBufferException {
145 return PARSER.parseFrom(data);
148 java.nio.ByteBuffer data,
149 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
150 throws com.google.protobuf.InvalidProtocolBufferException {
151 return PARSER.parseFrom(data, extensionRegistry);
154 com.google.protobuf.ByteString data)
155 throws com.google.protobuf.InvalidProtocolBufferException {
156 return PARSER.parseFrom(data);
159 com.google.protobuf.ByteString data,
160 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
161 throws com.google.protobuf.InvalidProtocolBufferException {
162 return PARSER.parseFrom(data, extensionRegistry);
165 throws com.google.protobuf.InvalidProtocolBufferException {
166 return PARSER.parseFrom(data);
170 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
171 throws com.google.protobuf.InvalidProtocolBufferException {
172 return PARSER.parseFrom(data, extensionRegistry);
175 throws java.io.IOException {
176 return com.google.protobuf.GeneratedMessage
177 .parseWithIOException(PARSER, input);
180 java.io.InputStream input,
181 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
182 throws java.io.IOException {
183 return com.google.protobuf.GeneratedMessage
184 .parseWithIOException(PARSER, input, extensionRegistry);
188 throws java.io.IOException {
189 return com.google.protobuf.GeneratedMessage
190 .parseDelimitedWithIOException(PARSER, input);
194 java.io.InputStream input,
195 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
196 throws java.io.IOException {
197 return com.google.protobuf.GeneratedMessage
198 .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
201 com.google.protobuf.CodedInputStream input)
202 throws java.io.IOException {
203 return com.google.protobuf.GeneratedMessage
204 .parseWithIOException(PARSER, input);
207 com.google.protobuf.CodedInputStream input,
208 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
209 throws java.io.IOException {
210 return com.google.protobuf.GeneratedMessage
211 .parseWithIOException(PARSER, input, extensionRegistry);
217 return DEFAULT_INSTANCE.toBuilder();
220 return DEFAULT_INSTANCE.toBuilder().
mergeFrom(prototype);
224 return this == DEFAULT_INSTANCE
230 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
242 public static final class Builder
extends
243 com.google.protobuf.GeneratedMessage.Builder<Builder> implements
246 public static final com.google.protobuf.Descriptors.Descriptor
248 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
252 protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
254 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_fieldAccessorTable
255 .ensureFieldAccessorsInitialized(
256 com.google.ortools.linearsolver.OptionalDouble.class, com.google.ortools.linearsolver.OptionalDouble.Builder.class);
265 com.google.protobuf.GeneratedMessage.BuilderParent parent) {
278 public com.google.protobuf.Descriptors.Descriptor
280 return com.google.ortools.linearsolver.LinearSolver.internal_static_operations_research_OptionalDouble_descriptor;
285 return com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance();
292 throw newUninitializedMessageException(result);
300 if (bitField0_ != 0) { buildPartial0(result); }
305 private void buildPartial0(com.google.ortools.linearsolver.OptionalDouble result) {
306 int from_bitField0_ = bitField0_;
307 int to_bitField0_ = 0;
308 if (((from_bitField0_ & 0x00000001) != 0)) {
309 result.value_ = value_;
310 to_bitField0_ |= 0x00000001;
312 result.bitField0_ |= to_bitField0_;
316 public Builder
mergeFrom(com.google.protobuf.Message other) {
317 if (other instanceof com.google.ortools.linearsolver.OptionalDouble) {
318 return mergeFrom((com.google.ortools.linearsolver.OptionalDouble)other);
320 super.mergeFrom(other);
325 public Builder
mergeFrom(com.google.ortools.linearsolver.OptionalDouble other) {
326 if (other == com.google.ortools.linearsolver.OptionalDouble.getDefaultInstance())
return this;
327 if (other.hasValue()) {
330 this.mergeUnknownFields(other.getUnknownFields());
342 com.google.protobuf.CodedInputStream input,
343 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
344 throws java.io.IOException {
345 if (extensionRegistry ==
null) {
346 throw new java.lang.NullPointerException();
349 boolean done =
false;
351 int tag = input.readTag();
357 value_ = input.readDouble();
358 bitField0_ |= 0x00000001;
362 if (!super.parseUnknownField(input, extensionRegistry, tag)) {
369 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
370 throw e.unwrapIOException();
376 private int bitField0_;
378 private double value_ ;
385 return ((bitField0_ & 0x00000001) != 0);
403 bitField0_ |= 0x00000001;
412 bitField0_ = (bitField0_ & ~0x00000001);
424 DEFAULT_INSTANCE =
new com.google.ortools.linearsolver.OptionalDouble();
428 return DEFAULT_INSTANCE;
432 PARSER =
new com.google.protobuf.AbstractParser<
OptionalDouble>() {
435 com.google.protobuf.CodedInputStream input,
436 com.google.protobuf.ExtensionRegistryLite extensionRegistry)
437 throws com.google.protobuf.InvalidProtocolBufferException {
440 builder.mergeFrom(input, extensionRegistry);
441 }
catch (com.google.protobuf.InvalidProtocolBufferException e) {
442 throw e.setUnfinishedMessage(builder.buildPartial());
443 }
catch (com.google.protobuf.UninitializedMessageException e) {
444 throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
445 }
catch (java.io.IOException e) {
446 throw new com.google.protobuf.InvalidProtocolBufferException(e)
447 .setUnfinishedMessage(builder.buildPartial());
449 return builder.buildPartial();
453 public static com.google.protobuf.Parser<OptionalDouble>
parser() {
464 return DEFAULT_INSTANCE;