PageRenderTime 36ms CodeModel.GetById 25ms RepoModel.GetById 0ms app.codeStats 1ms

/OsmAnd-java/src/net/osmand/binary/OsmandIndex.java

https://code.google.com/
Java | 5262 lines | 4712 code | 381 blank | 169 comment | 537 complexity | 012fd2c73b8a82c13f0dabce6d2e4d95 MD5 | raw file
Possible License(s): MIT
  1. // Generated by the protocol buffer compiler. DO NOT EDIT!
  2. // source: DataExtractionOSM/src/osmand_index.proto
  3. package net.osmand.binary;
  4. public final class OsmandIndex {
  5. private OsmandIndex() {}
  6. public static void registerAllExtensions(
  7. com.google.protobuf.ExtensionRegistryLite registry) {
  8. }
  9. public static final class OsmAndStoredIndex extends
  10. com.google.protobuf.GeneratedMessageLite {
  11. // Use OsmAndStoredIndex.newBuilder() to construct.
  12. private OsmAndStoredIndex() {
  13. initFields();
  14. }
  15. private OsmAndStoredIndex(boolean noInit) {}
  16. private static final OsmAndStoredIndex defaultInstance;
  17. public static OsmAndStoredIndex getDefaultInstance() {
  18. return defaultInstance;
  19. }
  20. @Override
  21. public OsmAndStoredIndex getDefaultInstanceForType() {
  22. return defaultInstance;
  23. }
  24. // required uint32 version = 1;
  25. public static final int VERSION_FIELD_NUMBER = 1;
  26. private boolean hasVersion;
  27. private int version_ = 0;
  28. public boolean hasVersion() { return hasVersion; }
  29. public int getVersion() { return version_; }
  30. // required int64 dateCreated = 18;
  31. public static final int DATECREATED_FIELD_NUMBER = 18;
  32. private boolean hasDateCreated;
  33. private long dateCreated_ = 0L;
  34. public boolean hasDateCreated() { return hasDateCreated; }
  35. public long getDateCreated() { return dateCreated_; }
  36. // repeated .FileIndex fileIndex = 7;
  37. public static final int FILEINDEX_FIELD_NUMBER = 7;
  38. private java.util.List<net.osmand.binary.OsmandIndex.FileIndex> fileIndex_ =
  39. java.util.Collections.emptyList();
  40. public java.util.List<net.osmand.binary.OsmandIndex.FileIndex> getFileIndexList() {
  41. return fileIndex_;
  42. }
  43. public int getFileIndexCount() { return fileIndex_.size(); }
  44. public net.osmand.binary.OsmandIndex.FileIndex getFileIndex(int index) {
  45. return fileIndex_.get(index);
  46. }
  47. private void initFields() {
  48. }
  49. @Override
  50. public final boolean isInitialized() {
  51. if (!hasVersion) return false;
  52. if (!hasDateCreated) return false;
  53. for (net.osmand.binary.OsmandIndex.FileIndex element : getFileIndexList()) {
  54. if (!element.isInitialized()) return false;
  55. }
  56. return true;
  57. }
  58. @Override
  59. public void writeTo(com.google.protobuf.CodedOutputStream output)
  60. throws java.io.IOException {
  61. getSerializedSize();
  62. if (hasVersion()) {
  63. output.writeUInt32(1, getVersion());
  64. }
  65. for (net.osmand.binary.OsmandIndex.FileIndex element : getFileIndexList()) {
  66. output.writeMessage(7, element);
  67. }
  68. if (hasDateCreated()) {
  69. output.writeInt64(18, getDateCreated());
  70. }
  71. }
  72. private int memoizedSerializedSize = -1;
  73. @Override
  74. public int getSerializedSize() {
  75. int size = memoizedSerializedSize;
  76. if (size != -1) return size;
  77. size = 0;
  78. if (hasVersion()) {
  79. size += com.google.protobuf.CodedOutputStream
  80. .computeUInt32Size(1, getVersion());
  81. }
  82. for (net.osmand.binary.OsmandIndex.FileIndex element : getFileIndexList()) {
  83. size += com.google.protobuf.CodedOutputStream
  84. .computeMessageSize(7, element);
  85. }
  86. if (hasDateCreated()) {
  87. size += com.google.protobuf.CodedOutputStream
  88. .computeInt64Size(18, getDateCreated());
  89. }
  90. memoizedSerializedSize = size;
  91. return size;
  92. }
  93. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
  94. com.google.protobuf.ByteString data)
  95. throws com.google.protobuf.InvalidProtocolBufferException {
  96. return newBuilder().mergeFrom(data).buildParsed();
  97. }
  98. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
  99. com.google.protobuf.ByteString data,
  100. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  101. throws com.google.protobuf.InvalidProtocolBufferException {
  102. return newBuilder().mergeFrom(data, extensionRegistry)
  103. .buildParsed();
  104. }
  105. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(byte[] data)
  106. throws com.google.protobuf.InvalidProtocolBufferException {
  107. return newBuilder().mergeFrom(data).buildParsed();
  108. }
  109. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
  110. byte[] data,
  111. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  112. throws com.google.protobuf.InvalidProtocolBufferException {
  113. return newBuilder().mergeFrom(data, extensionRegistry)
  114. .buildParsed();
  115. }
  116. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(java.io.InputStream input)
  117. throws java.io.IOException {
  118. return newBuilder().mergeFrom(input).buildParsed();
  119. }
  120. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
  121. java.io.InputStream input,
  122. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  123. throws java.io.IOException {
  124. return newBuilder().mergeFrom(input, extensionRegistry)
  125. .buildParsed();
  126. }
  127. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseDelimitedFrom(java.io.InputStream input)
  128. throws java.io.IOException {
  129. Builder builder = newBuilder();
  130. if (builder.mergeDelimitedFrom(input)) {
  131. return builder.buildParsed();
  132. } else {
  133. return null;
  134. }
  135. }
  136. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseDelimitedFrom(
  137. java.io.InputStream input,
  138. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  139. throws java.io.IOException {
  140. Builder builder = newBuilder();
  141. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  142. return builder.buildParsed();
  143. } else {
  144. return null;
  145. }
  146. }
  147. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
  148. com.google.protobuf.CodedInputStream input)
  149. throws java.io.IOException {
  150. return newBuilder().mergeFrom(input).buildParsed();
  151. }
  152. public static net.osmand.binary.OsmandIndex.OsmAndStoredIndex parseFrom(
  153. com.google.protobuf.CodedInputStream input,
  154. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  155. throws java.io.IOException {
  156. return newBuilder().mergeFrom(input, extensionRegistry)
  157. .buildParsed();
  158. }
  159. public static Builder newBuilder() { return Builder.create(); }
  160. @Override
  161. public Builder newBuilderForType() { return newBuilder(); }
  162. public static Builder newBuilder(net.osmand.binary.OsmandIndex.OsmAndStoredIndex prototype) {
  163. return newBuilder().mergeFrom(prototype);
  164. }
  165. @Override
  166. public Builder toBuilder() { return newBuilder(this); }
  167. public static final class Builder extends
  168. com.google.protobuf.GeneratedMessageLite.Builder<
  169. net.osmand.binary.OsmandIndex.OsmAndStoredIndex, Builder> {
  170. private net.osmand.binary.OsmandIndex.OsmAndStoredIndex result;
  171. // Construct using net.osmand.binary.OsmandIndex.OsmAndStoredIndex.newBuilder()
  172. private Builder() {}
  173. private static Builder create() {
  174. Builder builder = new Builder();
  175. builder.result = new net.osmand.binary.OsmandIndex.OsmAndStoredIndex();
  176. return builder;
  177. }
  178. @Override
  179. protected net.osmand.binary.OsmandIndex.OsmAndStoredIndex internalGetResult() {
  180. return result;
  181. }
  182. @Override
  183. public Builder clear() {
  184. if (result == null) {
  185. throw new IllegalStateException(
  186. "Cannot call clear() after build().");
  187. }
  188. result = new net.osmand.binary.OsmandIndex.OsmAndStoredIndex();
  189. return this;
  190. }
  191. @Override
  192. public Builder clone() {
  193. return create().mergeFrom(result);
  194. }
  195. @Override
  196. public net.osmand.binary.OsmandIndex.OsmAndStoredIndex getDefaultInstanceForType() {
  197. return net.osmand.binary.OsmandIndex.OsmAndStoredIndex.getDefaultInstance();
  198. }
  199. @Override
  200. public boolean isInitialized() {
  201. return result.isInitialized();
  202. }
  203. @Override
  204. public net.osmand.binary.OsmandIndex.OsmAndStoredIndex build() {
  205. if (result != null && !isInitialized()) {
  206. throw newUninitializedMessageException(result);
  207. }
  208. return buildPartial();
  209. }
  210. private net.osmand.binary.OsmandIndex.OsmAndStoredIndex buildParsed()
  211. throws com.google.protobuf.InvalidProtocolBufferException {
  212. if (!isInitialized()) {
  213. throw newUninitializedMessageException(
  214. result).asInvalidProtocolBufferException();
  215. }
  216. return buildPartial();
  217. }
  218. @Override
  219. public net.osmand.binary.OsmandIndex.OsmAndStoredIndex buildPartial() {
  220. if (result == null) {
  221. throw new IllegalStateException(
  222. "build() has already been called on this Builder.");
  223. }
  224. if (result.fileIndex_ != java.util.Collections.EMPTY_LIST) {
  225. result.fileIndex_ =
  226. java.util.Collections.unmodifiableList(result.fileIndex_);
  227. }
  228. net.osmand.binary.OsmandIndex.OsmAndStoredIndex returnMe = result;
  229. result = null;
  230. return returnMe;
  231. }
  232. @Override
  233. public Builder mergeFrom(net.osmand.binary.OsmandIndex.OsmAndStoredIndex other) {
  234. if (other == net.osmand.binary.OsmandIndex.OsmAndStoredIndex.getDefaultInstance()) return this;
  235. if (other.hasVersion()) {
  236. setVersion(other.getVersion());
  237. }
  238. if (other.hasDateCreated()) {
  239. setDateCreated(other.getDateCreated());
  240. }
  241. if (!other.fileIndex_.isEmpty()) {
  242. if (result.fileIndex_.isEmpty()) {
  243. result.fileIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.FileIndex>();
  244. }
  245. result.fileIndex_.addAll(other.fileIndex_);
  246. }
  247. return this;
  248. }
  249. @Override
  250. public Builder mergeFrom(
  251. com.google.protobuf.CodedInputStream input,
  252. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  253. throws java.io.IOException {
  254. while (true) {
  255. int tag = input.readTag();
  256. switch (tag) {
  257. case 0:
  258. return this;
  259. default: {
  260. if (!parseUnknownField(input, extensionRegistry, tag)) {
  261. return this;
  262. }
  263. break;
  264. }
  265. case 8: {
  266. setVersion(input.readUInt32());
  267. break;
  268. }
  269. case 58: {
  270. net.osmand.binary.OsmandIndex.FileIndex.Builder subBuilder = net.osmand.binary.OsmandIndex.FileIndex.newBuilder();
  271. input.readMessage(subBuilder, extensionRegistry);
  272. addFileIndex(subBuilder.buildPartial());
  273. break;
  274. }
  275. case 144: {
  276. setDateCreated(input.readInt64());
  277. break;
  278. }
  279. }
  280. }
  281. }
  282. // required uint32 version = 1;
  283. public boolean hasVersion() {
  284. return result.hasVersion();
  285. }
  286. public int getVersion() {
  287. return result.getVersion();
  288. }
  289. public Builder setVersion(int value) {
  290. result.hasVersion = true;
  291. result.version_ = value;
  292. return this;
  293. }
  294. public Builder clearVersion() {
  295. result.hasVersion = false;
  296. result.version_ = 0;
  297. return this;
  298. }
  299. // required int64 dateCreated = 18;
  300. public boolean hasDateCreated() {
  301. return result.hasDateCreated();
  302. }
  303. public long getDateCreated() {
  304. return result.getDateCreated();
  305. }
  306. public Builder setDateCreated(long value) {
  307. result.hasDateCreated = true;
  308. result.dateCreated_ = value;
  309. return this;
  310. }
  311. public Builder clearDateCreated() {
  312. result.hasDateCreated = false;
  313. result.dateCreated_ = 0L;
  314. return this;
  315. }
  316. // repeated .FileIndex fileIndex = 7;
  317. public java.util.List<net.osmand.binary.OsmandIndex.FileIndex> getFileIndexList() {
  318. return java.util.Collections.unmodifiableList(result.fileIndex_);
  319. }
  320. public int getFileIndexCount() {
  321. return result.getFileIndexCount();
  322. }
  323. public net.osmand.binary.OsmandIndex.FileIndex getFileIndex(int index) {
  324. return result.getFileIndex(index);
  325. }
  326. public Builder setFileIndex(int index, net.osmand.binary.OsmandIndex.FileIndex value) {
  327. if (value == null) {
  328. throw new NullPointerException();
  329. }
  330. result.fileIndex_.set(index, value);
  331. return this;
  332. }
  333. public Builder setFileIndex(int index, net.osmand.binary.OsmandIndex.FileIndex.Builder builderForValue) {
  334. result.fileIndex_.set(index, builderForValue.build());
  335. return this;
  336. }
  337. public Builder addFileIndex(net.osmand.binary.OsmandIndex.FileIndex value) {
  338. if (value == null) {
  339. throw new NullPointerException();
  340. }
  341. if (result.fileIndex_.isEmpty()) {
  342. result.fileIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.FileIndex>();
  343. }
  344. result.fileIndex_.add(value);
  345. return this;
  346. }
  347. public Builder addFileIndex(net.osmand.binary.OsmandIndex.FileIndex.Builder builderForValue) {
  348. if (result.fileIndex_.isEmpty()) {
  349. result.fileIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.FileIndex>();
  350. }
  351. result.fileIndex_.add(builderForValue.build());
  352. return this;
  353. }
  354. public Builder addAllFileIndex(
  355. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.FileIndex> values) {
  356. if (result.fileIndex_.isEmpty()) {
  357. result.fileIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.FileIndex>();
  358. }
  359. super.addAll(values, result.fileIndex_);
  360. return this;
  361. }
  362. public Builder clearFileIndex() {
  363. result.fileIndex_ = java.util.Collections.emptyList();
  364. return this;
  365. }
  366. // @@protoc_insertion_point(builder_scope:OsmAndStoredIndex)
  367. }
  368. static {
  369. defaultInstance = new OsmAndStoredIndex(true);
  370. net.osmand.binary.OsmandIndex.internalForceInit();
  371. defaultInstance.initFields();
  372. }
  373. // @@protoc_insertion_point(class_scope:OsmAndStoredIndex)
  374. }
  375. public static final class FileIndex extends
  376. com.google.protobuf.GeneratedMessageLite {
  377. // Use FileIndex.newBuilder() to construct.
  378. private FileIndex() {
  379. initFields();
  380. }
  381. private FileIndex(boolean noInit) {}
  382. private static final FileIndex defaultInstance;
  383. public static FileIndex getDefaultInstance() {
  384. return defaultInstance;
  385. }
  386. @Override
  387. public FileIndex getDefaultInstanceForType() {
  388. return defaultInstance;
  389. }
  390. // required int64 size = 1;
  391. public static final int SIZE_FIELD_NUMBER = 1;
  392. private boolean hasSize;
  393. private long size_ = 0L;
  394. public boolean hasSize() { return hasSize; }
  395. public long getSize() { return size_; }
  396. // required int64 dateModified = 2;
  397. public static final int DATEMODIFIED_FIELD_NUMBER = 2;
  398. private boolean hasDateModified;
  399. private long dateModified_ = 0L;
  400. public boolean hasDateModified() { return hasDateModified; }
  401. public long getDateModified() { return dateModified_; }
  402. // required string fileName = 3;
  403. public static final int FILENAME_FIELD_NUMBER = 3;
  404. private boolean hasFileName;
  405. private java.lang.String fileName_ = "";
  406. public boolean hasFileName() { return hasFileName; }
  407. public java.lang.String getFileName() { return fileName_; }
  408. // required int32 version = 4;
  409. public static final int VERSION_FIELD_NUMBER = 4;
  410. private boolean hasVersion;
  411. private int version_ = 0;
  412. public boolean hasVersion() { return hasVersion; }
  413. public int getVersion() { return version_; }
  414. // repeated .AddressPart addressIndex = 8;
  415. public static final int ADDRESSINDEX_FIELD_NUMBER = 8;
  416. private java.util.List<net.osmand.binary.OsmandIndex.AddressPart> addressIndex_ =
  417. java.util.Collections.emptyList();
  418. public java.util.List<net.osmand.binary.OsmandIndex.AddressPart> getAddressIndexList() {
  419. return addressIndex_;
  420. }
  421. public int getAddressIndexCount() { return addressIndex_.size(); }
  422. public net.osmand.binary.OsmandIndex.AddressPart getAddressIndex(int index) {
  423. return addressIndex_.get(index);
  424. }
  425. // repeated .TransportPart transportIndex = 9;
  426. public static final int TRANSPORTINDEX_FIELD_NUMBER = 9;
  427. private java.util.List<net.osmand.binary.OsmandIndex.TransportPart> transportIndex_ =
  428. java.util.Collections.emptyList();
  429. public java.util.List<net.osmand.binary.OsmandIndex.TransportPart> getTransportIndexList() {
  430. return transportIndex_;
  431. }
  432. public int getTransportIndexCount() { return transportIndex_.size(); }
  433. public net.osmand.binary.OsmandIndex.TransportPart getTransportIndex(int index) {
  434. return transportIndex_.get(index);
  435. }
  436. // repeated .PoiPart poiIndex = 10;
  437. public static final int POIINDEX_FIELD_NUMBER = 10;
  438. private java.util.List<net.osmand.binary.OsmandIndex.PoiPart> poiIndex_ =
  439. java.util.Collections.emptyList();
  440. public java.util.List<net.osmand.binary.OsmandIndex.PoiPart> getPoiIndexList() {
  441. return poiIndex_;
  442. }
  443. public int getPoiIndexCount() { return poiIndex_.size(); }
  444. public net.osmand.binary.OsmandIndex.PoiPart getPoiIndex(int index) {
  445. return poiIndex_.get(index);
  446. }
  447. // repeated .MapPart mapIndex = 11;
  448. public static final int MAPINDEX_FIELD_NUMBER = 11;
  449. private java.util.List<net.osmand.binary.OsmandIndex.MapPart> mapIndex_ =
  450. java.util.Collections.emptyList();
  451. public java.util.List<net.osmand.binary.OsmandIndex.MapPart> getMapIndexList() {
  452. return mapIndex_;
  453. }
  454. public int getMapIndexCount() { return mapIndex_.size(); }
  455. public net.osmand.binary.OsmandIndex.MapPart getMapIndex(int index) {
  456. return mapIndex_.get(index);
  457. }
  458. // repeated .RoutingPart routingIndex = 12;
  459. public static final int ROUTINGINDEX_FIELD_NUMBER = 12;
  460. private java.util.List<net.osmand.binary.OsmandIndex.RoutingPart> routingIndex_ =
  461. java.util.Collections.emptyList();
  462. public java.util.List<net.osmand.binary.OsmandIndex.RoutingPart> getRoutingIndexList() {
  463. return routingIndex_;
  464. }
  465. public int getRoutingIndexCount() { return routingIndex_.size(); }
  466. public net.osmand.binary.OsmandIndex.RoutingPart getRoutingIndex(int index) {
  467. return routingIndex_.get(index);
  468. }
  469. private void initFields() {
  470. }
  471. @Override
  472. public final boolean isInitialized() {
  473. if (!hasSize) return false;
  474. if (!hasDateModified) return false;
  475. if (!hasFileName) return false;
  476. if (!hasVersion) return false;
  477. for (net.osmand.binary.OsmandIndex.AddressPart element : getAddressIndexList()) {
  478. if (!element.isInitialized()) return false;
  479. }
  480. for (net.osmand.binary.OsmandIndex.TransportPart element : getTransportIndexList()) {
  481. if (!element.isInitialized()) return false;
  482. }
  483. for (net.osmand.binary.OsmandIndex.PoiPart element : getPoiIndexList()) {
  484. if (!element.isInitialized()) return false;
  485. }
  486. for (net.osmand.binary.OsmandIndex.MapPart element : getMapIndexList()) {
  487. if (!element.isInitialized()) return false;
  488. }
  489. for (net.osmand.binary.OsmandIndex.RoutingPart element : getRoutingIndexList()) {
  490. if (!element.isInitialized()) return false;
  491. }
  492. return true;
  493. }
  494. @Override
  495. public void writeTo(com.google.protobuf.CodedOutputStream output)
  496. throws java.io.IOException {
  497. getSerializedSize();
  498. if (hasSize()) {
  499. output.writeInt64(1, getSize());
  500. }
  501. if (hasDateModified()) {
  502. output.writeInt64(2, getDateModified());
  503. }
  504. if (hasFileName()) {
  505. output.writeString(3, getFileName());
  506. }
  507. if (hasVersion()) {
  508. output.writeInt32(4, getVersion());
  509. }
  510. for (net.osmand.binary.OsmandIndex.AddressPart element : getAddressIndexList()) {
  511. output.writeMessage(8, element);
  512. }
  513. for (net.osmand.binary.OsmandIndex.TransportPart element : getTransportIndexList()) {
  514. output.writeMessage(9, element);
  515. }
  516. for (net.osmand.binary.OsmandIndex.PoiPart element : getPoiIndexList()) {
  517. output.writeMessage(10, element);
  518. }
  519. for (net.osmand.binary.OsmandIndex.MapPart element : getMapIndexList()) {
  520. output.writeMessage(11, element);
  521. }
  522. for (net.osmand.binary.OsmandIndex.RoutingPart element : getRoutingIndexList()) {
  523. output.writeMessage(12, element);
  524. }
  525. }
  526. private int memoizedSerializedSize = -1;
  527. @Override
  528. public int getSerializedSize() {
  529. int size = memoizedSerializedSize;
  530. if (size != -1) return size;
  531. size = 0;
  532. if (hasSize()) {
  533. size += com.google.protobuf.CodedOutputStream
  534. .computeInt64Size(1, getSize());
  535. }
  536. if (hasDateModified()) {
  537. size += com.google.protobuf.CodedOutputStream
  538. .computeInt64Size(2, getDateModified());
  539. }
  540. if (hasFileName()) {
  541. size += com.google.protobuf.CodedOutputStream
  542. .computeStringSize(3, getFileName());
  543. }
  544. if (hasVersion()) {
  545. size += com.google.protobuf.CodedOutputStream
  546. .computeInt32Size(4, getVersion());
  547. }
  548. for (net.osmand.binary.OsmandIndex.AddressPart element : getAddressIndexList()) {
  549. size += com.google.protobuf.CodedOutputStream
  550. .computeMessageSize(8, element);
  551. }
  552. for (net.osmand.binary.OsmandIndex.TransportPart element : getTransportIndexList()) {
  553. size += com.google.protobuf.CodedOutputStream
  554. .computeMessageSize(9, element);
  555. }
  556. for (net.osmand.binary.OsmandIndex.PoiPart element : getPoiIndexList()) {
  557. size += com.google.protobuf.CodedOutputStream
  558. .computeMessageSize(10, element);
  559. }
  560. for (net.osmand.binary.OsmandIndex.MapPart element : getMapIndexList()) {
  561. size += com.google.protobuf.CodedOutputStream
  562. .computeMessageSize(11, element);
  563. }
  564. for (net.osmand.binary.OsmandIndex.RoutingPart element : getRoutingIndexList()) {
  565. size += com.google.protobuf.CodedOutputStream
  566. .computeMessageSize(12, element);
  567. }
  568. memoizedSerializedSize = size;
  569. return size;
  570. }
  571. public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
  572. com.google.protobuf.ByteString data)
  573. throws com.google.protobuf.InvalidProtocolBufferException {
  574. return newBuilder().mergeFrom(data).buildParsed();
  575. }
  576. public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
  577. com.google.protobuf.ByteString data,
  578. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  579. throws com.google.protobuf.InvalidProtocolBufferException {
  580. return newBuilder().mergeFrom(data, extensionRegistry)
  581. .buildParsed();
  582. }
  583. public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(byte[] data)
  584. throws com.google.protobuf.InvalidProtocolBufferException {
  585. return newBuilder().mergeFrom(data).buildParsed();
  586. }
  587. public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
  588. byte[] data,
  589. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  590. throws com.google.protobuf.InvalidProtocolBufferException {
  591. return newBuilder().mergeFrom(data, extensionRegistry)
  592. .buildParsed();
  593. }
  594. public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(java.io.InputStream input)
  595. throws java.io.IOException {
  596. return newBuilder().mergeFrom(input).buildParsed();
  597. }
  598. public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
  599. java.io.InputStream input,
  600. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  601. throws java.io.IOException {
  602. return newBuilder().mergeFrom(input, extensionRegistry)
  603. .buildParsed();
  604. }
  605. public static net.osmand.binary.OsmandIndex.FileIndex parseDelimitedFrom(java.io.InputStream input)
  606. throws java.io.IOException {
  607. Builder builder = newBuilder();
  608. if (builder.mergeDelimitedFrom(input)) {
  609. return builder.buildParsed();
  610. } else {
  611. return null;
  612. }
  613. }
  614. public static net.osmand.binary.OsmandIndex.FileIndex parseDelimitedFrom(
  615. java.io.InputStream input,
  616. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  617. throws java.io.IOException {
  618. Builder builder = newBuilder();
  619. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  620. return builder.buildParsed();
  621. } else {
  622. return null;
  623. }
  624. }
  625. public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
  626. com.google.protobuf.CodedInputStream input)
  627. throws java.io.IOException {
  628. return newBuilder().mergeFrom(input).buildParsed();
  629. }
  630. public static net.osmand.binary.OsmandIndex.FileIndex parseFrom(
  631. com.google.protobuf.CodedInputStream input,
  632. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  633. throws java.io.IOException {
  634. return newBuilder().mergeFrom(input, extensionRegistry)
  635. .buildParsed();
  636. }
  637. public static Builder newBuilder() { return Builder.create(); }
  638. @Override
  639. public Builder newBuilderForType() { return newBuilder(); }
  640. public static Builder newBuilder(net.osmand.binary.OsmandIndex.FileIndex prototype) {
  641. return newBuilder().mergeFrom(prototype);
  642. }
  643. @Override
  644. public Builder toBuilder() { return newBuilder(this); }
  645. public static final class Builder extends
  646. com.google.protobuf.GeneratedMessageLite.Builder<
  647. net.osmand.binary.OsmandIndex.FileIndex, Builder> {
  648. private net.osmand.binary.OsmandIndex.FileIndex result;
  649. // Construct using net.osmand.binary.OsmandIndex.FileIndex.newBuilder()
  650. private Builder() {}
  651. private static Builder create() {
  652. Builder builder = new Builder();
  653. builder.result = new net.osmand.binary.OsmandIndex.FileIndex();
  654. return builder;
  655. }
  656. @Override
  657. protected net.osmand.binary.OsmandIndex.FileIndex internalGetResult() {
  658. return result;
  659. }
  660. @Override
  661. public Builder clear() {
  662. if (result == null) {
  663. throw new IllegalStateException(
  664. "Cannot call clear() after build().");
  665. }
  666. result = new net.osmand.binary.OsmandIndex.FileIndex();
  667. return this;
  668. }
  669. @Override
  670. public Builder clone() {
  671. return create().mergeFrom(result);
  672. }
  673. @Override
  674. public net.osmand.binary.OsmandIndex.FileIndex getDefaultInstanceForType() {
  675. return net.osmand.binary.OsmandIndex.FileIndex.getDefaultInstance();
  676. }
  677. @Override
  678. public boolean isInitialized() {
  679. return result.isInitialized();
  680. }
  681. @Override
  682. public net.osmand.binary.OsmandIndex.FileIndex build() {
  683. if (result != null && !isInitialized()) {
  684. throw newUninitializedMessageException(result);
  685. }
  686. return buildPartial();
  687. }
  688. private net.osmand.binary.OsmandIndex.FileIndex buildParsed()
  689. throws com.google.protobuf.InvalidProtocolBufferException {
  690. if (!isInitialized()) {
  691. throw newUninitializedMessageException(
  692. result).asInvalidProtocolBufferException();
  693. }
  694. return buildPartial();
  695. }
  696. @Override
  697. public net.osmand.binary.OsmandIndex.FileIndex buildPartial() {
  698. if (result == null) {
  699. throw new IllegalStateException(
  700. "build() has already been called on this Builder.");
  701. }
  702. if (result.addressIndex_ != java.util.Collections.EMPTY_LIST) {
  703. result.addressIndex_ =
  704. java.util.Collections.unmodifiableList(result.addressIndex_);
  705. }
  706. if (result.transportIndex_ != java.util.Collections.EMPTY_LIST) {
  707. result.transportIndex_ =
  708. java.util.Collections.unmodifiableList(result.transportIndex_);
  709. }
  710. if (result.poiIndex_ != java.util.Collections.EMPTY_LIST) {
  711. result.poiIndex_ =
  712. java.util.Collections.unmodifiableList(result.poiIndex_);
  713. }
  714. if (result.mapIndex_ != java.util.Collections.EMPTY_LIST) {
  715. result.mapIndex_ =
  716. java.util.Collections.unmodifiableList(result.mapIndex_);
  717. }
  718. if (result.routingIndex_ != java.util.Collections.EMPTY_LIST) {
  719. result.routingIndex_ =
  720. java.util.Collections.unmodifiableList(result.routingIndex_);
  721. }
  722. net.osmand.binary.OsmandIndex.FileIndex returnMe = result;
  723. result = null;
  724. return returnMe;
  725. }
  726. @Override
  727. public Builder mergeFrom(net.osmand.binary.OsmandIndex.FileIndex other) {
  728. if (other == net.osmand.binary.OsmandIndex.FileIndex.getDefaultInstance()) return this;
  729. if (other.hasSize()) {
  730. setSize(other.getSize());
  731. }
  732. if (other.hasDateModified()) {
  733. setDateModified(other.getDateModified());
  734. }
  735. if (other.hasFileName()) {
  736. setFileName(other.getFileName());
  737. }
  738. if (other.hasVersion()) {
  739. setVersion(other.getVersion());
  740. }
  741. if (!other.addressIndex_.isEmpty()) {
  742. if (result.addressIndex_.isEmpty()) {
  743. result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.AddressPart>();
  744. }
  745. result.addressIndex_.addAll(other.addressIndex_);
  746. }
  747. if (!other.transportIndex_.isEmpty()) {
  748. if (result.transportIndex_.isEmpty()) {
  749. result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.TransportPart>();
  750. }
  751. result.transportIndex_.addAll(other.transportIndex_);
  752. }
  753. if (!other.poiIndex_.isEmpty()) {
  754. if (result.poiIndex_.isEmpty()) {
  755. result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.PoiPart>();
  756. }
  757. result.poiIndex_.addAll(other.poiIndex_);
  758. }
  759. if (!other.mapIndex_.isEmpty()) {
  760. if (result.mapIndex_.isEmpty()) {
  761. result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapPart>();
  762. }
  763. result.mapIndex_.addAll(other.mapIndex_);
  764. }
  765. if (!other.routingIndex_.isEmpty()) {
  766. if (result.routingIndex_.isEmpty()) {
  767. result.routingIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingPart>();
  768. }
  769. result.routingIndex_.addAll(other.routingIndex_);
  770. }
  771. return this;
  772. }
  773. @Override
  774. public Builder mergeFrom(
  775. com.google.protobuf.CodedInputStream input,
  776. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  777. throws java.io.IOException {
  778. while (true) {
  779. int tag = input.readTag();
  780. switch (tag) {
  781. case 0:
  782. return this;
  783. default: {
  784. if (!parseUnknownField(input, extensionRegistry, tag)) {
  785. return this;
  786. }
  787. break;
  788. }
  789. case 8: {
  790. setSize(input.readInt64());
  791. break;
  792. }
  793. case 16: {
  794. setDateModified(input.readInt64());
  795. break;
  796. }
  797. case 26: {
  798. setFileName(input.readString());
  799. break;
  800. }
  801. case 32: {
  802. setVersion(input.readInt32());
  803. break;
  804. }
  805. case 66: {
  806. net.osmand.binary.OsmandIndex.AddressPart.Builder subBuilder = net.osmand.binary.OsmandIndex.AddressPart.newBuilder();
  807. input.readMessage(subBuilder, extensionRegistry);
  808. addAddressIndex(subBuilder.buildPartial());
  809. break;
  810. }
  811. case 74: {
  812. net.osmand.binary.OsmandIndex.TransportPart.Builder subBuilder = net.osmand.binary.OsmandIndex.TransportPart.newBuilder();
  813. input.readMessage(subBuilder, extensionRegistry);
  814. addTransportIndex(subBuilder.buildPartial());
  815. break;
  816. }
  817. case 82: {
  818. net.osmand.binary.OsmandIndex.PoiPart.Builder subBuilder = net.osmand.binary.OsmandIndex.PoiPart.newBuilder();
  819. input.readMessage(subBuilder, extensionRegistry);
  820. addPoiIndex(subBuilder.buildPartial());
  821. break;
  822. }
  823. case 90: {
  824. net.osmand.binary.OsmandIndex.MapPart.Builder subBuilder = net.osmand.binary.OsmandIndex.MapPart.newBuilder();
  825. input.readMessage(subBuilder, extensionRegistry);
  826. addMapIndex(subBuilder.buildPartial());
  827. break;
  828. }
  829. case 98: {
  830. net.osmand.binary.OsmandIndex.RoutingPart.Builder subBuilder = net.osmand.binary.OsmandIndex.RoutingPart.newBuilder();
  831. input.readMessage(subBuilder, extensionRegistry);
  832. addRoutingIndex(subBuilder.buildPartial());
  833. break;
  834. }
  835. }
  836. }
  837. }
  838. // required int64 size = 1;
  839. public boolean hasSize() {
  840. return result.hasSize();
  841. }
  842. public long getSize() {
  843. return result.getSize();
  844. }
  845. public Builder setSize(long value) {
  846. result.hasSize = true;
  847. result.size_ = value;
  848. return this;
  849. }
  850. public Builder clearSize() {
  851. result.hasSize = false;
  852. result.size_ = 0L;
  853. return this;
  854. }
  855. // required int64 dateModified = 2;
  856. public boolean hasDateModified() {
  857. return result.hasDateModified();
  858. }
  859. public long getDateModified() {
  860. return result.getDateModified();
  861. }
  862. public Builder setDateModified(long value) {
  863. result.hasDateModified = true;
  864. result.dateModified_ = value;
  865. return this;
  866. }
  867. public Builder clearDateModified() {
  868. result.hasDateModified = false;
  869. result.dateModified_ = 0L;
  870. return this;
  871. }
  872. // required string fileName = 3;
  873. public boolean hasFileName() {
  874. return result.hasFileName();
  875. }
  876. public java.lang.String getFileName() {
  877. return result.getFileName();
  878. }
  879. public Builder setFileName(java.lang.String value) {
  880. if (value == null) {
  881. throw new NullPointerException();
  882. }
  883. result.hasFileName = true;
  884. result.fileName_ = value;
  885. return this;
  886. }
  887. public Builder clearFileName() {
  888. result.hasFileName = false;
  889. result.fileName_ = getDefaultInstance().getFileName();
  890. return this;
  891. }
  892. // required int32 version = 4;
  893. public boolean hasVersion() {
  894. return result.hasVersion();
  895. }
  896. public int getVersion() {
  897. return result.getVersion();
  898. }
  899. public Builder setVersion(int value) {
  900. result.hasVersion = true;
  901. result.version_ = value;
  902. return this;
  903. }
  904. public Builder clearVersion() {
  905. result.hasVersion = false;
  906. result.version_ = 0;
  907. return this;
  908. }
  909. // repeated .AddressPart addressIndex = 8;
  910. public java.util.List<net.osmand.binary.OsmandIndex.AddressPart> getAddressIndexList() {
  911. return java.util.Collections.unmodifiableList(result.addressIndex_);
  912. }
  913. public int getAddressIndexCount() {
  914. return result.getAddressIndexCount();
  915. }
  916. public net.osmand.binary.OsmandIndex.AddressPart getAddressIndex(int index) {
  917. return result.getAddressIndex(index);
  918. }
  919. public Builder setAddressIndex(int index, net.osmand.binary.OsmandIndex.AddressPart value) {
  920. if (value == null) {
  921. throw new NullPointerException();
  922. }
  923. result.addressIndex_.set(index, value);
  924. return this;
  925. }
  926. public Builder setAddressIndex(int index, net.osmand.binary.OsmandIndex.AddressPart.Builder builderForValue) {
  927. result.addressIndex_.set(index, builderForValue.build());
  928. return this;
  929. }
  930. public Builder addAddressIndex(net.osmand.binary.OsmandIndex.AddressPart value) {
  931. if (value == null) {
  932. throw new NullPointerException();
  933. }
  934. if (result.addressIndex_.isEmpty()) {
  935. result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.AddressPart>();
  936. }
  937. result.addressIndex_.add(value);
  938. return this;
  939. }
  940. public Builder addAddressIndex(net.osmand.binary.OsmandIndex.AddressPart.Builder builderForValue) {
  941. if (result.addressIndex_.isEmpty()) {
  942. result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.AddressPart>();
  943. }
  944. result.addressIndex_.add(builderForValue.build());
  945. return this;
  946. }
  947. public Builder addAllAddressIndex(
  948. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.AddressPart> values) {
  949. if (result.addressIndex_.isEmpty()) {
  950. result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.AddressPart>();
  951. }
  952. super.addAll(values, result.addressIndex_);
  953. return this;
  954. }
  955. public Builder clearAddressIndex() {
  956. result.addressIndex_ = java.util.Collections.emptyList();
  957. return this;
  958. }
  959. // repeated .TransportPart transportIndex = 9;
  960. public java.util.List<net.osmand.binary.OsmandIndex.TransportPart> getTransportIndexList() {
  961. return java.util.Collections.unmodifiableList(result.transportIndex_);
  962. }
  963. public int getTransportIndexCount() {
  964. return result.getTransportIndexCount();
  965. }
  966. public net.osmand.binary.OsmandIndex.TransportPart getTransportIndex(int index) {
  967. return result.getTransportIndex(index);
  968. }
  969. public Builder setTransportIndex(int index, net.osmand.binary.OsmandIndex.TransportPart value) {
  970. if (value == null) {
  971. throw new NullPointerException();
  972. }
  973. result.transportIndex_.set(index, value);
  974. return this;
  975. }
  976. public Builder setTransportIndex(int index, net.osmand.binary.OsmandIndex.TransportPart.Builder builderForValue) {
  977. result.transportIndex_.set(index, builderForValue.build());
  978. return this;
  979. }
  980. public Builder addTransportIndex(net.osmand.binary.OsmandIndex.TransportPart value) {
  981. if (value == null) {
  982. throw new NullPointerException();
  983. }
  984. if (result.transportIndex_.isEmpty()) {
  985. result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.TransportPart>();
  986. }
  987. result.transportIndex_.add(value);
  988. return this;
  989. }
  990. public Builder addTransportIndex(net.osmand.binary.OsmandIndex.TransportPart.Builder builderForValue) {
  991. if (result.transportIndex_.isEmpty()) {
  992. result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.TransportPart>();
  993. }
  994. result.transportIndex_.add(builderForValue.build());
  995. return this;
  996. }
  997. public Builder addAllTransportIndex(
  998. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.TransportPart> values) {
  999. if (result.transportIndex_.isEmpty()) {
  1000. result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.TransportPart>();
  1001. }
  1002. super.addAll(values, result.transportIndex_);
  1003. return this;
  1004. }
  1005. public Builder clearTransportIndex() {
  1006. result.transportIndex_ = java.util.Collections.emptyList();
  1007. return this;
  1008. }
  1009. // repeated .PoiPart poiIndex = 10;
  1010. public java.util.List<net.osmand.binary.OsmandIndex.PoiPart> getPoiIndexList() {
  1011. return java.util.Collections.unmodifiableList(result.poiIndex_);
  1012. }
  1013. public int getPoiIndexCount() {
  1014. return result.getPoiIndexCount();
  1015. }
  1016. public net.osmand.binary.OsmandIndex.PoiPart getPoiIndex(int index) {
  1017. return result.getPoiIndex(index);
  1018. }
  1019. public Builder setPoiIndex(int index, net.osmand.binary.OsmandIndex.PoiPart value) {
  1020. if (value == null) {
  1021. throw new NullPointerException();
  1022. }
  1023. result.poiIndex_.set(index, value);
  1024. return this;
  1025. }
  1026. public Builder setPoiIndex(int index, net.osmand.binary.OsmandIndex.PoiPart.Builder builderForValue) {
  1027. result.poiIndex_.set(index, builderForValue.build());
  1028. return this;
  1029. }
  1030. public Builder addPoiIndex(net.osmand.binary.OsmandIndex.PoiPart value) {
  1031. if (value == null) {
  1032. throw new NullPointerException();
  1033. }
  1034. if (result.poiIndex_.isEmpty()) {
  1035. result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.PoiPart>();
  1036. }
  1037. result.poiIndex_.add(value);
  1038. return this;
  1039. }
  1040. public Builder addPoiIndex(net.osmand.binary.OsmandIndex.PoiPart.Builder builderForValue) {
  1041. if (result.poiIndex_.isEmpty()) {
  1042. result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.PoiPart>();
  1043. }
  1044. result.poiIndex_.add(builderForValue.build());
  1045. return this;
  1046. }
  1047. public Builder addAllPoiIndex(
  1048. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.PoiPart> values) {
  1049. if (result.poiIndex_.isEmpty()) {
  1050. result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.PoiPart>();
  1051. }
  1052. super.addAll(values, result.poiIndex_);
  1053. return this;
  1054. }
  1055. public Builder clearPoiIndex() {
  1056. result.poiIndex_ = java.util.Collections.emptyList();
  1057. return this;
  1058. }
  1059. // repeated .MapPart mapIndex = 11;
  1060. public java.util.List<net.osmand.binary.OsmandIndex.MapPart> getMapIndexList() {
  1061. return java.util.Collections.unmodifiableList(result.mapIndex_);
  1062. }
  1063. public int getMapIndexCount() {
  1064. return result.getMapIndexCount();
  1065. }
  1066. public net.osmand.binary.OsmandIndex.MapPart getMapIndex(int index) {
  1067. return result.getMapIndex(index);
  1068. }
  1069. public Builder setMapIndex(int index, net.osmand.binary.OsmandIndex.MapPart value) {
  1070. if (value == null) {
  1071. throw new NullPointerException();
  1072. }
  1073. result.mapIndex_.set(index, value);
  1074. return this;
  1075. }
  1076. public Builder setMapIndex(int index, net.osmand.binary.OsmandIndex.MapPart.Builder builderForValue) {
  1077. result.mapIndex_.set(index, builderForValue.build());
  1078. return this;
  1079. }
  1080. public Builder addMapIndex(net.osmand.binary.OsmandIndex.MapPart value) {
  1081. if (value == null) {
  1082. throw new NullPointerException();
  1083. }
  1084. if (result.mapIndex_.isEmpty()) {
  1085. result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapPart>();
  1086. }
  1087. result.mapIndex_.add(value);
  1088. return this;
  1089. }
  1090. public Builder addMapIndex(net.osmand.binary.OsmandIndex.MapPart.Builder builderForValue) {
  1091. if (result.mapIndex_.isEmpty()) {
  1092. result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapPart>();
  1093. }
  1094. result.mapIndex_.add(builderForValue.build());
  1095. return this;
  1096. }
  1097. public Builder addAllMapIndex(
  1098. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.MapPart> values) {
  1099. if (result.mapIndex_.isEmpty()) {
  1100. result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapPart>();
  1101. }
  1102. super.addAll(values, result.mapIndex_);
  1103. return this;
  1104. }
  1105. public Builder clearMapIndex() {
  1106. result.mapIndex_ = java.util.Collections.emptyList();
  1107. return this;
  1108. }
  1109. // repeated .RoutingPart routingIndex = 12;
  1110. public java.util.List<net.osmand.binary.OsmandIndex.RoutingPart> getRoutingIndexList() {
  1111. return java.util.Collections.unmodifiableList(result.routingIndex_);
  1112. }
  1113. public int getRoutingIndexCount() {
  1114. return result.getRoutingIndexCount();
  1115. }
  1116. public net.osmand.binary.OsmandIndex.RoutingPart getRoutingIndex(int index) {
  1117. return result.getRoutingIndex(index);
  1118. }
  1119. public Builder setRoutingIndex(int index, net.osmand.binary.OsmandIndex.RoutingPart value) {
  1120. if (value == null) {
  1121. throw new NullPointerException();
  1122. }
  1123. result.routingIndex_.set(index, value);
  1124. return this;
  1125. }
  1126. public Builder setRoutingIndex(int index, net.osmand.binary.OsmandIndex.RoutingPart.Builder builderForValue) {
  1127. result.routingIndex_.set(index, builderForValue.build());
  1128. return this;
  1129. }
  1130. public Builder addRoutingIndex(net.osmand.binary.OsmandIndex.RoutingPart value) {
  1131. if (value == null) {
  1132. throw new NullPointerException();
  1133. }
  1134. if (result.routingIndex_.isEmpty()) {
  1135. result.routingIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingPart>();
  1136. }
  1137. result.routingIndex_.add(value);
  1138. return this;
  1139. }
  1140. public Builder addRoutingIndex(net.osmand.binary.OsmandIndex.RoutingPart.Builder builderForValue) {
  1141. if (result.routingIndex_.isEmpty()) {
  1142. result.routingIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingPart>();
  1143. }
  1144. result.routingIndex_.add(builderForValue.build());
  1145. return this;
  1146. }
  1147. public Builder addAllRoutingIndex(
  1148. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.RoutingPart> values) {
  1149. if (result.routingIndex_.isEmpty()) {
  1150. result.routingIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingPart>();
  1151. }
  1152. super.addAll(values, result.routingIndex_);
  1153. return this;
  1154. }
  1155. public Builder clearRoutingIndex() {
  1156. result.routingIndex_ = java.util.Collections.emptyList();
  1157. return this;
  1158. }
  1159. // @@protoc_insertion_point(builder_scope:FileIndex)
  1160. }
  1161. static {
  1162. defaultInstance = new FileIndex(true);
  1163. net.osmand.binary.OsmandIndex.internalForceInit();
  1164. defaultInstance.initFields();
  1165. }
  1166. // @@protoc_insertion_point(class_scope:FileIndex)
  1167. }
  1168. public static final class AddressPart extends
  1169. com.google.protobuf.GeneratedMessageLite {
  1170. // Use AddressPart.newBuilder() to construct.
  1171. private AddressPart() {
  1172. initFields();
  1173. }
  1174. private AddressPart(boolean noInit) {}
  1175. private static final AddressPart defaultInstance;
  1176. public static AddressPart getDefaultInstance() {
  1177. return defaultInstance;
  1178. }
  1179. @Override
  1180. public AddressPart getDefaultInstanceForType() {
  1181. return defaultInstance;
  1182. }
  1183. // required int64 size = 1;
  1184. public static final int SIZE_FIELD_NUMBER = 1;
  1185. private boolean hasSize;
  1186. private long size_ = 0L;
  1187. public boolean hasSize() { return hasSize; }
  1188. public long getSize() { return size_; }
  1189. // required int64 offset = 2;
  1190. public static final int OFFSET_FIELD_NUMBER = 2;
  1191. private boolean hasOffset;
  1192. private long offset_ = 0L;
  1193. public boolean hasOffset() { return hasOffset; }
  1194. public long getOffset() { return offset_; }
  1195. // optional string name = 3;
  1196. public static final int NAME_FIELD_NUMBER = 3;
  1197. private boolean hasName;
  1198. private java.lang.String name_ = "";
  1199. public boolean hasName() { return hasName; }
  1200. public java.lang.String getName() { return name_; }
  1201. // optional string nameEn = 4;
  1202. public static final int NAMEEN_FIELD_NUMBER = 4;
  1203. private boolean hasNameEn;
  1204. private java.lang.String nameEn_ = "";
  1205. public boolean hasNameEn() { return hasNameEn; }
  1206. public java.lang.String getNameEn() { return nameEn_; }
  1207. // optional int32 indexNameOffset = 5;
  1208. public static final int INDEXNAMEOFFSET_FIELD_NUMBER = 5;
  1209. private boolean hasIndexNameOffset;
  1210. private int indexNameOffset_ = 0;
  1211. public boolean hasIndexNameOffset() { return hasIndexNameOffset; }
  1212. public int getIndexNameOffset() { return indexNameOffset_; }
  1213. // repeated .CityBlock cities = 8;
  1214. public static final int CITIES_FIELD_NUMBER = 8;
  1215. private java.util.List<net.osmand.binary.OsmandIndex.CityBlock> cities_ =
  1216. java.util.Collections.emptyList();
  1217. public java.util.List<net.osmand.binary.OsmandIndex.CityBlock> getCitiesList() {
  1218. return cities_;
  1219. }
  1220. public int getCitiesCount() { return cities_.size(); }
  1221. public net.osmand.binary.OsmandIndex.CityBlock getCities(int index) {
  1222. return cities_.get(index);
  1223. }
  1224. private void initFields() {
  1225. }
  1226. @Override
  1227. public final boolean isInitialized() {
  1228. if (!hasSize) return false;
  1229. if (!hasOffset) return false;
  1230. for (net.osmand.binary.OsmandIndex.CityBlock element : getCitiesList()) {
  1231. if (!element.isInitialized()) return false;
  1232. }
  1233. return true;
  1234. }
  1235. @Override
  1236. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1237. throws java.io.IOException {
  1238. getSerializedSize();
  1239. if (hasSize()) {
  1240. output.writeInt64(1, getSize());
  1241. }
  1242. if (hasOffset()) {
  1243. output.writeInt64(2, getOffset());
  1244. }
  1245. if (hasName()) {
  1246. output.writeString(3, getName());
  1247. }
  1248. if (hasNameEn()) {
  1249. output.writeString(4, getNameEn());
  1250. }
  1251. if (hasIndexNameOffset()) {
  1252. output.writeInt32(5, getIndexNameOffset());
  1253. }
  1254. for (net.osmand.binary.OsmandIndex.CityBlock element : getCitiesList()) {
  1255. output.writeMessage(8, element);
  1256. }
  1257. }
  1258. private int memoizedSerializedSize = -1;
  1259. @Override
  1260. public int getSerializedSize() {
  1261. int size = memoizedSerializedSize;
  1262. if (size != -1) return size;
  1263. size = 0;
  1264. if (hasSize()) {
  1265. size += com.google.protobuf.CodedOutputStream
  1266. .computeInt64Size(1, getSize());
  1267. }
  1268. if (hasOffset()) {
  1269. size += com.google.protobuf.CodedOutputStream
  1270. .computeInt64Size(2, getOffset());
  1271. }
  1272. if (hasName()) {
  1273. size += com.google.protobuf.CodedOutputStream
  1274. .computeStringSize(3, getName());
  1275. }
  1276. if (hasNameEn()) {
  1277. size += com.google.protobuf.CodedOutputStream
  1278. .computeStringSize(4, getNameEn());
  1279. }
  1280. if (hasIndexNameOffset()) {
  1281. size += com.google.protobuf.CodedOutputStream
  1282. .computeInt32Size(5, getIndexNameOffset());
  1283. }
  1284. for (net.osmand.binary.OsmandIndex.CityBlock element : getCitiesList()) {
  1285. size += com.google.protobuf.CodedOutputStream
  1286. .computeMessageSize(8, element);
  1287. }
  1288. memoizedSerializedSize = size;
  1289. return size;
  1290. }
  1291. public static net.osmand.binary.OsmandIndex.AddressPart parseFrom(
  1292. com.google.protobuf.ByteString data)
  1293. throws com.google.protobuf.InvalidProtocolBufferException {
  1294. return newBuilder().mergeFrom(data).buildParsed();
  1295. }
  1296. public static net.osmand.binary.OsmandIndex.AddressPart parseFrom(
  1297. com.google.protobuf.ByteString data,
  1298. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1299. throws com.google.protobuf.InvalidProtocolBufferException {
  1300. return newBuilder().mergeFrom(data, extensionRegistry)
  1301. .buildParsed();
  1302. }
  1303. public static net.osmand.binary.OsmandIndex.AddressPart parseFrom(byte[] data)
  1304. throws com.google.protobuf.InvalidProtocolBufferException {
  1305. return newBuilder().mergeFrom(data).buildParsed();
  1306. }
  1307. public static net.osmand.binary.OsmandIndex.AddressPart parseFrom(
  1308. byte[] data,
  1309. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1310. throws com.google.protobuf.InvalidProtocolBufferException {
  1311. return newBuilder().mergeFrom(data, extensionRegistry)
  1312. .buildParsed();
  1313. }
  1314. public static net.osmand.binary.OsmandIndex.AddressPart parseFrom(java.io.InputStream input)
  1315. throws java.io.IOException {
  1316. return newBuilder().mergeFrom(input).buildParsed();
  1317. }
  1318. public static net.osmand.binary.OsmandIndex.AddressPart parseFrom(
  1319. java.io.InputStream input,
  1320. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1321. throws java.io.IOException {
  1322. return newBuilder().mergeFrom(input, extensionRegistry)
  1323. .buildParsed();
  1324. }
  1325. public static net.osmand.binary.OsmandIndex.AddressPart parseDelimitedFrom(java.io.InputStream input)
  1326. throws java.io.IOException {
  1327. Builder builder = newBuilder();
  1328. if (builder.mergeDelimitedFrom(input)) {
  1329. return builder.buildParsed();
  1330. } else {
  1331. return null;
  1332. }
  1333. }
  1334. public static net.osmand.binary.OsmandIndex.AddressPart parseDelimitedFrom(
  1335. java.io.InputStream input,
  1336. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1337. throws java.io.IOException {
  1338. Builder builder = newBuilder();
  1339. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1340. return builder.buildParsed();
  1341. } else {
  1342. return null;
  1343. }
  1344. }
  1345. public static net.osmand.binary.OsmandIndex.AddressPart parseFrom(
  1346. com.google.protobuf.CodedInputStream input)
  1347. throws java.io.IOException {
  1348. return newBuilder().mergeFrom(input).buildParsed();
  1349. }
  1350. public static net.osmand.binary.OsmandIndex.AddressPart parseFrom(
  1351. com.google.protobuf.CodedInputStream input,
  1352. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1353. throws java.io.IOException {
  1354. return newBuilder().mergeFrom(input, extensionRegistry)
  1355. .buildParsed();
  1356. }
  1357. public static Builder newBuilder() { return Builder.create(); }
  1358. @Override
  1359. public Builder newBuilderForType() { return newBuilder(); }
  1360. public static Builder newBuilder(net.osmand.binary.OsmandIndex.AddressPart prototype) {
  1361. return newBuilder().mergeFrom(prototype);
  1362. }
  1363. @Override
  1364. public Builder toBuilder() { return newBuilder(this); }
  1365. public static final class Builder extends
  1366. com.google.protobuf.GeneratedMessageLite.Builder<
  1367. net.osmand.binary.OsmandIndex.AddressPart, Builder> {
  1368. private net.osmand.binary.OsmandIndex.AddressPart result;
  1369. // Construct using net.osmand.binary.OsmandIndex.AddressPart.newBuilder()
  1370. private Builder() {}
  1371. private static Builder create() {
  1372. Builder builder = new Builder();
  1373. builder.result = new net.osmand.binary.OsmandIndex.AddressPart();
  1374. return builder;
  1375. }
  1376. @Override
  1377. protected net.osmand.binary.OsmandIndex.AddressPart internalGetResult() {
  1378. return result;
  1379. }
  1380. @Override
  1381. public Builder clear() {
  1382. if (result == null) {
  1383. throw new IllegalStateException(
  1384. "Cannot call clear() after build().");
  1385. }
  1386. result = new net.osmand.binary.OsmandIndex.AddressPart();
  1387. return this;
  1388. }
  1389. @Override
  1390. public Builder clone() {
  1391. return create().mergeFrom(result);
  1392. }
  1393. @Override
  1394. public net.osmand.binary.OsmandIndex.AddressPart getDefaultInstanceForType() {
  1395. return net.osmand.binary.OsmandIndex.AddressPart.getDefaultInstance();
  1396. }
  1397. @Override
  1398. public boolean isInitialized() {
  1399. return result.isInitialized();
  1400. }
  1401. @Override
  1402. public net.osmand.binary.OsmandIndex.AddressPart build() {
  1403. if (result != null && !isInitialized()) {
  1404. throw newUninitializedMessageException(result);
  1405. }
  1406. return buildPartial();
  1407. }
  1408. private net.osmand.binary.OsmandIndex.AddressPart buildParsed()
  1409. throws com.google.protobuf.InvalidProtocolBufferException {
  1410. if (!isInitialized()) {
  1411. throw newUninitializedMessageException(
  1412. result).asInvalidProtocolBufferException();
  1413. }
  1414. return buildPartial();
  1415. }
  1416. @Override
  1417. public net.osmand.binary.OsmandIndex.AddressPart buildPartial() {
  1418. if (result == null) {
  1419. throw new IllegalStateException(
  1420. "build() has already been called on this Builder.");
  1421. }
  1422. if (result.cities_ != java.util.Collections.EMPTY_LIST) {
  1423. result.cities_ =
  1424. java.util.Collections.unmodifiableList(result.cities_);
  1425. }
  1426. net.osmand.binary.OsmandIndex.AddressPart returnMe = result;
  1427. result = null;
  1428. return returnMe;
  1429. }
  1430. @Override
  1431. public Builder mergeFrom(net.osmand.binary.OsmandIndex.AddressPart other) {
  1432. if (other == net.osmand.binary.OsmandIndex.AddressPart.getDefaultInstance()) return this;
  1433. if (other.hasSize()) {
  1434. setSize(other.getSize());
  1435. }
  1436. if (other.hasOffset()) {
  1437. setOffset(other.getOffset());
  1438. }
  1439. if (other.hasName()) {
  1440. setName(other.getName());
  1441. }
  1442. if (other.hasNameEn()) {
  1443. setNameEn(other.getNameEn());
  1444. }
  1445. if (other.hasIndexNameOffset()) {
  1446. setIndexNameOffset(other.getIndexNameOffset());
  1447. }
  1448. if (!other.cities_.isEmpty()) {
  1449. if (result.cities_.isEmpty()) {
  1450. result.cities_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.CityBlock>();
  1451. }
  1452. result.cities_.addAll(other.cities_);
  1453. }
  1454. return this;
  1455. }
  1456. @Override
  1457. public Builder mergeFrom(
  1458. com.google.protobuf.CodedInputStream input,
  1459. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1460. throws java.io.IOException {
  1461. while (true) {
  1462. int tag = input.readTag();
  1463. switch (tag) {
  1464. case 0:
  1465. return this;
  1466. default: {
  1467. if (!parseUnknownField(input, extensionRegistry, tag)) {
  1468. return this;
  1469. }
  1470. break;
  1471. }
  1472. case 8: {
  1473. setSize(input.readInt64());
  1474. break;
  1475. }
  1476. case 16: {
  1477. setOffset(input.readInt64());
  1478. break;
  1479. }
  1480. case 26: {
  1481. setName(input.readString());
  1482. break;
  1483. }
  1484. case 34: {
  1485. setNameEn(input.readString());
  1486. break;
  1487. }
  1488. case 40: {
  1489. setIndexNameOffset(input.readInt32());
  1490. break;
  1491. }
  1492. case 66: {
  1493. net.osmand.binary.OsmandIndex.CityBlock.Builder subBuilder = net.osmand.binary.OsmandIndex.CityBlock.newBuilder();
  1494. input.readMessage(subBuilder, extensionRegistry);
  1495. addCities(subBuilder.buildPartial());
  1496. break;
  1497. }
  1498. }
  1499. }
  1500. }
  1501. // required int64 size = 1;
  1502. public boolean hasSize() {
  1503. return result.hasSize();
  1504. }
  1505. public long getSize() {
  1506. return result.getSize();
  1507. }
  1508. public Builder setSize(long value) {
  1509. result.hasSize = true;
  1510. result.size_ = value;
  1511. return this;
  1512. }
  1513. public Builder clearSize() {
  1514. result.hasSize = false;
  1515. result.size_ = 0L;
  1516. return this;
  1517. }
  1518. // required int64 offset = 2;
  1519. public boolean hasOffset() {
  1520. return result.hasOffset();
  1521. }
  1522. public long getOffset() {
  1523. return result.getOffset();
  1524. }
  1525. public Builder setOffset(long value) {
  1526. result.hasOffset = true;
  1527. result.offset_ = value;
  1528. return this;
  1529. }
  1530. public Builder clearOffset() {
  1531. result.hasOffset = false;
  1532. result.offset_ = 0L;
  1533. return this;
  1534. }
  1535. // optional string name = 3;
  1536. public boolean hasName() {
  1537. return result.hasName();
  1538. }
  1539. public java.lang.String getName() {
  1540. return result.getName();
  1541. }
  1542. public Builder setName(java.lang.String value) {
  1543. if (value == null) {
  1544. throw new NullPointerException();
  1545. }
  1546. result.hasName = true;
  1547. result.name_ = value;
  1548. return this;
  1549. }
  1550. public Builder clearName() {
  1551. result.hasName = false;
  1552. result.name_ = getDefaultInstance().getName();
  1553. return this;
  1554. }
  1555. // optional string nameEn = 4;
  1556. public boolean hasNameEn() {
  1557. return result.hasNameEn();
  1558. }
  1559. public java.lang.String getNameEn() {
  1560. return result.getNameEn();
  1561. }
  1562. public Builder setNameEn(java.lang.String value) {
  1563. if (value == null) {
  1564. throw new NullPointerException();
  1565. }
  1566. result.hasNameEn = true;
  1567. result.nameEn_ = value;
  1568. return this;
  1569. }
  1570. public Builder clearNameEn() {
  1571. result.hasNameEn = false;
  1572. result.nameEn_ = getDefaultInstance().getNameEn();
  1573. return this;
  1574. }
  1575. // optional int32 indexNameOffset = 5;
  1576. public boolean hasIndexNameOffset() {
  1577. return result.hasIndexNameOffset();
  1578. }
  1579. public int getIndexNameOffset() {
  1580. return result.getIndexNameOffset();
  1581. }
  1582. public Builder setIndexNameOffset(int value) {
  1583. result.hasIndexNameOffset = true;
  1584. result.indexNameOffset_ = value;
  1585. return this;
  1586. }
  1587. public Builder clearIndexNameOffset() {
  1588. result.hasIndexNameOffset = false;
  1589. result.indexNameOffset_ = 0;
  1590. return this;
  1591. }
  1592. // repeated .CityBlock cities = 8;
  1593. public java.util.List<net.osmand.binary.OsmandIndex.CityBlock> getCitiesList() {
  1594. return java.util.Collections.unmodifiableList(result.cities_);
  1595. }
  1596. public int getCitiesCount() {
  1597. return result.getCitiesCount();
  1598. }
  1599. public net.osmand.binary.OsmandIndex.CityBlock getCities(int index) {
  1600. return result.getCities(index);
  1601. }
  1602. public Builder setCities(int index, net.osmand.binary.OsmandIndex.CityBlock value) {
  1603. if (value == null) {
  1604. throw new NullPointerException();
  1605. }
  1606. result.cities_.set(index, value);
  1607. return this;
  1608. }
  1609. public Builder setCities(int index, net.osmand.binary.OsmandIndex.CityBlock.Builder builderForValue) {
  1610. result.cities_.set(index, builderForValue.build());
  1611. return this;
  1612. }
  1613. public Builder addCities(net.osmand.binary.OsmandIndex.CityBlock value) {
  1614. if (value == null) {
  1615. throw new NullPointerException();
  1616. }
  1617. if (result.cities_.isEmpty()) {
  1618. result.cities_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.CityBlock>();
  1619. }
  1620. result.cities_.add(value);
  1621. return this;
  1622. }
  1623. public Builder addCities(net.osmand.binary.OsmandIndex.CityBlock.Builder builderForValue) {
  1624. if (result.cities_.isEmpty()) {
  1625. result.cities_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.CityBlock>();
  1626. }
  1627. result.cities_.add(builderForValue.build());
  1628. return this;
  1629. }
  1630. public Builder addAllCities(
  1631. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.CityBlock> values) {
  1632. if (result.cities_.isEmpty()) {
  1633. result.cities_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.CityBlock>();
  1634. }
  1635. super.addAll(values, result.cities_);
  1636. return this;
  1637. }
  1638. public Builder clearCities() {
  1639. result.cities_ = java.util.Collections.emptyList();
  1640. return this;
  1641. }
  1642. // @@protoc_insertion_point(builder_scope:AddressPart)
  1643. }
  1644. static {
  1645. defaultInstance = new AddressPart(true);
  1646. net.osmand.binary.OsmandIndex.internalForceInit();
  1647. defaultInstance.initFields();
  1648. }
  1649. // @@protoc_insertion_point(class_scope:AddressPart)
  1650. }
  1651. public static final class CityBlock extends
  1652. com.google.protobuf.GeneratedMessageLite {
  1653. // Use CityBlock.newBuilder() to construct.
  1654. private CityBlock() {
  1655. initFields();
  1656. }
  1657. private CityBlock(boolean noInit) {}
  1658. private static final CityBlock defaultInstance;
  1659. public static CityBlock getDefaultInstance() {
  1660. return defaultInstance;
  1661. }
  1662. @Override
  1663. public CityBlock getDefaultInstanceForType() {
  1664. return defaultInstance;
  1665. }
  1666. // required int64 size = 1;
  1667. public static final int SIZE_FIELD_NUMBER = 1;
  1668. private boolean hasSize;
  1669. private long size_ = 0L;
  1670. public boolean hasSize() { return hasSize; }
  1671. public long getSize() { return size_; }
  1672. // required int64 offset = 2;
  1673. public static final int OFFSET_FIELD_NUMBER = 2;
  1674. private boolean hasOffset;
  1675. private long offset_ = 0L;
  1676. public boolean hasOffset() { return hasOffset; }
  1677. public long getOffset() { return offset_; }
  1678. // required int32 type = 3;
  1679. public static final int TYPE_FIELD_NUMBER = 3;
  1680. private boolean hasType;
  1681. private int type_ = 0;
  1682. public boolean hasType() { return hasType; }
  1683. public int getType() { return type_; }
  1684. private void initFields() {
  1685. }
  1686. @Override
  1687. public final boolean isInitialized() {
  1688. if (!hasSize) return false;
  1689. if (!hasOffset) return false;
  1690. if (!hasType) return false;
  1691. return true;
  1692. }
  1693. @Override
  1694. public void writeTo(com.google.protobuf.CodedOutputStream output)
  1695. throws java.io.IOException {
  1696. getSerializedSize();
  1697. if (hasSize()) {
  1698. output.writeInt64(1, getSize());
  1699. }
  1700. if (hasOffset()) {
  1701. output.writeInt64(2, getOffset());
  1702. }
  1703. if (hasType()) {
  1704. output.writeInt32(3, getType());
  1705. }
  1706. }
  1707. private int memoizedSerializedSize = -1;
  1708. @Override
  1709. public int getSerializedSize() {
  1710. int size = memoizedSerializedSize;
  1711. if (size != -1) return size;
  1712. size = 0;
  1713. if (hasSize()) {
  1714. size += com.google.protobuf.CodedOutputStream
  1715. .computeInt64Size(1, getSize());
  1716. }
  1717. if (hasOffset()) {
  1718. size += com.google.protobuf.CodedOutputStream
  1719. .computeInt64Size(2, getOffset());
  1720. }
  1721. if (hasType()) {
  1722. size += com.google.protobuf.CodedOutputStream
  1723. .computeInt32Size(3, getType());
  1724. }
  1725. memoizedSerializedSize = size;
  1726. return size;
  1727. }
  1728. public static net.osmand.binary.OsmandIndex.CityBlock parseFrom(
  1729. com.google.protobuf.ByteString data)
  1730. throws com.google.protobuf.InvalidProtocolBufferException {
  1731. return newBuilder().mergeFrom(data).buildParsed();
  1732. }
  1733. public static net.osmand.binary.OsmandIndex.CityBlock parseFrom(
  1734. com.google.protobuf.ByteString data,
  1735. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1736. throws com.google.protobuf.InvalidProtocolBufferException {
  1737. return newBuilder().mergeFrom(data, extensionRegistry)
  1738. .buildParsed();
  1739. }
  1740. public static net.osmand.binary.OsmandIndex.CityBlock parseFrom(byte[] data)
  1741. throws com.google.protobuf.InvalidProtocolBufferException {
  1742. return newBuilder().mergeFrom(data).buildParsed();
  1743. }
  1744. public static net.osmand.binary.OsmandIndex.CityBlock parseFrom(
  1745. byte[] data,
  1746. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1747. throws com.google.protobuf.InvalidProtocolBufferException {
  1748. return newBuilder().mergeFrom(data, extensionRegistry)
  1749. .buildParsed();
  1750. }
  1751. public static net.osmand.binary.OsmandIndex.CityBlock parseFrom(java.io.InputStream input)
  1752. throws java.io.IOException {
  1753. return newBuilder().mergeFrom(input).buildParsed();
  1754. }
  1755. public static net.osmand.binary.OsmandIndex.CityBlock parseFrom(
  1756. java.io.InputStream input,
  1757. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1758. throws java.io.IOException {
  1759. return newBuilder().mergeFrom(input, extensionRegistry)
  1760. .buildParsed();
  1761. }
  1762. public static net.osmand.binary.OsmandIndex.CityBlock parseDelimitedFrom(java.io.InputStream input)
  1763. throws java.io.IOException {
  1764. Builder builder = newBuilder();
  1765. if (builder.mergeDelimitedFrom(input)) {
  1766. return builder.buildParsed();
  1767. } else {
  1768. return null;
  1769. }
  1770. }
  1771. public static net.osmand.binary.OsmandIndex.CityBlock parseDelimitedFrom(
  1772. java.io.InputStream input,
  1773. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1774. throws java.io.IOException {
  1775. Builder builder = newBuilder();
  1776. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  1777. return builder.buildParsed();
  1778. } else {
  1779. return null;
  1780. }
  1781. }
  1782. public static net.osmand.binary.OsmandIndex.CityBlock parseFrom(
  1783. com.google.protobuf.CodedInputStream input)
  1784. throws java.io.IOException {
  1785. return newBuilder().mergeFrom(input).buildParsed();
  1786. }
  1787. public static net.osmand.binary.OsmandIndex.CityBlock parseFrom(
  1788. com.google.protobuf.CodedInputStream input,
  1789. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1790. throws java.io.IOException {
  1791. return newBuilder().mergeFrom(input, extensionRegistry)
  1792. .buildParsed();
  1793. }
  1794. public static Builder newBuilder() { return Builder.create(); }
  1795. @Override
  1796. public Builder newBuilderForType() { return newBuilder(); }
  1797. public static Builder newBuilder(net.osmand.binary.OsmandIndex.CityBlock prototype) {
  1798. return newBuilder().mergeFrom(prototype);
  1799. }
  1800. @Override
  1801. public Builder toBuilder() { return newBuilder(this); }
  1802. public static final class Builder extends
  1803. com.google.protobuf.GeneratedMessageLite.Builder<
  1804. net.osmand.binary.OsmandIndex.CityBlock, Builder> {
  1805. private net.osmand.binary.OsmandIndex.CityBlock result;
  1806. // Construct using net.osmand.binary.OsmandIndex.CityBlock.newBuilder()
  1807. private Builder() {}
  1808. private static Builder create() {
  1809. Builder builder = new Builder();
  1810. builder.result = new net.osmand.binary.OsmandIndex.CityBlock();
  1811. return builder;
  1812. }
  1813. @Override
  1814. protected net.osmand.binary.OsmandIndex.CityBlock internalGetResult() {
  1815. return result;
  1816. }
  1817. @Override
  1818. public Builder clear() {
  1819. if (result == null) {
  1820. throw new IllegalStateException(
  1821. "Cannot call clear() after build().");
  1822. }
  1823. result = new net.osmand.binary.OsmandIndex.CityBlock();
  1824. return this;
  1825. }
  1826. @Override
  1827. public Builder clone() {
  1828. return create().mergeFrom(result);
  1829. }
  1830. @Override
  1831. public net.osmand.binary.OsmandIndex.CityBlock getDefaultInstanceForType() {
  1832. return net.osmand.binary.OsmandIndex.CityBlock.getDefaultInstance();
  1833. }
  1834. @Override
  1835. public boolean isInitialized() {
  1836. return result.isInitialized();
  1837. }
  1838. @Override
  1839. public net.osmand.binary.OsmandIndex.CityBlock build() {
  1840. if (result != null && !isInitialized()) {
  1841. throw newUninitializedMessageException(result);
  1842. }
  1843. return buildPartial();
  1844. }
  1845. private net.osmand.binary.OsmandIndex.CityBlock buildParsed()
  1846. throws com.google.protobuf.InvalidProtocolBufferException {
  1847. if (!isInitialized()) {
  1848. throw newUninitializedMessageException(
  1849. result).asInvalidProtocolBufferException();
  1850. }
  1851. return buildPartial();
  1852. }
  1853. @Override
  1854. public net.osmand.binary.OsmandIndex.CityBlock buildPartial() {
  1855. if (result == null) {
  1856. throw new IllegalStateException(
  1857. "build() has already been called on this Builder.");
  1858. }
  1859. net.osmand.binary.OsmandIndex.CityBlock returnMe = result;
  1860. result = null;
  1861. return returnMe;
  1862. }
  1863. @Override
  1864. public Builder mergeFrom(net.osmand.binary.OsmandIndex.CityBlock other) {
  1865. if (other == net.osmand.binary.OsmandIndex.CityBlock.getDefaultInstance()) return this;
  1866. if (other.hasSize()) {
  1867. setSize(other.getSize());
  1868. }
  1869. if (other.hasOffset()) {
  1870. setOffset(other.getOffset());
  1871. }
  1872. if (other.hasType()) {
  1873. setType(other.getType());
  1874. }
  1875. return this;
  1876. }
  1877. @Override
  1878. public Builder mergeFrom(
  1879. com.google.protobuf.CodedInputStream input,
  1880. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  1881. throws java.io.IOException {
  1882. while (true) {
  1883. int tag = input.readTag();
  1884. switch (tag) {
  1885. case 0:
  1886. return this;
  1887. default: {
  1888. if (!parseUnknownField(input, extensionRegistry, tag)) {
  1889. return this;
  1890. }
  1891. break;
  1892. }
  1893. case 8: {
  1894. setSize(input.readInt64());
  1895. break;
  1896. }
  1897. case 16: {
  1898. setOffset(input.readInt64());
  1899. break;
  1900. }
  1901. case 24: {
  1902. setType(input.readInt32());
  1903. break;
  1904. }
  1905. }
  1906. }
  1907. }
  1908. // required int64 size = 1;
  1909. public boolean hasSize() {
  1910. return result.hasSize();
  1911. }
  1912. public long getSize() {
  1913. return result.getSize();
  1914. }
  1915. public Builder setSize(long value) {
  1916. result.hasSize = true;
  1917. result.size_ = value;
  1918. return this;
  1919. }
  1920. public Builder clearSize() {
  1921. result.hasSize = false;
  1922. result.size_ = 0L;
  1923. return this;
  1924. }
  1925. // required int64 offset = 2;
  1926. public boolean hasOffset() {
  1927. return result.hasOffset();
  1928. }
  1929. public long getOffset() {
  1930. return result.getOffset();
  1931. }
  1932. public Builder setOffset(long value) {
  1933. result.hasOffset = true;
  1934. result.offset_ = value;
  1935. return this;
  1936. }
  1937. public Builder clearOffset() {
  1938. result.hasOffset = false;
  1939. result.offset_ = 0L;
  1940. return this;
  1941. }
  1942. // required int32 type = 3;
  1943. public boolean hasType() {
  1944. return result.hasType();
  1945. }
  1946. public int getType() {
  1947. return result.getType();
  1948. }
  1949. public Builder setType(int value) {
  1950. result.hasType = true;
  1951. result.type_ = value;
  1952. return this;
  1953. }
  1954. public Builder clearType() {
  1955. result.hasType = false;
  1956. result.type_ = 0;
  1957. return this;
  1958. }
  1959. // @@protoc_insertion_point(builder_scope:CityBlock)
  1960. }
  1961. static {
  1962. defaultInstance = new CityBlock(true);
  1963. net.osmand.binary.OsmandIndex.internalForceInit();
  1964. defaultInstance.initFields();
  1965. }
  1966. // @@protoc_insertion_point(class_scope:CityBlock)
  1967. }
  1968. public static final class PoiPart extends
  1969. com.google.protobuf.GeneratedMessageLite {
  1970. // Use PoiPart.newBuilder() to construct.
  1971. private PoiPart() {
  1972. initFields();
  1973. }
  1974. private PoiPart(boolean noInit) {}
  1975. private static final PoiPart defaultInstance;
  1976. public static PoiPart getDefaultInstance() {
  1977. return defaultInstance;
  1978. }
  1979. @Override
  1980. public PoiPart getDefaultInstanceForType() {
  1981. return defaultInstance;
  1982. }
  1983. // required int64 size = 1;
  1984. public static final int SIZE_FIELD_NUMBER = 1;
  1985. private boolean hasSize;
  1986. private long size_ = 0L;
  1987. public boolean hasSize() { return hasSize; }
  1988. public long getSize() { return size_; }
  1989. // required int64 offset = 2;
  1990. public static final int OFFSET_FIELD_NUMBER = 2;
  1991. private boolean hasOffset;
  1992. private long offset_ = 0L;
  1993. public boolean hasOffset() { return hasOffset; }
  1994. public long getOffset() { return offset_; }
  1995. // optional string name = 3;
  1996. public static final int NAME_FIELD_NUMBER = 3;
  1997. private boolean hasName;
  1998. private java.lang.String name_ = "";
  1999. public boolean hasName() { return hasName; }
  2000. public java.lang.String getName() { return name_; }
  2001. // required int32 left = 4;
  2002. public static final int LEFT_FIELD_NUMBER = 4;
  2003. private boolean hasLeft;
  2004. private int left_ = 0;
  2005. public boolean hasLeft() { return hasLeft; }
  2006. public int getLeft() { return left_; }
  2007. // required int32 right = 5;
  2008. public static final int RIGHT_FIELD_NUMBER = 5;
  2009. private boolean hasRight;
  2010. private int right_ = 0;
  2011. public boolean hasRight() { return hasRight; }
  2012. public int getRight() { return right_; }
  2013. // required int32 top = 6;
  2014. public static final int TOP_FIELD_NUMBER = 6;
  2015. private boolean hasTop;
  2016. private int top_ = 0;
  2017. public boolean hasTop() { return hasTop; }
  2018. public int getTop() { return top_; }
  2019. // required int32 bottom = 7;
  2020. public static final int BOTTOM_FIELD_NUMBER = 7;
  2021. private boolean hasBottom;
  2022. private int bottom_ = 0;
  2023. public boolean hasBottom() { return hasBottom; }
  2024. public int getBottom() { return bottom_; }
  2025. private void initFields() {
  2026. }
  2027. @Override
  2028. public final boolean isInitialized() {
  2029. if (!hasSize) return false;
  2030. if (!hasOffset) return false;
  2031. if (!hasLeft) return false;
  2032. if (!hasRight) return false;
  2033. if (!hasTop) return false;
  2034. if (!hasBottom) return false;
  2035. return true;
  2036. }
  2037. @Override
  2038. public void writeTo(com.google.protobuf.CodedOutputStream output)
  2039. throws java.io.IOException {
  2040. getSerializedSize();
  2041. if (hasSize()) {
  2042. output.writeInt64(1, getSize());
  2043. }
  2044. if (hasOffset()) {
  2045. output.writeInt64(2, getOffset());
  2046. }
  2047. if (hasName()) {
  2048. output.writeString(3, getName());
  2049. }
  2050. if (hasLeft()) {
  2051. output.writeInt32(4, getLeft());
  2052. }
  2053. if (hasRight()) {
  2054. output.writeInt32(5, getRight());
  2055. }
  2056. if (hasTop()) {
  2057. output.writeInt32(6, getTop());
  2058. }
  2059. if (hasBottom()) {
  2060. output.writeInt32(7, getBottom());
  2061. }
  2062. }
  2063. private int memoizedSerializedSize = -1;
  2064. @Override
  2065. public int getSerializedSize() {
  2066. int size = memoizedSerializedSize;
  2067. if (size != -1) return size;
  2068. size = 0;
  2069. if (hasSize()) {
  2070. size += com.google.protobuf.CodedOutputStream
  2071. .computeInt64Size(1, getSize());
  2072. }
  2073. if (hasOffset()) {
  2074. size += com.google.protobuf.CodedOutputStream
  2075. .computeInt64Size(2, getOffset());
  2076. }
  2077. if (hasName()) {
  2078. size += com.google.protobuf.CodedOutputStream
  2079. .computeStringSize(3, getName());
  2080. }
  2081. if (hasLeft()) {
  2082. size += com.google.protobuf.CodedOutputStream
  2083. .computeInt32Size(4, getLeft());
  2084. }
  2085. if (hasRight()) {
  2086. size += com.google.protobuf.CodedOutputStream
  2087. .computeInt32Size(5, getRight());
  2088. }
  2089. if (hasTop()) {
  2090. size += com.google.protobuf.CodedOutputStream
  2091. .computeInt32Size(6, getTop());
  2092. }
  2093. if (hasBottom()) {
  2094. size += com.google.protobuf.CodedOutputStream
  2095. .computeInt32Size(7, getBottom());
  2096. }
  2097. memoizedSerializedSize = size;
  2098. return size;
  2099. }
  2100. public static net.osmand.binary.OsmandIndex.PoiPart parseFrom(
  2101. com.google.protobuf.ByteString data)
  2102. throws com.google.protobuf.InvalidProtocolBufferException {
  2103. return newBuilder().mergeFrom(data).buildParsed();
  2104. }
  2105. public static net.osmand.binary.OsmandIndex.PoiPart parseFrom(
  2106. com.google.protobuf.ByteString data,
  2107. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2108. throws com.google.protobuf.InvalidProtocolBufferException {
  2109. return newBuilder().mergeFrom(data, extensionRegistry)
  2110. .buildParsed();
  2111. }
  2112. public static net.osmand.binary.OsmandIndex.PoiPart parseFrom(byte[] data)
  2113. throws com.google.protobuf.InvalidProtocolBufferException {
  2114. return newBuilder().mergeFrom(data).buildParsed();
  2115. }
  2116. public static net.osmand.binary.OsmandIndex.PoiPart parseFrom(
  2117. byte[] data,
  2118. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2119. throws com.google.protobuf.InvalidProtocolBufferException {
  2120. return newBuilder().mergeFrom(data, extensionRegistry)
  2121. .buildParsed();
  2122. }
  2123. public static net.osmand.binary.OsmandIndex.PoiPart parseFrom(java.io.InputStream input)
  2124. throws java.io.IOException {
  2125. return newBuilder().mergeFrom(input).buildParsed();
  2126. }
  2127. public static net.osmand.binary.OsmandIndex.PoiPart parseFrom(
  2128. java.io.InputStream input,
  2129. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2130. throws java.io.IOException {
  2131. return newBuilder().mergeFrom(input, extensionRegistry)
  2132. .buildParsed();
  2133. }
  2134. public static net.osmand.binary.OsmandIndex.PoiPart parseDelimitedFrom(java.io.InputStream input)
  2135. throws java.io.IOException {
  2136. Builder builder = newBuilder();
  2137. if (builder.mergeDelimitedFrom(input)) {
  2138. return builder.buildParsed();
  2139. } else {
  2140. return null;
  2141. }
  2142. }
  2143. public static net.osmand.binary.OsmandIndex.PoiPart parseDelimitedFrom(
  2144. java.io.InputStream input,
  2145. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2146. throws java.io.IOException {
  2147. Builder builder = newBuilder();
  2148. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  2149. return builder.buildParsed();
  2150. } else {
  2151. return null;
  2152. }
  2153. }
  2154. public static net.osmand.binary.OsmandIndex.PoiPart parseFrom(
  2155. com.google.protobuf.CodedInputStream input)
  2156. throws java.io.IOException {
  2157. return newBuilder().mergeFrom(input).buildParsed();
  2158. }
  2159. public static net.osmand.binary.OsmandIndex.PoiPart parseFrom(
  2160. com.google.protobuf.CodedInputStream input,
  2161. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2162. throws java.io.IOException {
  2163. return newBuilder().mergeFrom(input, extensionRegistry)
  2164. .buildParsed();
  2165. }
  2166. public static Builder newBuilder() { return Builder.create(); }
  2167. @Override
  2168. public Builder newBuilderForType() { return newBuilder(); }
  2169. public static Builder newBuilder(net.osmand.binary.OsmandIndex.PoiPart prototype) {
  2170. return newBuilder().mergeFrom(prototype);
  2171. }
  2172. @Override
  2173. public Builder toBuilder() { return newBuilder(this); }
  2174. public static final class Builder extends
  2175. com.google.protobuf.GeneratedMessageLite.Builder<
  2176. net.osmand.binary.OsmandIndex.PoiPart, Builder> {
  2177. private net.osmand.binary.OsmandIndex.PoiPart result;
  2178. // Construct using net.osmand.binary.OsmandIndex.PoiPart.newBuilder()
  2179. private Builder() {}
  2180. private static Builder create() {
  2181. Builder builder = new Builder();
  2182. builder.result = new net.osmand.binary.OsmandIndex.PoiPart();
  2183. return builder;
  2184. }
  2185. @Override
  2186. protected net.osmand.binary.OsmandIndex.PoiPart internalGetResult() {
  2187. return result;
  2188. }
  2189. @Override
  2190. public Builder clear() {
  2191. if (result == null) {
  2192. throw new IllegalStateException(
  2193. "Cannot call clear() after build().");
  2194. }
  2195. result = new net.osmand.binary.OsmandIndex.PoiPart();
  2196. return this;
  2197. }
  2198. @Override
  2199. public Builder clone() {
  2200. return create().mergeFrom(result);
  2201. }
  2202. @Override
  2203. public net.osmand.binary.OsmandIndex.PoiPart getDefaultInstanceForType() {
  2204. return net.osmand.binary.OsmandIndex.PoiPart.getDefaultInstance();
  2205. }
  2206. @Override
  2207. public boolean isInitialized() {
  2208. return result.isInitialized();
  2209. }
  2210. @Override
  2211. public net.osmand.binary.OsmandIndex.PoiPart build() {
  2212. if (result != null && !isInitialized()) {
  2213. throw newUninitializedMessageException(result);
  2214. }
  2215. return buildPartial();
  2216. }
  2217. private net.osmand.binary.OsmandIndex.PoiPart buildParsed()
  2218. throws com.google.protobuf.InvalidProtocolBufferException {
  2219. if (!isInitialized()) {
  2220. throw newUninitializedMessageException(
  2221. result).asInvalidProtocolBufferException();
  2222. }
  2223. return buildPartial();
  2224. }
  2225. @Override
  2226. public net.osmand.binary.OsmandIndex.PoiPart buildPartial() {
  2227. if (result == null) {
  2228. throw new IllegalStateException(
  2229. "build() has already been called on this Builder.");
  2230. }
  2231. net.osmand.binary.OsmandIndex.PoiPart returnMe = result;
  2232. result = null;
  2233. return returnMe;
  2234. }
  2235. @Override
  2236. public Builder mergeFrom(net.osmand.binary.OsmandIndex.PoiPart other) {
  2237. if (other == net.osmand.binary.OsmandIndex.PoiPart.getDefaultInstance()) return this;
  2238. if (other.hasSize()) {
  2239. setSize(other.getSize());
  2240. }
  2241. if (other.hasOffset()) {
  2242. setOffset(other.getOffset());
  2243. }
  2244. if (other.hasName()) {
  2245. setName(other.getName());
  2246. }
  2247. if (other.hasLeft()) {
  2248. setLeft(other.getLeft());
  2249. }
  2250. if (other.hasRight()) {
  2251. setRight(other.getRight());
  2252. }
  2253. if (other.hasTop()) {
  2254. setTop(other.getTop());
  2255. }
  2256. if (other.hasBottom()) {
  2257. setBottom(other.getBottom());
  2258. }
  2259. return this;
  2260. }
  2261. @Override
  2262. public Builder mergeFrom(
  2263. com.google.protobuf.CodedInputStream input,
  2264. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2265. throws java.io.IOException {
  2266. while (true) {
  2267. int tag = input.readTag();
  2268. switch (tag) {
  2269. case 0:
  2270. return this;
  2271. default: {
  2272. if (!parseUnknownField(input, extensionRegistry, tag)) {
  2273. return this;
  2274. }
  2275. break;
  2276. }
  2277. case 8: {
  2278. setSize(input.readInt64());
  2279. break;
  2280. }
  2281. case 16: {
  2282. setOffset(input.readInt64());
  2283. break;
  2284. }
  2285. case 26: {
  2286. setName(input.readString());
  2287. break;
  2288. }
  2289. case 32: {
  2290. setLeft(input.readInt32());
  2291. break;
  2292. }
  2293. case 40: {
  2294. setRight(input.readInt32());
  2295. break;
  2296. }
  2297. case 48: {
  2298. setTop(input.readInt32());
  2299. break;
  2300. }
  2301. case 56: {
  2302. setBottom(input.readInt32());
  2303. break;
  2304. }
  2305. }
  2306. }
  2307. }
  2308. // required int64 size = 1;
  2309. public boolean hasSize() {
  2310. return result.hasSize();
  2311. }
  2312. public long getSize() {
  2313. return result.getSize();
  2314. }
  2315. public Builder setSize(long value) {
  2316. result.hasSize = true;
  2317. result.size_ = value;
  2318. return this;
  2319. }
  2320. public Builder clearSize() {
  2321. result.hasSize = false;
  2322. result.size_ = 0L;
  2323. return this;
  2324. }
  2325. // required int64 offset = 2;
  2326. public boolean hasOffset() {
  2327. return result.hasOffset();
  2328. }
  2329. public long getOffset() {
  2330. return result.getOffset();
  2331. }
  2332. public Builder setOffset(long value) {
  2333. result.hasOffset = true;
  2334. result.offset_ = value;
  2335. return this;
  2336. }
  2337. public Builder clearOffset() {
  2338. result.hasOffset = false;
  2339. result.offset_ = 0L;
  2340. return this;
  2341. }
  2342. // optional string name = 3;
  2343. public boolean hasName() {
  2344. return result.hasName();
  2345. }
  2346. public java.lang.String getName() {
  2347. return result.getName();
  2348. }
  2349. public Builder setName(java.lang.String value) {
  2350. if (value == null) {
  2351. throw new NullPointerException();
  2352. }
  2353. result.hasName = true;
  2354. result.name_ = value;
  2355. return this;
  2356. }
  2357. public Builder clearName() {
  2358. result.hasName = false;
  2359. result.name_ = getDefaultInstance().getName();
  2360. return this;
  2361. }
  2362. // required int32 left = 4;
  2363. public boolean hasLeft() {
  2364. return result.hasLeft();
  2365. }
  2366. public int getLeft() {
  2367. return result.getLeft();
  2368. }
  2369. public Builder setLeft(int value) {
  2370. result.hasLeft = true;
  2371. result.left_ = value;
  2372. return this;
  2373. }
  2374. public Builder clearLeft() {
  2375. result.hasLeft = false;
  2376. result.left_ = 0;
  2377. return this;
  2378. }
  2379. // required int32 right = 5;
  2380. public boolean hasRight() {
  2381. return result.hasRight();
  2382. }
  2383. public int getRight() {
  2384. return result.getRight();
  2385. }
  2386. public Builder setRight(int value) {
  2387. result.hasRight = true;
  2388. result.right_ = value;
  2389. return this;
  2390. }
  2391. public Builder clearRight() {
  2392. result.hasRight = false;
  2393. result.right_ = 0;
  2394. return this;
  2395. }
  2396. // required int32 top = 6;
  2397. public boolean hasTop() {
  2398. return result.hasTop();
  2399. }
  2400. public int getTop() {
  2401. return result.getTop();
  2402. }
  2403. public Builder setTop(int value) {
  2404. result.hasTop = true;
  2405. result.top_ = value;
  2406. return this;
  2407. }
  2408. public Builder clearTop() {
  2409. result.hasTop = false;
  2410. result.top_ = 0;
  2411. return this;
  2412. }
  2413. // required int32 bottom = 7;
  2414. public boolean hasBottom() {
  2415. return result.hasBottom();
  2416. }
  2417. public int getBottom() {
  2418. return result.getBottom();
  2419. }
  2420. public Builder setBottom(int value) {
  2421. result.hasBottom = true;
  2422. result.bottom_ = value;
  2423. return this;
  2424. }
  2425. public Builder clearBottom() {
  2426. result.hasBottom = false;
  2427. result.bottom_ = 0;
  2428. return this;
  2429. }
  2430. // @@protoc_insertion_point(builder_scope:PoiPart)
  2431. }
  2432. static {
  2433. defaultInstance = new PoiPart(true);
  2434. net.osmand.binary.OsmandIndex.internalForceInit();
  2435. defaultInstance.initFields();
  2436. }
  2437. // @@protoc_insertion_point(class_scope:PoiPart)
  2438. }
  2439. public static final class MapLevel extends
  2440. com.google.protobuf.GeneratedMessageLite {
  2441. // Use MapLevel.newBuilder() to construct.
  2442. private MapLevel() {
  2443. initFields();
  2444. }
  2445. private MapLevel(boolean noInit) {}
  2446. private static final MapLevel defaultInstance;
  2447. public static MapLevel getDefaultInstance() {
  2448. return defaultInstance;
  2449. }
  2450. @Override
  2451. public MapLevel getDefaultInstanceForType() {
  2452. return defaultInstance;
  2453. }
  2454. // required int64 size = 1;
  2455. public static final int SIZE_FIELD_NUMBER = 1;
  2456. private boolean hasSize;
  2457. private long size_ = 0L;
  2458. public boolean hasSize() { return hasSize; }
  2459. public long getSize() { return size_; }
  2460. // required int64 offset = 2;
  2461. public static final int OFFSET_FIELD_NUMBER = 2;
  2462. private boolean hasOffset;
  2463. private long offset_ = 0L;
  2464. public boolean hasOffset() { return hasOffset; }
  2465. public long getOffset() { return offset_; }
  2466. // required int32 left = 4;
  2467. public static final int LEFT_FIELD_NUMBER = 4;
  2468. private boolean hasLeft;
  2469. private int left_ = 0;
  2470. public boolean hasLeft() { return hasLeft; }
  2471. public int getLeft() { return left_; }
  2472. // required int32 right = 5;
  2473. public static final int RIGHT_FIELD_NUMBER = 5;
  2474. private boolean hasRight;
  2475. private int right_ = 0;
  2476. public boolean hasRight() { return hasRight; }
  2477. public int getRight() { return right_; }
  2478. // required int32 top = 6;
  2479. public static final int TOP_FIELD_NUMBER = 6;
  2480. private boolean hasTop;
  2481. private int top_ = 0;
  2482. public boolean hasTop() { return hasTop; }
  2483. public int getTop() { return top_; }
  2484. // required int32 bottom = 7;
  2485. public static final int BOTTOM_FIELD_NUMBER = 7;
  2486. private boolean hasBottom;
  2487. private int bottom_ = 0;
  2488. public boolean hasBottom() { return hasBottom; }
  2489. public int getBottom() { return bottom_; }
  2490. // optional int32 minzoom = 8;
  2491. public static final int MINZOOM_FIELD_NUMBER = 8;
  2492. private boolean hasMinzoom;
  2493. private int minzoom_ = 0;
  2494. public boolean hasMinzoom() { return hasMinzoom; }
  2495. public int getMinzoom() { return minzoom_; }
  2496. // optional int32 maxzoom = 9;
  2497. public static final int MAXZOOM_FIELD_NUMBER = 9;
  2498. private boolean hasMaxzoom;
  2499. private int maxzoom_ = 0;
  2500. public boolean hasMaxzoom() { return hasMaxzoom; }
  2501. public int getMaxzoom() { return maxzoom_; }
  2502. private void initFields() {
  2503. }
  2504. @Override
  2505. public final boolean isInitialized() {
  2506. if (!hasSize) return false;
  2507. if (!hasOffset) return false;
  2508. if (!hasLeft) return false;
  2509. if (!hasRight) return false;
  2510. if (!hasTop) return false;
  2511. if (!hasBottom) return false;
  2512. return true;
  2513. }
  2514. @Override
  2515. public void writeTo(com.google.protobuf.CodedOutputStream output)
  2516. throws java.io.IOException {
  2517. getSerializedSize();
  2518. if (hasSize()) {
  2519. output.writeInt64(1, getSize());
  2520. }
  2521. if (hasOffset()) {
  2522. output.writeInt64(2, getOffset());
  2523. }
  2524. if (hasLeft()) {
  2525. output.writeInt32(4, getLeft());
  2526. }
  2527. if (hasRight()) {
  2528. output.writeInt32(5, getRight());
  2529. }
  2530. if (hasTop()) {
  2531. output.writeInt32(6, getTop());
  2532. }
  2533. if (hasBottom()) {
  2534. output.writeInt32(7, getBottom());
  2535. }
  2536. if (hasMinzoom()) {
  2537. output.writeInt32(8, getMinzoom());
  2538. }
  2539. if (hasMaxzoom()) {
  2540. output.writeInt32(9, getMaxzoom());
  2541. }
  2542. }
  2543. private int memoizedSerializedSize = -1;
  2544. @Override
  2545. public int getSerializedSize() {
  2546. int size = memoizedSerializedSize;
  2547. if (size != -1) return size;
  2548. size = 0;
  2549. if (hasSize()) {
  2550. size += com.google.protobuf.CodedOutputStream
  2551. .computeInt64Size(1, getSize());
  2552. }
  2553. if (hasOffset()) {
  2554. size += com.google.protobuf.CodedOutputStream
  2555. .computeInt64Size(2, getOffset());
  2556. }
  2557. if (hasLeft()) {
  2558. size += com.google.protobuf.CodedOutputStream
  2559. .computeInt32Size(4, getLeft());
  2560. }
  2561. if (hasRight()) {
  2562. size += com.google.protobuf.CodedOutputStream
  2563. .computeInt32Size(5, getRight());
  2564. }
  2565. if (hasTop()) {
  2566. size += com.google.protobuf.CodedOutputStream
  2567. .computeInt32Size(6, getTop());
  2568. }
  2569. if (hasBottom()) {
  2570. size += com.google.protobuf.CodedOutputStream
  2571. .computeInt32Size(7, getBottom());
  2572. }
  2573. if (hasMinzoom()) {
  2574. size += com.google.protobuf.CodedOutputStream
  2575. .computeInt32Size(8, getMinzoom());
  2576. }
  2577. if (hasMaxzoom()) {
  2578. size += com.google.protobuf.CodedOutputStream
  2579. .computeInt32Size(9, getMaxzoom());
  2580. }
  2581. memoizedSerializedSize = size;
  2582. return size;
  2583. }
  2584. public static net.osmand.binary.OsmandIndex.MapLevel parseFrom(
  2585. com.google.protobuf.ByteString data)
  2586. throws com.google.protobuf.InvalidProtocolBufferException {
  2587. return newBuilder().mergeFrom(data).buildParsed();
  2588. }
  2589. public static net.osmand.binary.OsmandIndex.MapLevel parseFrom(
  2590. com.google.protobuf.ByteString data,
  2591. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2592. throws com.google.protobuf.InvalidProtocolBufferException {
  2593. return newBuilder().mergeFrom(data, extensionRegistry)
  2594. .buildParsed();
  2595. }
  2596. public static net.osmand.binary.OsmandIndex.MapLevel parseFrom(byte[] data)
  2597. throws com.google.protobuf.InvalidProtocolBufferException {
  2598. return newBuilder().mergeFrom(data).buildParsed();
  2599. }
  2600. public static net.osmand.binary.OsmandIndex.MapLevel parseFrom(
  2601. byte[] data,
  2602. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2603. throws com.google.protobuf.InvalidProtocolBufferException {
  2604. return newBuilder().mergeFrom(data, extensionRegistry)
  2605. .buildParsed();
  2606. }
  2607. public static net.osmand.binary.OsmandIndex.MapLevel parseFrom(java.io.InputStream input)
  2608. throws java.io.IOException {
  2609. return newBuilder().mergeFrom(input).buildParsed();
  2610. }
  2611. public static net.osmand.binary.OsmandIndex.MapLevel parseFrom(
  2612. java.io.InputStream input,
  2613. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2614. throws java.io.IOException {
  2615. return newBuilder().mergeFrom(input, extensionRegistry)
  2616. .buildParsed();
  2617. }
  2618. public static net.osmand.binary.OsmandIndex.MapLevel parseDelimitedFrom(java.io.InputStream input)
  2619. throws java.io.IOException {
  2620. Builder builder = newBuilder();
  2621. if (builder.mergeDelimitedFrom(input)) {
  2622. return builder.buildParsed();
  2623. } else {
  2624. return null;
  2625. }
  2626. }
  2627. public static net.osmand.binary.OsmandIndex.MapLevel parseDelimitedFrom(
  2628. java.io.InputStream input,
  2629. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2630. throws java.io.IOException {
  2631. Builder builder = newBuilder();
  2632. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  2633. return builder.buildParsed();
  2634. } else {
  2635. return null;
  2636. }
  2637. }
  2638. public static net.osmand.binary.OsmandIndex.MapLevel parseFrom(
  2639. com.google.protobuf.CodedInputStream input)
  2640. throws java.io.IOException {
  2641. return newBuilder().mergeFrom(input).buildParsed();
  2642. }
  2643. public static net.osmand.binary.OsmandIndex.MapLevel parseFrom(
  2644. com.google.protobuf.CodedInputStream input,
  2645. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2646. throws java.io.IOException {
  2647. return newBuilder().mergeFrom(input, extensionRegistry)
  2648. .buildParsed();
  2649. }
  2650. public static Builder newBuilder() { return Builder.create(); }
  2651. @Override
  2652. public Builder newBuilderForType() { return newBuilder(); }
  2653. public static Builder newBuilder(net.osmand.binary.OsmandIndex.MapLevel prototype) {
  2654. return newBuilder().mergeFrom(prototype);
  2655. }
  2656. @Override
  2657. public Builder toBuilder() { return newBuilder(this); }
  2658. public static final class Builder extends
  2659. com.google.protobuf.GeneratedMessageLite.Builder<
  2660. net.osmand.binary.OsmandIndex.MapLevel, Builder> {
  2661. private net.osmand.binary.OsmandIndex.MapLevel result;
  2662. // Construct using net.osmand.binary.OsmandIndex.MapLevel.newBuilder()
  2663. private Builder() {}
  2664. private static Builder create() {
  2665. Builder builder = new Builder();
  2666. builder.result = new net.osmand.binary.OsmandIndex.MapLevel();
  2667. return builder;
  2668. }
  2669. @Override
  2670. protected net.osmand.binary.OsmandIndex.MapLevel internalGetResult() {
  2671. return result;
  2672. }
  2673. @Override
  2674. public Builder clear() {
  2675. if (result == null) {
  2676. throw new IllegalStateException(
  2677. "Cannot call clear() after build().");
  2678. }
  2679. result = new net.osmand.binary.OsmandIndex.MapLevel();
  2680. return this;
  2681. }
  2682. @Override
  2683. public Builder clone() {
  2684. return create().mergeFrom(result);
  2685. }
  2686. @Override
  2687. public net.osmand.binary.OsmandIndex.MapLevel getDefaultInstanceForType() {
  2688. return net.osmand.binary.OsmandIndex.MapLevel.getDefaultInstance();
  2689. }
  2690. @Override
  2691. public boolean isInitialized() {
  2692. return result.isInitialized();
  2693. }
  2694. @Override
  2695. public net.osmand.binary.OsmandIndex.MapLevel build() {
  2696. if (result != null && !isInitialized()) {
  2697. throw newUninitializedMessageException(result);
  2698. }
  2699. return buildPartial();
  2700. }
  2701. private net.osmand.binary.OsmandIndex.MapLevel buildParsed()
  2702. throws com.google.protobuf.InvalidProtocolBufferException {
  2703. if (!isInitialized()) {
  2704. throw newUninitializedMessageException(
  2705. result).asInvalidProtocolBufferException();
  2706. }
  2707. return buildPartial();
  2708. }
  2709. @Override
  2710. public net.osmand.binary.OsmandIndex.MapLevel buildPartial() {
  2711. if (result == null) {
  2712. throw new IllegalStateException(
  2713. "build() has already been called on this Builder.");
  2714. }
  2715. net.osmand.binary.OsmandIndex.MapLevel returnMe = result;
  2716. result = null;
  2717. return returnMe;
  2718. }
  2719. @Override
  2720. public Builder mergeFrom(net.osmand.binary.OsmandIndex.MapLevel other) {
  2721. if (other == net.osmand.binary.OsmandIndex.MapLevel.getDefaultInstance()) return this;
  2722. if (other.hasSize()) {
  2723. setSize(other.getSize());
  2724. }
  2725. if (other.hasOffset()) {
  2726. setOffset(other.getOffset());
  2727. }
  2728. if (other.hasLeft()) {
  2729. setLeft(other.getLeft());
  2730. }
  2731. if (other.hasRight()) {
  2732. setRight(other.getRight());
  2733. }
  2734. if (other.hasTop()) {
  2735. setTop(other.getTop());
  2736. }
  2737. if (other.hasBottom()) {
  2738. setBottom(other.getBottom());
  2739. }
  2740. if (other.hasMinzoom()) {
  2741. setMinzoom(other.getMinzoom());
  2742. }
  2743. if (other.hasMaxzoom()) {
  2744. setMaxzoom(other.getMaxzoom());
  2745. }
  2746. return this;
  2747. }
  2748. @Override
  2749. public Builder mergeFrom(
  2750. com.google.protobuf.CodedInputStream input,
  2751. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  2752. throws java.io.IOException {
  2753. while (true) {
  2754. int tag = input.readTag();
  2755. switch (tag) {
  2756. case 0:
  2757. return this;
  2758. default: {
  2759. if (!parseUnknownField(input, extensionRegistry, tag)) {
  2760. return this;
  2761. }
  2762. break;
  2763. }
  2764. case 8: {
  2765. setSize(input.readInt64());
  2766. break;
  2767. }
  2768. case 16: {
  2769. setOffset(input.readInt64());
  2770. break;
  2771. }
  2772. case 32: {
  2773. setLeft(input.readInt32());
  2774. break;
  2775. }
  2776. case 40: {
  2777. setRight(input.readInt32());
  2778. break;
  2779. }
  2780. case 48: {
  2781. setTop(input.readInt32());
  2782. break;
  2783. }
  2784. case 56: {
  2785. setBottom(input.readInt32());
  2786. break;
  2787. }
  2788. case 64: {
  2789. setMinzoom(input.readInt32());
  2790. break;
  2791. }
  2792. case 72: {
  2793. setMaxzoom(input.readInt32());
  2794. break;
  2795. }
  2796. }
  2797. }
  2798. }
  2799. // required int64 size = 1;
  2800. public boolean hasSize() {
  2801. return result.hasSize();
  2802. }
  2803. public long getSize() {
  2804. return result.getSize();
  2805. }
  2806. public Builder setSize(long value) {
  2807. result.hasSize = true;
  2808. result.size_ = value;
  2809. return this;
  2810. }
  2811. public Builder clearSize() {
  2812. result.hasSize = false;
  2813. result.size_ = 0L;
  2814. return this;
  2815. }
  2816. // required int64 offset = 2;
  2817. public boolean hasOffset() {
  2818. return result.hasOffset();
  2819. }
  2820. public long getOffset() {
  2821. return result.getOffset();
  2822. }
  2823. public Builder setOffset(long value) {
  2824. result.hasOffset = true;
  2825. result.offset_ = value;
  2826. return this;
  2827. }
  2828. public Builder clearOffset() {
  2829. result.hasOffset = false;
  2830. result.offset_ = 0L;
  2831. return this;
  2832. }
  2833. // required int32 left = 4;
  2834. public boolean hasLeft() {
  2835. return result.hasLeft();
  2836. }
  2837. public int getLeft() {
  2838. return result.getLeft();
  2839. }
  2840. public Builder setLeft(int value) {
  2841. result.hasLeft = true;
  2842. result.left_ = value;
  2843. return this;
  2844. }
  2845. public Builder clearLeft() {
  2846. result.hasLeft = false;
  2847. result.left_ = 0;
  2848. return this;
  2849. }
  2850. // required int32 right = 5;
  2851. public boolean hasRight() {
  2852. return result.hasRight();
  2853. }
  2854. public int getRight() {
  2855. return result.getRight();
  2856. }
  2857. public Builder setRight(int value) {
  2858. result.hasRight = true;
  2859. result.right_ = value;
  2860. return this;
  2861. }
  2862. public Builder clearRight() {
  2863. result.hasRight = false;
  2864. result.right_ = 0;
  2865. return this;
  2866. }
  2867. // required int32 top = 6;
  2868. public boolean hasTop() {
  2869. return result.hasTop();
  2870. }
  2871. public int getTop() {
  2872. return result.getTop();
  2873. }
  2874. public Builder setTop(int value) {
  2875. result.hasTop = true;
  2876. result.top_ = value;
  2877. return this;
  2878. }
  2879. public Builder clearTop() {
  2880. result.hasTop = false;
  2881. result.top_ = 0;
  2882. return this;
  2883. }
  2884. // required int32 bottom = 7;
  2885. public boolean hasBottom() {
  2886. return result.hasBottom();
  2887. }
  2888. public int getBottom() {
  2889. return result.getBottom();
  2890. }
  2891. public Builder setBottom(int value) {
  2892. result.hasBottom = true;
  2893. result.bottom_ = value;
  2894. return this;
  2895. }
  2896. public Builder clearBottom() {
  2897. result.hasBottom = false;
  2898. result.bottom_ = 0;
  2899. return this;
  2900. }
  2901. // optional int32 minzoom = 8;
  2902. public boolean hasMinzoom() {
  2903. return result.hasMinzoom();
  2904. }
  2905. public int getMinzoom() {
  2906. return result.getMinzoom();
  2907. }
  2908. public Builder setMinzoom(int value) {
  2909. result.hasMinzoom = true;
  2910. result.minzoom_ = value;
  2911. return this;
  2912. }
  2913. public Builder clearMinzoom() {
  2914. result.hasMinzoom = false;
  2915. result.minzoom_ = 0;
  2916. return this;
  2917. }
  2918. // optional int32 maxzoom = 9;
  2919. public boolean hasMaxzoom() {
  2920. return result.hasMaxzoom();
  2921. }
  2922. public int getMaxzoom() {
  2923. return result.getMaxzoom();
  2924. }
  2925. public Builder setMaxzoom(int value) {
  2926. result.hasMaxzoom = true;
  2927. result.maxzoom_ = value;
  2928. return this;
  2929. }
  2930. public Builder clearMaxzoom() {
  2931. result.hasMaxzoom = false;
  2932. result.maxzoom_ = 0;
  2933. return this;
  2934. }
  2935. // @@protoc_insertion_point(builder_scope:MapLevel)
  2936. }
  2937. static {
  2938. defaultInstance = new MapLevel(true);
  2939. net.osmand.binary.OsmandIndex.internalForceInit();
  2940. defaultInstance.initFields();
  2941. }
  2942. // @@protoc_insertion_point(class_scope:MapLevel)
  2943. }
  2944. public static final class MapPart extends
  2945. com.google.protobuf.GeneratedMessageLite {
  2946. // Use MapPart.newBuilder() to construct.
  2947. private MapPart() {
  2948. initFields();
  2949. }
  2950. private MapPart(boolean noInit) {}
  2951. private static final MapPart defaultInstance;
  2952. public static MapPart getDefaultInstance() {
  2953. return defaultInstance;
  2954. }
  2955. @Override
  2956. public MapPart getDefaultInstanceForType() {
  2957. return defaultInstance;
  2958. }
  2959. // required int64 size = 1;
  2960. public static final int SIZE_FIELD_NUMBER = 1;
  2961. private boolean hasSize;
  2962. private long size_ = 0L;
  2963. public boolean hasSize() { return hasSize; }
  2964. public long getSize() { return size_; }
  2965. // required int64 offset = 2;
  2966. public static final int OFFSET_FIELD_NUMBER = 2;
  2967. private boolean hasOffset;
  2968. private long offset_ = 0L;
  2969. public boolean hasOffset() { return hasOffset; }
  2970. public long getOffset() { return offset_; }
  2971. // optional string name = 3;
  2972. public static final int NAME_FIELD_NUMBER = 3;
  2973. private boolean hasName;
  2974. private java.lang.String name_ = "";
  2975. public boolean hasName() { return hasName; }
  2976. public java.lang.String getName() { return name_; }
  2977. // repeated .MapLevel levels = 5;
  2978. public static final int LEVELS_FIELD_NUMBER = 5;
  2979. private java.util.List<net.osmand.binary.OsmandIndex.MapLevel> levels_ =
  2980. java.util.Collections.emptyList();
  2981. public java.util.List<net.osmand.binary.OsmandIndex.MapLevel> getLevelsList() {
  2982. return levels_;
  2983. }
  2984. public int getLevelsCount() { return levels_.size(); }
  2985. public net.osmand.binary.OsmandIndex.MapLevel getLevels(int index) {
  2986. return levels_.get(index);
  2987. }
  2988. private void initFields() {
  2989. }
  2990. @Override
  2991. public final boolean isInitialized() {
  2992. if (!hasSize) return false;
  2993. if (!hasOffset) return false;
  2994. for (net.osmand.binary.OsmandIndex.MapLevel element : getLevelsList()) {
  2995. if (!element.isInitialized()) return false;
  2996. }
  2997. return true;
  2998. }
  2999. @Override
  3000. public void writeTo(com.google.protobuf.CodedOutputStream output)
  3001. throws java.io.IOException {
  3002. getSerializedSize();
  3003. if (hasSize()) {
  3004. output.writeInt64(1, getSize());
  3005. }
  3006. if (hasOffset()) {
  3007. output.writeInt64(2, getOffset());
  3008. }
  3009. if (hasName()) {
  3010. output.writeString(3, getName());
  3011. }
  3012. for (net.osmand.binary.OsmandIndex.MapLevel element : getLevelsList()) {
  3013. output.writeMessage(5, element);
  3014. }
  3015. }
  3016. private int memoizedSerializedSize = -1;
  3017. @Override
  3018. public int getSerializedSize() {
  3019. int size = memoizedSerializedSize;
  3020. if (size != -1) return size;
  3021. size = 0;
  3022. if (hasSize()) {
  3023. size += com.google.protobuf.CodedOutputStream
  3024. .computeInt64Size(1, getSize());
  3025. }
  3026. if (hasOffset()) {
  3027. size += com.google.protobuf.CodedOutputStream
  3028. .computeInt64Size(2, getOffset());
  3029. }
  3030. if (hasName()) {
  3031. size += com.google.protobuf.CodedOutputStream
  3032. .computeStringSize(3, getName());
  3033. }
  3034. for (net.osmand.binary.OsmandIndex.MapLevel element : getLevelsList()) {
  3035. size += com.google.protobuf.CodedOutputStream
  3036. .computeMessageSize(5, element);
  3037. }
  3038. memoizedSerializedSize = size;
  3039. return size;
  3040. }
  3041. public static net.osmand.binary.OsmandIndex.MapPart parseFrom(
  3042. com.google.protobuf.ByteString data)
  3043. throws com.google.protobuf.InvalidProtocolBufferException {
  3044. return newBuilder().mergeFrom(data).buildParsed();
  3045. }
  3046. public static net.osmand.binary.OsmandIndex.MapPart parseFrom(
  3047. com.google.protobuf.ByteString data,
  3048. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3049. throws com.google.protobuf.InvalidProtocolBufferException {
  3050. return newBuilder().mergeFrom(data, extensionRegistry)
  3051. .buildParsed();
  3052. }
  3053. public static net.osmand.binary.OsmandIndex.MapPart parseFrom(byte[] data)
  3054. throws com.google.protobuf.InvalidProtocolBufferException {
  3055. return newBuilder().mergeFrom(data).buildParsed();
  3056. }
  3057. public static net.osmand.binary.OsmandIndex.MapPart parseFrom(
  3058. byte[] data,
  3059. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3060. throws com.google.protobuf.InvalidProtocolBufferException {
  3061. return newBuilder().mergeFrom(data, extensionRegistry)
  3062. .buildParsed();
  3063. }
  3064. public static net.osmand.binary.OsmandIndex.MapPart parseFrom(java.io.InputStream input)
  3065. throws java.io.IOException {
  3066. return newBuilder().mergeFrom(input).buildParsed();
  3067. }
  3068. public static net.osmand.binary.OsmandIndex.MapPart parseFrom(
  3069. java.io.InputStream input,
  3070. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3071. throws java.io.IOException {
  3072. return newBuilder().mergeFrom(input, extensionRegistry)
  3073. .buildParsed();
  3074. }
  3075. public static net.osmand.binary.OsmandIndex.MapPart parseDelimitedFrom(java.io.InputStream input)
  3076. throws java.io.IOException {
  3077. Builder builder = newBuilder();
  3078. if (builder.mergeDelimitedFrom(input)) {
  3079. return builder.buildParsed();
  3080. } else {
  3081. return null;
  3082. }
  3083. }
  3084. public static net.osmand.binary.OsmandIndex.MapPart parseDelimitedFrom(
  3085. java.io.InputStream input,
  3086. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3087. throws java.io.IOException {
  3088. Builder builder = newBuilder();
  3089. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  3090. return builder.buildParsed();
  3091. } else {
  3092. return null;
  3093. }
  3094. }
  3095. public static net.osmand.binary.OsmandIndex.MapPart parseFrom(
  3096. com.google.protobuf.CodedInputStream input)
  3097. throws java.io.IOException {
  3098. return newBuilder().mergeFrom(input).buildParsed();
  3099. }
  3100. public static net.osmand.binary.OsmandIndex.MapPart parseFrom(
  3101. com.google.protobuf.CodedInputStream input,
  3102. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3103. throws java.io.IOException {
  3104. return newBuilder().mergeFrom(input, extensionRegistry)
  3105. .buildParsed();
  3106. }
  3107. public static Builder newBuilder() { return Builder.create(); }
  3108. @Override
  3109. public Builder newBuilderForType() { return newBuilder(); }
  3110. public static Builder newBuilder(net.osmand.binary.OsmandIndex.MapPart prototype) {
  3111. return newBuilder().mergeFrom(prototype);
  3112. }
  3113. @Override
  3114. public Builder toBuilder() { return newBuilder(this); }
  3115. public static final class Builder extends
  3116. com.google.protobuf.GeneratedMessageLite.Builder<
  3117. net.osmand.binary.OsmandIndex.MapPart, Builder> {
  3118. private net.osmand.binary.OsmandIndex.MapPart result;
  3119. // Construct using net.osmand.binary.OsmandIndex.MapPart.newBuilder()
  3120. private Builder() {}
  3121. private static Builder create() {
  3122. Builder builder = new Builder();
  3123. builder.result = new net.osmand.binary.OsmandIndex.MapPart();
  3124. return builder;
  3125. }
  3126. @Override
  3127. protected net.osmand.binary.OsmandIndex.MapPart internalGetResult() {
  3128. return result;
  3129. }
  3130. @Override
  3131. public Builder clear() {
  3132. if (result == null) {
  3133. throw new IllegalStateException(
  3134. "Cannot call clear() after build().");
  3135. }
  3136. result = new net.osmand.binary.OsmandIndex.MapPart();
  3137. return this;
  3138. }
  3139. @Override
  3140. public Builder clone() {
  3141. return create().mergeFrom(result);
  3142. }
  3143. @Override
  3144. public net.osmand.binary.OsmandIndex.MapPart getDefaultInstanceForType() {
  3145. return net.osmand.binary.OsmandIndex.MapPart.getDefaultInstance();
  3146. }
  3147. @Override
  3148. public boolean isInitialized() {
  3149. return result.isInitialized();
  3150. }
  3151. @Override
  3152. public net.osmand.binary.OsmandIndex.MapPart build() {
  3153. if (result != null && !isInitialized()) {
  3154. throw newUninitializedMessageException(result);
  3155. }
  3156. return buildPartial();
  3157. }
  3158. private net.osmand.binary.OsmandIndex.MapPart buildParsed()
  3159. throws com.google.protobuf.InvalidProtocolBufferException {
  3160. if (!isInitialized()) {
  3161. throw newUninitializedMessageException(
  3162. result).asInvalidProtocolBufferException();
  3163. }
  3164. return buildPartial();
  3165. }
  3166. @Override
  3167. public net.osmand.binary.OsmandIndex.MapPart buildPartial() {
  3168. if (result == null) {
  3169. throw new IllegalStateException(
  3170. "build() has already been called on this Builder.");
  3171. }
  3172. if (result.levels_ != java.util.Collections.EMPTY_LIST) {
  3173. result.levels_ =
  3174. java.util.Collections.unmodifiableList(result.levels_);
  3175. }
  3176. net.osmand.binary.OsmandIndex.MapPart returnMe = result;
  3177. result = null;
  3178. return returnMe;
  3179. }
  3180. @Override
  3181. public Builder mergeFrom(net.osmand.binary.OsmandIndex.MapPart other) {
  3182. if (other == net.osmand.binary.OsmandIndex.MapPart.getDefaultInstance()) return this;
  3183. if (other.hasSize()) {
  3184. setSize(other.getSize());
  3185. }
  3186. if (other.hasOffset()) {
  3187. setOffset(other.getOffset());
  3188. }
  3189. if (other.hasName()) {
  3190. setName(other.getName());
  3191. }
  3192. if (!other.levels_.isEmpty()) {
  3193. if (result.levels_.isEmpty()) {
  3194. result.levels_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapLevel>();
  3195. }
  3196. result.levels_.addAll(other.levels_);
  3197. }
  3198. return this;
  3199. }
  3200. @Override
  3201. public Builder mergeFrom(
  3202. com.google.protobuf.CodedInputStream input,
  3203. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3204. throws java.io.IOException {
  3205. while (true) {
  3206. int tag = input.readTag();
  3207. switch (tag) {
  3208. case 0:
  3209. return this;
  3210. default: {
  3211. if (!parseUnknownField(input, extensionRegistry, tag)) {
  3212. return this;
  3213. }
  3214. break;
  3215. }
  3216. case 8: {
  3217. setSize(input.readInt64());
  3218. break;
  3219. }
  3220. case 16: {
  3221. setOffset(input.readInt64());
  3222. break;
  3223. }
  3224. case 26: {
  3225. setName(input.readString());
  3226. break;
  3227. }
  3228. case 42: {
  3229. net.osmand.binary.OsmandIndex.MapLevel.Builder subBuilder = net.osmand.binary.OsmandIndex.MapLevel.newBuilder();
  3230. input.readMessage(subBuilder, extensionRegistry);
  3231. addLevels(subBuilder.buildPartial());
  3232. break;
  3233. }
  3234. }
  3235. }
  3236. }
  3237. // required int64 size = 1;
  3238. public boolean hasSize() {
  3239. return result.hasSize();
  3240. }
  3241. public long getSize() {
  3242. return result.getSize();
  3243. }
  3244. public Builder setSize(long value) {
  3245. result.hasSize = true;
  3246. result.size_ = value;
  3247. return this;
  3248. }
  3249. public Builder clearSize() {
  3250. result.hasSize = false;
  3251. result.size_ = 0L;
  3252. return this;
  3253. }
  3254. // required int64 offset = 2;
  3255. public boolean hasOffset() {
  3256. return result.hasOffset();
  3257. }
  3258. public long getOffset() {
  3259. return result.getOffset();
  3260. }
  3261. public Builder setOffset(long value) {
  3262. result.hasOffset = true;
  3263. result.offset_ = value;
  3264. return this;
  3265. }
  3266. public Builder clearOffset() {
  3267. result.hasOffset = false;
  3268. result.offset_ = 0L;
  3269. return this;
  3270. }
  3271. // optional string name = 3;
  3272. public boolean hasName() {
  3273. return result.hasName();
  3274. }
  3275. public java.lang.String getName() {
  3276. return result.getName();
  3277. }
  3278. public Builder setName(java.lang.String value) {
  3279. if (value == null) {
  3280. throw new NullPointerException();
  3281. }
  3282. result.hasName = true;
  3283. result.name_ = value;
  3284. return this;
  3285. }
  3286. public Builder clearName() {
  3287. result.hasName = false;
  3288. result.name_ = getDefaultInstance().getName();
  3289. return this;
  3290. }
  3291. // repeated .MapLevel levels = 5;
  3292. public java.util.List<net.osmand.binary.OsmandIndex.MapLevel> getLevelsList() {
  3293. return java.util.Collections.unmodifiableList(result.levels_);
  3294. }
  3295. public int getLevelsCount() {
  3296. return result.getLevelsCount();
  3297. }
  3298. public net.osmand.binary.OsmandIndex.MapLevel getLevels(int index) {
  3299. return result.getLevels(index);
  3300. }
  3301. public Builder setLevels(int index, net.osmand.binary.OsmandIndex.MapLevel value) {
  3302. if (value == null) {
  3303. throw new NullPointerException();
  3304. }
  3305. result.levels_.set(index, value);
  3306. return this;
  3307. }
  3308. public Builder setLevels(int index, net.osmand.binary.OsmandIndex.MapLevel.Builder builderForValue) {
  3309. result.levels_.set(index, builderForValue.build());
  3310. return this;
  3311. }
  3312. public Builder addLevels(net.osmand.binary.OsmandIndex.MapLevel value) {
  3313. if (value == null) {
  3314. throw new NullPointerException();
  3315. }
  3316. if (result.levels_.isEmpty()) {
  3317. result.levels_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapLevel>();
  3318. }
  3319. result.levels_.add(value);
  3320. return this;
  3321. }
  3322. public Builder addLevels(net.osmand.binary.OsmandIndex.MapLevel.Builder builderForValue) {
  3323. if (result.levels_.isEmpty()) {
  3324. result.levels_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapLevel>();
  3325. }
  3326. result.levels_.add(builderForValue.build());
  3327. return this;
  3328. }
  3329. public Builder addAllLevels(
  3330. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.MapLevel> values) {
  3331. if (result.levels_.isEmpty()) {
  3332. result.levels_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.MapLevel>();
  3333. }
  3334. super.addAll(values, result.levels_);
  3335. return this;
  3336. }
  3337. public Builder clearLevels() {
  3338. result.levels_ = java.util.Collections.emptyList();
  3339. return this;
  3340. }
  3341. // @@protoc_insertion_point(builder_scope:MapPart)
  3342. }
  3343. static {
  3344. defaultInstance = new MapPart(true);
  3345. net.osmand.binary.OsmandIndex.internalForceInit();
  3346. defaultInstance.initFields();
  3347. }
  3348. // @@protoc_insertion_point(class_scope:MapPart)
  3349. }
  3350. public static final class RoutingSubregion extends
  3351. com.google.protobuf.GeneratedMessageLite {
  3352. // Use RoutingSubregion.newBuilder() to construct.
  3353. private RoutingSubregion() {
  3354. initFields();
  3355. }
  3356. private RoutingSubregion(boolean noInit) {}
  3357. private static final RoutingSubregion defaultInstance;
  3358. public static RoutingSubregion getDefaultInstance() {
  3359. return defaultInstance;
  3360. }
  3361. @Override
  3362. public RoutingSubregion getDefaultInstanceForType() {
  3363. return defaultInstance;
  3364. }
  3365. // required int64 size = 1;
  3366. public static final int SIZE_FIELD_NUMBER = 1;
  3367. private boolean hasSize;
  3368. private long size_ = 0L;
  3369. public boolean hasSize() { return hasSize; }
  3370. public long getSize() { return size_; }
  3371. // required int64 offset = 2;
  3372. public static final int OFFSET_FIELD_NUMBER = 2;
  3373. private boolean hasOffset;
  3374. private long offset_ = 0L;
  3375. public boolean hasOffset() { return hasOffset; }
  3376. public long getOffset() { return offset_; }
  3377. // optional bool basemap = 3;
  3378. public static final int BASEMAP_FIELD_NUMBER = 3;
  3379. private boolean hasBasemap;
  3380. private boolean basemap_ = false;
  3381. public boolean hasBasemap() { return hasBasemap; }
  3382. public boolean getBasemap() { return basemap_; }
  3383. // required int32 left = 4;
  3384. public static final int LEFT_FIELD_NUMBER = 4;
  3385. private boolean hasLeft;
  3386. private int left_ = 0;
  3387. public boolean hasLeft() { return hasLeft; }
  3388. public int getLeft() { return left_; }
  3389. // required int32 right = 5;
  3390. public static final int RIGHT_FIELD_NUMBER = 5;
  3391. private boolean hasRight;
  3392. private int right_ = 0;
  3393. public boolean hasRight() { return hasRight; }
  3394. public int getRight() { return right_; }
  3395. // required int32 top = 6;
  3396. public static final int TOP_FIELD_NUMBER = 6;
  3397. private boolean hasTop;
  3398. private int top_ = 0;
  3399. public boolean hasTop() { return hasTop; }
  3400. public int getTop() { return top_; }
  3401. // required int32 bottom = 7;
  3402. public static final int BOTTOM_FIELD_NUMBER = 7;
  3403. private boolean hasBottom;
  3404. private int bottom_ = 0;
  3405. public boolean hasBottom() { return hasBottom; }
  3406. public int getBottom() { return bottom_; }
  3407. // required uint32 shifToData = 8;
  3408. public static final int SHIFTODATA_FIELD_NUMBER = 8;
  3409. private boolean hasShifToData;
  3410. private int shifToData_ = 0;
  3411. public boolean hasShifToData() { return hasShifToData; }
  3412. public int getShifToData() { return shifToData_; }
  3413. private void initFields() {
  3414. }
  3415. @Override
  3416. public final boolean isInitialized() {
  3417. if (!hasSize) return false;
  3418. if (!hasOffset) return false;
  3419. if (!hasLeft) return false;
  3420. if (!hasRight) return false;
  3421. if (!hasTop) return false;
  3422. if (!hasBottom) return false;
  3423. if (!hasShifToData) return false;
  3424. return true;
  3425. }
  3426. @Override
  3427. public void writeTo(com.google.protobuf.CodedOutputStream output)
  3428. throws java.io.IOException {
  3429. getSerializedSize();
  3430. if (hasSize()) {
  3431. output.writeInt64(1, getSize());
  3432. }
  3433. if (hasOffset()) {
  3434. output.writeInt64(2, getOffset());
  3435. }
  3436. if (hasBasemap()) {
  3437. output.writeBool(3, getBasemap());
  3438. }
  3439. if (hasLeft()) {
  3440. output.writeInt32(4, getLeft());
  3441. }
  3442. if (hasRight()) {
  3443. output.writeInt32(5, getRight());
  3444. }
  3445. if (hasTop()) {
  3446. output.writeInt32(6, getTop());
  3447. }
  3448. if (hasBottom()) {
  3449. output.writeInt32(7, getBottom());
  3450. }
  3451. if (hasShifToData()) {
  3452. output.writeUInt32(8, getShifToData());
  3453. }
  3454. }
  3455. private int memoizedSerializedSize = -1;
  3456. @Override
  3457. public int getSerializedSize() {
  3458. int size = memoizedSerializedSize;
  3459. if (size != -1) return size;
  3460. size = 0;
  3461. if (hasSize()) {
  3462. size += com.google.protobuf.CodedOutputStream
  3463. .computeInt64Size(1, getSize());
  3464. }
  3465. if (hasOffset()) {
  3466. size += com.google.protobuf.CodedOutputStream
  3467. .computeInt64Size(2, getOffset());
  3468. }
  3469. if (hasBasemap()) {
  3470. size += com.google.protobuf.CodedOutputStream
  3471. .computeBoolSize(3, getBasemap());
  3472. }
  3473. if (hasLeft()) {
  3474. size += com.google.protobuf.CodedOutputStream
  3475. .computeInt32Size(4, getLeft());
  3476. }
  3477. if (hasRight()) {
  3478. size += com.google.protobuf.CodedOutputStream
  3479. .computeInt32Size(5, getRight());
  3480. }
  3481. if (hasTop()) {
  3482. size += com.google.protobuf.CodedOutputStream
  3483. .computeInt32Size(6, getTop());
  3484. }
  3485. if (hasBottom()) {
  3486. size += com.google.protobuf.CodedOutputStream
  3487. .computeInt32Size(7, getBottom());
  3488. }
  3489. if (hasShifToData()) {
  3490. size += com.google.protobuf.CodedOutputStream
  3491. .computeUInt32Size(8, getShifToData());
  3492. }
  3493. memoizedSerializedSize = size;
  3494. return size;
  3495. }
  3496. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseFrom(
  3497. com.google.protobuf.ByteString data)
  3498. throws com.google.protobuf.InvalidProtocolBufferException {
  3499. return newBuilder().mergeFrom(data).buildParsed();
  3500. }
  3501. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseFrom(
  3502. com.google.protobuf.ByteString data,
  3503. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3504. throws com.google.protobuf.InvalidProtocolBufferException {
  3505. return newBuilder().mergeFrom(data, extensionRegistry)
  3506. .buildParsed();
  3507. }
  3508. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseFrom(byte[] data)
  3509. throws com.google.protobuf.InvalidProtocolBufferException {
  3510. return newBuilder().mergeFrom(data).buildParsed();
  3511. }
  3512. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseFrom(
  3513. byte[] data,
  3514. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3515. throws com.google.protobuf.InvalidProtocolBufferException {
  3516. return newBuilder().mergeFrom(data, extensionRegistry)
  3517. .buildParsed();
  3518. }
  3519. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseFrom(java.io.InputStream input)
  3520. throws java.io.IOException {
  3521. return newBuilder().mergeFrom(input).buildParsed();
  3522. }
  3523. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseFrom(
  3524. java.io.InputStream input,
  3525. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3526. throws java.io.IOException {
  3527. return newBuilder().mergeFrom(input, extensionRegistry)
  3528. .buildParsed();
  3529. }
  3530. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseDelimitedFrom(java.io.InputStream input)
  3531. throws java.io.IOException {
  3532. Builder builder = newBuilder();
  3533. if (builder.mergeDelimitedFrom(input)) {
  3534. return builder.buildParsed();
  3535. } else {
  3536. return null;
  3537. }
  3538. }
  3539. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseDelimitedFrom(
  3540. java.io.InputStream input,
  3541. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3542. throws java.io.IOException {
  3543. Builder builder = newBuilder();
  3544. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  3545. return builder.buildParsed();
  3546. } else {
  3547. return null;
  3548. }
  3549. }
  3550. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseFrom(
  3551. com.google.protobuf.CodedInputStream input)
  3552. throws java.io.IOException {
  3553. return newBuilder().mergeFrom(input).buildParsed();
  3554. }
  3555. public static net.osmand.binary.OsmandIndex.RoutingSubregion parseFrom(
  3556. com.google.protobuf.CodedInputStream input,
  3557. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3558. throws java.io.IOException {
  3559. return newBuilder().mergeFrom(input, extensionRegistry)
  3560. .buildParsed();
  3561. }
  3562. public static Builder newBuilder() { return Builder.create(); }
  3563. @Override
  3564. public Builder newBuilderForType() { return newBuilder(); }
  3565. public static Builder newBuilder(net.osmand.binary.OsmandIndex.RoutingSubregion prototype) {
  3566. return newBuilder().mergeFrom(prototype);
  3567. }
  3568. @Override
  3569. public Builder toBuilder() { return newBuilder(this); }
  3570. public static final class Builder extends
  3571. com.google.protobuf.GeneratedMessageLite.Builder<
  3572. net.osmand.binary.OsmandIndex.RoutingSubregion, Builder> {
  3573. private net.osmand.binary.OsmandIndex.RoutingSubregion result;
  3574. // Construct using net.osmand.binary.OsmandIndex.RoutingSubregion.newBuilder()
  3575. private Builder() {}
  3576. private static Builder create() {
  3577. Builder builder = new Builder();
  3578. builder.result = new net.osmand.binary.OsmandIndex.RoutingSubregion();
  3579. return builder;
  3580. }
  3581. @Override
  3582. protected net.osmand.binary.OsmandIndex.RoutingSubregion internalGetResult() {
  3583. return result;
  3584. }
  3585. @Override
  3586. public Builder clear() {
  3587. if (result == null) {
  3588. throw new IllegalStateException(
  3589. "Cannot call clear() after build().");
  3590. }
  3591. result = new net.osmand.binary.OsmandIndex.RoutingSubregion();
  3592. return this;
  3593. }
  3594. @Override
  3595. public Builder clone() {
  3596. return create().mergeFrom(result);
  3597. }
  3598. @Override
  3599. public net.osmand.binary.OsmandIndex.RoutingSubregion getDefaultInstanceForType() {
  3600. return net.osmand.binary.OsmandIndex.RoutingSubregion.getDefaultInstance();
  3601. }
  3602. @Override
  3603. public boolean isInitialized() {
  3604. return result.isInitialized();
  3605. }
  3606. @Override
  3607. public net.osmand.binary.OsmandIndex.RoutingSubregion build() {
  3608. if (result != null && !isInitialized()) {
  3609. throw newUninitializedMessageException(result);
  3610. }
  3611. return buildPartial();
  3612. }
  3613. private net.osmand.binary.OsmandIndex.RoutingSubregion buildParsed()
  3614. throws com.google.protobuf.InvalidProtocolBufferException {
  3615. if (!isInitialized()) {
  3616. throw newUninitializedMessageException(
  3617. result).asInvalidProtocolBufferException();
  3618. }
  3619. return buildPartial();
  3620. }
  3621. @Override
  3622. public net.osmand.binary.OsmandIndex.RoutingSubregion buildPartial() {
  3623. if (result == null) {
  3624. throw new IllegalStateException(
  3625. "build() has already been called on this Builder.");
  3626. }
  3627. net.osmand.binary.OsmandIndex.RoutingSubregion returnMe = result;
  3628. result = null;
  3629. return returnMe;
  3630. }
  3631. @Override
  3632. public Builder mergeFrom(net.osmand.binary.OsmandIndex.RoutingSubregion other) {
  3633. if (other == net.osmand.binary.OsmandIndex.RoutingSubregion.getDefaultInstance()) return this;
  3634. if (other.hasSize()) {
  3635. setSize(other.getSize());
  3636. }
  3637. if (other.hasOffset()) {
  3638. setOffset(other.getOffset());
  3639. }
  3640. if (other.hasBasemap()) {
  3641. setBasemap(other.getBasemap());
  3642. }
  3643. if (other.hasLeft()) {
  3644. setLeft(other.getLeft());
  3645. }
  3646. if (other.hasRight()) {
  3647. setRight(other.getRight());
  3648. }
  3649. if (other.hasTop()) {
  3650. setTop(other.getTop());
  3651. }
  3652. if (other.hasBottom()) {
  3653. setBottom(other.getBottom());
  3654. }
  3655. if (other.hasShifToData()) {
  3656. setShifToData(other.getShifToData());
  3657. }
  3658. return this;
  3659. }
  3660. @Override
  3661. public Builder mergeFrom(
  3662. com.google.protobuf.CodedInputStream input,
  3663. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3664. throws java.io.IOException {
  3665. while (true) {
  3666. int tag = input.readTag();
  3667. switch (tag) {
  3668. case 0:
  3669. return this;
  3670. default: {
  3671. if (!parseUnknownField(input, extensionRegistry, tag)) {
  3672. return this;
  3673. }
  3674. break;
  3675. }
  3676. case 8: {
  3677. setSize(input.readInt64());
  3678. break;
  3679. }
  3680. case 16: {
  3681. setOffset(input.readInt64());
  3682. break;
  3683. }
  3684. case 24: {
  3685. setBasemap(input.readBool());
  3686. break;
  3687. }
  3688. case 32: {
  3689. setLeft(input.readInt32());
  3690. break;
  3691. }
  3692. case 40: {
  3693. setRight(input.readInt32());
  3694. break;
  3695. }
  3696. case 48: {
  3697. setTop(input.readInt32());
  3698. break;
  3699. }
  3700. case 56: {
  3701. setBottom(input.readInt32());
  3702. break;
  3703. }
  3704. case 64: {
  3705. setShifToData(input.readUInt32());
  3706. break;
  3707. }
  3708. }
  3709. }
  3710. }
  3711. // required int64 size = 1;
  3712. public boolean hasSize() {
  3713. return result.hasSize();
  3714. }
  3715. public long getSize() {
  3716. return result.getSize();
  3717. }
  3718. public Builder setSize(long value) {
  3719. result.hasSize = true;
  3720. result.size_ = value;
  3721. return this;
  3722. }
  3723. public Builder clearSize() {
  3724. result.hasSize = false;
  3725. result.size_ = 0L;
  3726. return this;
  3727. }
  3728. // required int64 offset = 2;
  3729. public boolean hasOffset() {
  3730. return result.hasOffset();
  3731. }
  3732. public long getOffset() {
  3733. return result.getOffset();
  3734. }
  3735. public Builder setOffset(long value) {
  3736. result.hasOffset = true;
  3737. result.offset_ = value;
  3738. return this;
  3739. }
  3740. public Builder clearOffset() {
  3741. result.hasOffset = false;
  3742. result.offset_ = 0L;
  3743. return this;
  3744. }
  3745. // optional bool basemap = 3;
  3746. public boolean hasBasemap() {
  3747. return result.hasBasemap();
  3748. }
  3749. public boolean getBasemap() {
  3750. return result.getBasemap();
  3751. }
  3752. public Builder setBasemap(boolean value) {
  3753. result.hasBasemap = true;
  3754. result.basemap_ = value;
  3755. return this;
  3756. }
  3757. public Builder clearBasemap() {
  3758. result.hasBasemap = false;
  3759. result.basemap_ = false;
  3760. return this;
  3761. }
  3762. // required int32 left = 4;
  3763. public boolean hasLeft() {
  3764. return result.hasLeft();
  3765. }
  3766. public int getLeft() {
  3767. return result.getLeft();
  3768. }
  3769. public Builder setLeft(int value) {
  3770. result.hasLeft = true;
  3771. result.left_ = value;
  3772. return this;
  3773. }
  3774. public Builder clearLeft() {
  3775. result.hasLeft = false;
  3776. result.left_ = 0;
  3777. return this;
  3778. }
  3779. // required int32 right = 5;
  3780. public boolean hasRight() {
  3781. return result.hasRight();
  3782. }
  3783. public int getRight() {
  3784. return result.getRight();
  3785. }
  3786. public Builder setRight(int value) {
  3787. result.hasRight = true;
  3788. result.right_ = value;
  3789. return this;
  3790. }
  3791. public Builder clearRight() {
  3792. result.hasRight = false;
  3793. result.right_ = 0;
  3794. return this;
  3795. }
  3796. // required int32 top = 6;
  3797. public boolean hasTop() {
  3798. return result.hasTop();
  3799. }
  3800. public int getTop() {
  3801. return result.getTop();
  3802. }
  3803. public Builder setTop(int value) {
  3804. result.hasTop = true;
  3805. result.top_ = value;
  3806. return this;
  3807. }
  3808. public Builder clearTop() {
  3809. result.hasTop = false;
  3810. result.top_ = 0;
  3811. return this;
  3812. }
  3813. // required int32 bottom = 7;
  3814. public boolean hasBottom() {
  3815. return result.hasBottom();
  3816. }
  3817. public int getBottom() {
  3818. return result.getBottom();
  3819. }
  3820. public Builder setBottom(int value) {
  3821. result.hasBottom = true;
  3822. result.bottom_ = value;
  3823. return this;
  3824. }
  3825. public Builder clearBottom() {
  3826. result.hasBottom = false;
  3827. result.bottom_ = 0;
  3828. return this;
  3829. }
  3830. // required uint32 shifToData = 8;
  3831. public boolean hasShifToData() {
  3832. return result.hasShifToData();
  3833. }
  3834. public int getShifToData() {
  3835. return result.getShifToData();
  3836. }
  3837. public Builder setShifToData(int value) {
  3838. result.hasShifToData = true;
  3839. result.shifToData_ = value;
  3840. return this;
  3841. }
  3842. public Builder clearShifToData() {
  3843. result.hasShifToData = false;
  3844. result.shifToData_ = 0;
  3845. return this;
  3846. }
  3847. // @@protoc_insertion_point(builder_scope:RoutingSubregion)
  3848. }
  3849. static {
  3850. defaultInstance = new RoutingSubregion(true);
  3851. net.osmand.binary.OsmandIndex.internalForceInit();
  3852. defaultInstance.initFields();
  3853. }
  3854. // @@protoc_insertion_point(class_scope:RoutingSubregion)
  3855. }
  3856. public static final class RoutingPart extends
  3857. com.google.protobuf.GeneratedMessageLite {
  3858. // Use RoutingPart.newBuilder() to construct.
  3859. private RoutingPart() {
  3860. initFields();
  3861. }
  3862. private RoutingPart(boolean noInit) {}
  3863. private static final RoutingPart defaultInstance;
  3864. public static RoutingPart getDefaultInstance() {
  3865. return defaultInstance;
  3866. }
  3867. @Override
  3868. public RoutingPart getDefaultInstanceForType() {
  3869. return defaultInstance;
  3870. }
  3871. // required int64 size = 1;
  3872. public static final int SIZE_FIELD_NUMBER = 1;
  3873. private boolean hasSize;
  3874. private long size_ = 0L;
  3875. public boolean hasSize() { return hasSize; }
  3876. public long getSize() { return size_; }
  3877. // required int64 offset = 2;
  3878. public static final int OFFSET_FIELD_NUMBER = 2;
  3879. private boolean hasOffset;
  3880. private long offset_ = 0L;
  3881. public boolean hasOffset() { return hasOffset; }
  3882. public long getOffset() { return offset_; }
  3883. // optional string name = 3;
  3884. public static final int NAME_FIELD_NUMBER = 3;
  3885. private boolean hasName;
  3886. private java.lang.String name_ = "";
  3887. public boolean hasName() { return hasName; }
  3888. public java.lang.String getName() { return name_; }
  3889. // repeated .RoutingSubregion subregions = 5;
  3890. public static final int SUBREGIONS_FIELD_NUMBER = 5;
  3891. private java.util.List<net.osmand.binary.OsmandIndex.RoutingSubregion> subregions_ =
  3892. java.util.Collections.emptyList();
  3893. public java.util.List<net.osmand.binary.OsmandIndex.RoutingSubregion> getSubregionsList() {
  3894. return subregions_;
  3895. }
  3896. public int getSubregionsCount() { return subregions_.size(); }
  3897. public net.osmand.binary.OsmandIndex.RoutingSubregion getSubregions(int index) {
  3898. return subregions_.get(index);
  3899. }
  3900. private void initFields() {
  3901. }
  3902. @Override
  3903. public final boolean isInitialized() {
  3904. if (!hasSize) return false;
  3905. if (!hasOffset) return false;
  3906. for (net.osmand.binary.OsmandIndex.RoutingSubregion element : getSubregionsList()) {
  3907. if (!element.isInitialized()) return false;
  3908. }
  3909. return true;
  3910. }
  3911. @Override
  3912. public void writeTo(com.google.protobuf.CodedOutputStream output)
  3913. throws java.io.IOException {
  3914. getSerializedSize();
  3915. if (hasSize()) {
  3916. output.writeInt64(1, getSize());
  3917. }
  3918. if (hasOffset()) {
  3919. output.writeInt64(2, getOffset());
  3920. }
  3921. if (hasName()) {
  3922. output.writeString(3, getName());
  3923. }
  3924. for (net.osmand.binary.OsmandIndex.RoutingSubregion element : getSubregionsList()) {
  3925. output.writeMessage(5, element);
  3926. }
  3927. }
  3928. private int memoizedSerializedSize = -1;
  3929. @Override
  3930. public int getSerializedSize() {
  3931. int size = memoizedSerializedSize;
  3932. if (size != -1) return size;
  3933. size = 0;
  3934. if (hasSize()) {
  3935. size += com.google.protobuf.CodedOutputStream
  3936. .computeInt64Size(1, getSize());
  3937. }
  3938. if (hasOffset()) {
  3939. size += com.google.protobuf.CodedOutputStream
  3940. .computeInt64Size(2, getOffset());
  3941. }
  3942. if (hasName()) {
  3943. size += com.google.protobuf.CodedOutputStream
  3944. .computeStringSize(3, getName());
  3945. }
  3946. for (net.osmand.binary.OsmandIndex.RoutingSubregion element : getSubregionsList()) {
  3947. size += com.google.protobuf.CodedOutputStream
  3948. .computeMessageSize(5, element);
  3949. }
  3950. memoizedSerializedSize = size;
  3951. return size;
  3952. }
  3953. public static net.osmand.binary.OsmandIndex.RoutingPart parseFrom(
  3954. com.google.protobuf.ByteString data)
  3955. throws com.google.protobuf.InvalidProtocolBufferException {
  3956. return newBuilder().mergeFrom(data).buildParsed();
  3957. }
  3958. public static net.osmand.binary.OsmandIndex.RoutingPart parseFrom(
  3959. com.google.protobuf.ByteString data,
  3960. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3961. throws com.google.protobuf.InvalidProtocolBufferException {
  3962. return newBuilder().mergeFrom(data, extensionRegistry)
  3963. .buildParsed();
  3964. }
  3965. public static net.osmand.binary.OsmandIndex.RoutingPart parseFrom(byte[] data)
  3966. throws com.google.protobuf.InvalidProtocolBufferException {
  3967. return newBuilder().mergeFrom(data).buildParsed();
  3968. }
  3969. public static net.osmand.binary.OsmandIndex.RoutingPart parseFrom(
  3970. byte[] data,
  3971. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3972. throws com.google.protobuf.InvalidProtocolBufferException {
  3973. return newBuilder().mergeFrom(data, extensionRegistry)
  3974. .buildParsed();
  3975. }
  3976. public static net.osmand.binary.OsmandIndex.RoutingPart parseFrom(java.io.InputStream input)
  3977. throws java.io.IOException {
  3978. return newBuilder().mergeFrom(input).buildParsed();
  3979. }
  3980. public static net.osmand.binary.OsmandIndex.RoutingPart parseFrom(
  3981. java.io.InputStream input,
  3982. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3983. throws java.io.IOException {
  3984. return newBuilder().mergeFrom(input, extensionRegistry)
  3985. .buildParsed();
  3986. }
  3987. public static net.osmand.binary.OsmandIndex.RoutingPart parseDelimitedFrom(java.io.InputStream input)
  3988. throws java.io.IOException {
  3989. Builder builder = newBuilder();
  3990. if (builder.mergeDelimitedFrom(input)) {
  3991. return builder.buildParsed();
  3992. } else {
  3993. return null;
  3994. }
  3995. }
  3996. public static net.osmand.binary.OsmandIndex.RoutingPart parseDelimitedFrom(
  3997. java.io.InputStream input,
  3998. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  3999. throws java.io.IOException {
  4000. Builder builder = newBuilder();
  4001. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  4002. return builder.buildParsed();
  4003. } else {
  4004. return null;
  4005. }
  4006. }
  4007. public static net.osmand.binary.OsmandIndex.RoutingPart parseFrom(
  4008. com.google.protobuf.CodedInputStream input)
  4009. throws java.io.IOException {
  4010. return newBuilder().mergeFrom(input).buildParsed();
  4011. }
  4012. public static net.osmand.binary.OsmandIndex.RoutingPart parseFrom(
  4013. com.google.protobuf.CodedInputStream input,
  4014. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  4015. throws java.io.IOException {
  4016. return newBuilder().mergeFrom(input, extensionRegistry)
  4017. .buildParsed();
  4018. }
  4019. public static Builder newBuilder() { return Builder.create(); }
  4020. @Override
  4021. public Builder newBuilderForType() { return newBuilder(); }
  4022. public static Builder newBuilder(net.osmand.binary.OsmandIndex.RoutingPart prototype) {
  4023. return newBuilder().mergeFrom(prototype);
  4024. }
  4025. @Override
  4026. public Builder toBuilder() { return newBuilder(this); }
  4027. public static final class Builder extends
  4028. com.google.protobuf.GeneratedMessageLite.Builder<
  4029. net.osmand.binary.OsmandIndex.RoutingPart, Builder> {
  4030. private net.osmand.binary.OsmandIndex.RoutingPart result;
  4031. // Construct using net.osmand.binary.OsmandIndex.RoutingPart.newBuilder()
  4032. private Builder() {}
  4033. private static Builder create() {
  4034. Builder builder = new Builder();
  4035. builder.result = new net.osmand.binary.OsmandIndex.RoutingPart();
  4036. return builder;
  4037. }
  4038. @Override
  4039. protected net.osmand.binary.OsmandIndex.RoutingPart internalGetResult() {
  4040. return result;
  4041. }
  4042. @Override
  4043. public Builder clear() {
  4044. if (result == null) {
  4045. throw new IllegalStateException(
  4046. "Cannot call clear() after build().");
  4047. }
  4048. result = new net.osmand.binary.OsmandIndex.RoutingPart();
  4049. return this;
  4050. }
  4051. @Override
  4052. public Builder clone() {
  4053. return create().mergeFrom(result);
  4054. }
  4055. @Override
  4056. public net.osmand.binary.OsmandIndex.RoutingPart getDefaultInstanceForType() {
  4057. return net.osmand.binary.OsmandIndex.RoutingPart.getDefaultInstance();
  4058. }
  4059. @Override
  4060. public boolean isInitialized() {
  4061. return result.isInitialized();
  4062. }
  4063. @Override
  4064. public net.osmand.binary.OsmandIndex.RoutingPart build() {
  4065. if (result != null && !isInitialized()) {
  4066. throw newUninitializedMessageException(result);
  4067. }
  4068. return buildPartial();
  4069. }
  4070. private net.osmand.binary.OsmandIndex.RoutingPart buildParsed()
  4071. throws com.google.protobuf.InvalidProtocolBufferException {
  4072. if (!isInitialized()) {
  4073. throw newUninitializedMessageException(
  4074. result).asInvalidProtocolBufferException();
  4075. }
  4076. return buildPartial();
  4077. }
  4078. @Override
  4079. public net.osmand.binary.OsmandIndex.RoutingPart buildPartial() {
  4080. if (result == null) {
  4081. throw new IllegalStateException(
  4082. "build() has already been called on this Builder.");
  4083. }
  4084. if (result.subregions_ != java.util.Collections.EMPTY_LIST) {
  4085. result.subregions_ =
  4086. java.util.Collections.unmodifiableList(result.subregions_);
  4087. }
  4088. net.osmand.binary.OsmandIndex.RoutingPart returnMe = result;
  4089. result = null;
  4090. return returnMe;
  4091. }
  4092. @Override
  4093. public Builder mergeFrom(net.osmand.binary.OsmandIndex.RoutingPart other) {
  4094. if (other == net.osmand.binary.OsmandIndex.RoutingPart.getDefaultInstance()) return this;
  4095. if (other.hasSize()) {
  4096. setSize(other.getSize());
  4097. }
  4098. if (other.hasOffset()) {
  4099. setOffset(other.getOffset());
  4100. }
  4101. if (other.hasName()) {
  4102. setName(other.getName());
  4103. }
  4104. if (!other.subregions_.isEmpty()) {
  4105. if (result.subregions_.isEmpty()) {
  4106. result.subregions_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingSubregion>();
  4107. }
  4108. result.subregions_.addAll(other.subregions_);
  4109. }
  4110. return this;
  4111. }
  4112. @Override
  4113. public Builder mergeFrom(
  4114. com.google.protobuf.CodedInputStream input,
  4115. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  4116. throws java.io.IOException {
  4117. while (true) {
  4118. int tag = input.readTag();
  4119. switch (tag) {
  4120. case 0:
  4121. return this;
  4122. default: {
  4123. if (!parseUnknownField(input, extensionRegistry, tag)) {
  4124. return this;
  4125. }
  4126. break;
  4127. }
  4128. case 8: {
  4129. setSize(input.readInt64());
  4130. break;
  4131. }
  4132. case 16: {
  4133. setOffset(input.readInt64());
  4134. break;
  4135. }
  4136. case 26: {
  4137. setName(input.readString());
  4138. break;
  4139. }
  4140. case 42: {
  4141. net.osmand.binary.OsmandIndex.RoutingSubregion.Builder subBuilder = net.osmand.binary.OsmandIndex.RoutingSubregion.newBuilder();
  4142. input.readMessage(subBuilder, extensionRegistry);
  4143. addSubregions(subBuilder.buildPartial());
  4144. break;
  4145. }
  4146. }
  4147. }
  4148. }
  4149. // required int64 size = 1;
  4150. public boolean hasSize() {
  4151. return result.hasSize();
  4152. }
  4153. public long getSize() {
  4154. return result.getSize();
  4155. }
  4156. public Builder setSize(long value) {
  4157. result.hasSize = true;
  4158. result.size_ = value;
  4159. return this;
  4160. }
  4161. public Builder clearSize() {
  4162. result.hasSize = false;
  4163. result.size_ = 0L;
  4164. return this;
  4165. }
  4166. // required int64 offset = 2;
  4167. public boolean hasOffset() {
  4168. return result.hasOffset();
  4169. }
  4170. public long getOffset() {
  4171. return result.getOffset();
  4172. }
  4173. public Builder setOffset(long value) {
  4174. result.hasOffset = true;
  4175. result.offset_ = value;
  4176. return this;
  4177. }
  4178. public Builder clearOffset() {
  4179. result.hasOffset = false;
  4180. result.offset_ = 0L;
  4181. return this;
  4182. }
  4183. // optional string name = 3;
  4184. public boolean hasName() {
  4185. return result.hasName();
  4186. }
  4187. public java.lang.String getName() {
  4188. return result.getName();
  4189. }
  4190. public Builder setName(java.lang.String value) {
  4191. if (value == null) {
  4192. throw new NullPointerException();
  4193. }
  4194. result.hasName = true;
  4195. result.name_ = value;
  4196. return this;
  4197. }
  4198. public Builder clearName() {
  4199. result.hasName = false;
  4200. result.name_ = getDefaultInstance().getName();
  4201. return this;
  4202. }
  4203. // repeated .RoutingSubregion subregions = 5;
  4204. public java.util.List<net.osmand.binary.OsmandIndex.RoutingSubregion> getSubregionsList() {
  4205. return java.util.Collections.unmodifiableList(result.subregions_);
  4206. }
  4207. public int getSubregionsCount() {
  4208. return result.getSubregionsCount();
  4209. }
  4210. public net.osmand.binary.OsmandIndex.RoutingSubregion getSubregions(int index) {
  4211. return result.getSubregions(index);
  4212. }
  4213. public Builder setSubregions(int index, net.osmand.binary.OsmandIndex.RoutingSubregion value) {
  4214. if (value == null) {
  4215. throw new NullPointerException();
  4216. }
  4217. result.subregions_.set(index, value);
  4218. return this;
  4219. }
  4220. public Builder setSubregions(int index, net.osmand.binary.OsmandIndex.RoutingSubregion.Builder builderForValue) {
  4221. result.subregions_.set(index, builderForValue.build());
  4222. return this;
  4223. }
  4224. public Builder addSubregions(net.osmand.binary.OsmandIndex.RoutingSubregion value) {
  4225. if (value == null) {
  4226. throw new NullPointerException();
  4227. }
  4228. if (result.subregions_.isEmpty()) {
  4229. result.subregions_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingSubregion>();
  4230. }
  4231. result.subregions_.add(value);
  4232. return this;
  4233. }
  4234. public Builder addSubregions(net.osmand.binary.OsmandIndex.RoutingSubregion.Builder builderForValue) {
  4235. if (result.subregions_.isEmpty()) {
  4236. result.subregions_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingSubregion>();
  4237. }
  4238. result.subregions_.add(builderForValue.build());
  4239. return this;
  4240. }
  4241. public Builder addAllSubregions(
  4242. java.lang.Iterable<? extends net.osmand.binary.OsmandIndex.RoutingSubregion> values) {
  4243. if (result.subregions_.isEmpty()) {
  4244. result.subregions_ = new java.util.ArrayList<net.osmand.binary.OsmandIndex.RoutingSubregion>();
  4245. }
  4246. super.addAll(values, result.subregions_);
  4247. return this;
  4248. }
  4249. public Builder clearSubregions() {
  4250. result.subregions_ = java.util.Collections.emptyList();
  4251. return this;
  4252. }
  4253. // @@protoc_insertion_point(builder_scope:RoutingPart)
  4254. }
  4255. static {
  4256. defaultInstance = new RoutingPart(true);
  4257. net.osmand.binary.OsmandIndex.internalForceInit();
  4258. defaultInstance.initFields();
  4259. }
  4260. // @@protoc_insertion_point(class_scope:RoutingPart)
  4261. }
  4262. public static final class TransportPart extends
  4263. com.google.protobuf.GeneratedMessageLite {
  4264. // Use TransportPart.newBuilder() to construct.
  4265. private TransportPart() {
  4266. initFields();
  4267. }
  4268. private TransportPart(boolean noInit) {}
  4269. private static final TransportPart defaultInstance;
  4270. public static TransportPart getDefaultInstance() {
  4271. return defaultInstance;
  4272. }
  4273. @Override
  4274. public TransportPart getDefaultInstanceForType() {
  4275. return defaultInstance;
  4276. }
  4277. // required int64 size = 1;
  4278. public static final int SIZE_FIELD_NUMBER = 1;
  4279. private boolean hasSize;
  4280. private long size_ = 0L;
  4281. public boolean hasSize() { return hasSize; }
  4282. public long getSize() { return size_; }
  4283. // required int64 offset = 2;
  4284. public static final int OFFSET_FIELD_NUMBER = 2;
  4285. private boolean hasOffset;
  4286. private long offset_ = 0L;
  4287. public boolean hasOffset() { return hasOffset; }
  4288. public long getOffset() { return offset_; }
  4289. // optional string name = 3;
  4290. public static final int NAME_FIELD_NUMBER = 3;
  4291. private boolean hasName;
  4292. private java.lang.String name_ = "";
  4293. public boolean hasName() { return hasName; }
  4294. public java.lang.String getName() { return name_; }
  4295. // optional int32 left = 4;
  4296. public static final int LEFT_FIELD_NUMBER = 4;
  4297. private boolean hasLeft;
  4298. private int left_ = 0;
  4299. public boolean hasLeft() { return hasLeft; }
  4300. public int getLeft() { return left_; }
  4301. // optional int32 right = 5;
  4302. public static final int RIGHT_FIELD_NUMBER = 5;
  4303. private boolean hasRight;
  4304. private int right_ = 0;
  4305. public boolean hasRight() { return hasRight; }
  4306. public int getRight() { return right_; }
  4307. // optional int32 top = 6;
  4308. public static final int TOP_FIELD_NUMBER = 6;
  4309. private boolean hasTop;
  4310. private int top_ = 0;
  4311. public boolean hasTop() { return hasTop; }
  4312. public int getTop() { return top_; }
  4313. // optional int32 bottom = 7;
  4314. public static final int BOTTOM_FIELD_NUMBER = 7;
  4315. private boolean hasBottom;
  4316. private int bottom_ = 0;
  4317. public boolean hasBottom() { return hasBottom; }
  4318. public int getBottom() { return bottom_; }
  4319. // optional uint32 stringTableOffset = 8;
  4320. public static final int STRINGTABLEOFFSET_FIELD_NUMBER = 8;
  4321. private boolean hasStringTableOffset;
  4322. private int stringTableOffset_ = 0;
  4323. public boolean hasStringTableOffset() { return hasStringTableOffset; }
  4324. public int getStringTableOffset() { return stringTableOffset_; }
  4325. // optional uint32 stringTableLength = 9;
  4326. public static final int STRINGTABLELENGTH_FIELD_NUMBER = 9;
  4327. private boolean hasStringTableLength;
  4328. private int stringTableLength_ = 0;
  4329. public boolean hasStringTableLength() { return hasStringTableLength; }
  4330. public int getStringTableLength() { return stringTableLength_; }
  4331. // optional uint32 stopsTableOffset = 10;
  4332. public static final int STOPSTABLEOFFSET_FIELD_NUMBER = 10;
  4333. private boolean hasStopsTableOffset;
  4334. private int stopsTableOffset_ = 0;
  4335. public boolean hasStopsTableOffset() { return hasStopsTableOffset; }
  4336. public int getStopsTableOffset() { return stopsTableOffset_; }
  4337. // optional uint32 stopsTableLength = 11;
  4338. public static final int STOPSTABLELENGTH_FIELD_NUMBER = 11;
  4339. private boolean hasStopsTableLength;
  4340. private int stopsTableLength_ = 0;
  4341. public boolean hasStopsTableLength() { return hasStopsTableLength; }
  4342. public int getStopsTableLength() { return stopsTableLength_; }
  4343. private void initFields() {
  4344. }
  4345. @Override
  4346. public final boolean isInitialized() {
  4347. if (!hasSize) return false;
  4348. if (!hasOffset) return false;
  4349. return true;
  4350. }
  4351. @Override
  4352. public void writeTo(com.google.protobuf.CodedOutputStream output)
  4353. throws java.io.IOException {
  4354. getSerializedSize();
  4355. if (hasSize()) {
  4356. output.writeInt64(1, getSize());
  4357. }
  4358. if (hasOffset()) {
  4359. output.writeInt64(2, getOffset());
  4360. }
  4361. if (hasName()) {
  4362. output.writeString(3, getName());
  4363. }
  4364. if (hasLeft()) {
  4365. output.writeInt32(4, getLeft());
  4366. }
  4367. if (hasRight()) {
  4368. output.writeInt32(5, getRight());
  4369. }
  4370. if (hasTop()) {
  4371. output.writeInt32(6, getTop());
  4372. }
  4373. if (hasBottom()) {
  4374. output.writeInt32(7, getBottom());
  4375. }
  4376. if (hasStringTableOffset()) {
  4377. output.writeUInt32(8, getStringTableOffset());
  4378. }
  4379. if (hasStringTableLength()) {
  4380. output.writeUInt32(9, getStringTableLength());
  4381. }
  4382. if (hasStopsTableOffset()) {
  4383. output.writeUInt32(10, getStopsTableOffset());
  4384. }
  4385. if (hasStopsTableLength()) {
  4386. output.writeUInt32(11, getStopsTableLength());
  4387. }
  4388. }
  4389. private int memoizedSerializedSize = -1;
  4390. @Override
  4391. public int getSerializedSize() {
  4392. int size = memoizedSerializedSize;
  4393. if (size != -1) return size;
  4394. size = 0;
  4395. if (hasSize()) {
  4396. size += com.google.protobuf.CodedOutputStream
  4397. .computeInt64Size(1, getSize());
  4398. }
  4399. if (hasOffset()) {
  4400. size += com.google.protobuf.CodedOutputStream
  4401. .computeInt64Size(2, getOffset());
  4402. }
  4403. if (hasName()) {
  4404. size += com.google.protobuf.CodedOutputStream
  4405. .computeStringSize(3, getName());
  4406. }
  4407. if (hasLeft()) {
  4408. size += com.google.protobuf.CodedOutputStream
  4409. .computeInt32Size(4, getLeft());
  4410. }
  4411. if (hasRight()) {
  4412. size += com.google.protobuf.CodedOutputStream
  4413. .computeInt32Size(5, getRight());
  4414. }
  4415. if (hasTop()) {
  4416. size += com.google.protobuf.CodedOutputStream
  4417. .computeInt32Size(6, getTop());
  4418. }
  4419. if (hasBottom()) {
  4420. size += com.google.protobuf.CodedOutputStream
  4421. .computeInt32Size(7, getBottom());
  4422. }
  4423. if (hasStringTableOffset()) {
  4424. size += com.google.protobuf.CodedOutputStream
  4425. .computeUInt32Size(8, getStringTableOffset());
  4426. }
  4427. if (hasStringTableLength()) {
  4428. size += com.google.protobuf.CodedOutputStream
  4429. .computeUInt32Size(9, getStringTableLength());
  4430. }
  4431. if (hasStopsTableOffset()) {
  4432. size += com.google.protobuf.CodedOutputStream
  4433. .computeUInt32Size(10, getStopsTableOffset());
  4434. }
  4435. if (hasStopsTableLength()) {
  4436. size += com.google.protobuf.CodedOutputStream
  4437. .computeUInt32Size(11, getStopsTableLength());
  4438. }
  4439. memoizedSerializedSize = size;
  4440. return size;
  4441. }
  4442. public static net.osmand.binary.OsmandIndex.TransportPart parseFrom(
  4443. com.google.protobuf.ByteString data)
  4444. throws com.google.protobuf.InvalidProtocolBufferException {
  4445. return newBuilder().mergeFrom(data).buildParsed();
  4446. }
  4447. public static net.osmand.binary.OsmandIndex.TransportPart parseFrom(
  4448. com.google.protobuf.ByteString data,
  4449. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  4450. throws com.google.protobuf.InvalidProtocolBufferException {
  4451. return newBuilder().mergeFrom(data, extensionRegistry)
  4452. .buildParsed();
  4453. }
  4454. public static net.osmand.binary.OsmandIndex.TransportPart parseFrom(byte[] data)
  4455. throws com.google.protobuf.InvalidProtocolBufferException {
  4456. return newBuilder().mergeFrom(data).buildParsed();
  4457. }
  4458. public static net.osmand.binary.OsmandIndex.TransportPart parseFrom(
  4459. byte[] data,
  4460. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  4461. throws com.google.protobuf.InvalidProtocolBufferException {
  4462. return newBuilder().mergeFrom(data, extensionRegistry)
  4463. .buildParsed();
  4464. }
  4465. public static net.osmand.binary.OsmandIndex.TransportPart parseFrom(java.io.InputStream input)
  4466. throws java.io.IOException {
  4467. return newBuilder().mergeFrom(input).buildParsed();
  4468. }
  4469. public static net.osmand.binary.OsmandIndex.TransportPart parseFrom(
  4470. java.io.InputStream input,
  4471. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  4472. throws java.io.IOException {
  4473. return newBuilder().mergeFrom(input, extensionRegistry)
  4474. .buildParsed();
  4475. }
  4476. public static net.osmand.binary.OsmandIndex.TransportPart parseDelimitedFrom(java.io.InputStream input)
  4477. throws java.io.IOException {
  4478. Builder builder = newBuilder();
  4479. if (builder.mergeDelimitedFrom(input)) {
  4480. return builder.buildParsed();
  4481. } else {
  4482. return null;
  4483. }
  4484. }
  4485. public static net.osmand.binary.OsmandIndex.TransportPart parseDelimitedFrom(
  4486. java.io.InputStream input,
  4487. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  4488. throws java.io.IOException {
  4489. Builder builder = newBuilder();
  4490. if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
  4491. return builder.buildParsed();
  4492. } else {
  4493. return null;
  4494. }
  4495. }
  4496. public static net.osmand.binary.OsmandIndex.TransportPart parseFrom(
  4497. com.google.protobuf.CodedInputStream input)
  4498. throws java.io.IOException {
  4499. return newBuilder().mergeFrom(input).buildParsed();
  4500. }
  4501. public static net.osmand.binary.OsmandIndex.TransportPart parseFrom(
  4502. com.google.protobuf.CodedInputStream input,
  4503. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  4504. throws java.io.IOException {
  4505. return newBuilder().mergeFrom(input, extensionRegistry)
  4506. .buildParsed();
  4507. }
  4508. public static Builder newBuilder() { return Builder.create(); }
  4509. @Override
  4510. public Builder newBuilderForType() { return newBuilder(); }
  4511. public static Builder newBuilder(net.osmand.binary.OsmandIndex.TransportPart prototype) {
  4512. return newBuilder().mergeFrom(prototype);
  4513. }
  4514. @Override
  4515. public Builder toBuilder() { return newBuilder(this); }
  4516. public static final class Builder extends
  4517. com.google.protobuf.GeneratedMessageLite.Builder<
  4518. net.osmand.binary.OsmandIndex.TransportPart, Builder> {
  4519. private net.osmand.binary.OsmandIndex.TransportPart result;
  4520. // Construct using net.osmand.binary.OsmandIndex.TransportPart.newBuilder()
  4521. private Builder() {}
  4522. private static Builder create() {
  4523. Builder builder = new Builder();
  4524. builder.result = new net.osmand.binary.OsmandIndex.TransportPart();
  4525. return builder;
  4526. }
  4527. @Override
  4528. protected net.osmand.binary.OsmandIndex.TransportPart internalGetResult() {
  4529. return result;
  4530. }
  4531. @Override
  4532. public Builder clear() {
  4533. if (result == null) {
  4534. throw new IllegalStateException(
  4535. "Cannot call clear() after build().");
  4536. }
  4537. result = new net.osmand.binary.OsmandIndex.TransportPart();
  4538. return this;
  4539. }
  4540. @Override
  4541. public Builder clone() {
  4542. return create().mergeFrom(result);
  4543. }
  4544. @Override
  4545. public net.osmand.binary.OsmandIndex.TransportPart getDefaultInstanceForType() {
  4546. return net.osmand.binary.OsmandIndex.TransportPart.getDefaultInstance();
  4547. }
  4548. @Override
  4549. public boolean isInitialized() {
  4550. return result.isInitialized();
  4551. }
  4552. @Override
  4553. public net.osmand.binary.OsmandIndex.TransportPart build() {
  4554. if (result != null && !isInitialized()) {
  4555. throw newUninitializedMessageException(result);
  4556. }
  4557. return buildPartial();
  4558. }
  4559. private net.osmand.binary.OsmandIndex.TransportPart buildParsed()
  4560. throws com.google.protobuf.InvalidProtocolBufferException {
  4561. if (!isInitialized()) {
  4562. throw newUninitializedMessageException(
  4563. result).asInvalidProtocolBufferException();
  4564. }
  4565. return buildPartial();
  4566. }
  4567. @Override
  4568. public net.osmand.binary.OsmandIndex.TransportPart buildPartial() {
  4569. if (result == null) {
  4570. throw new IllegalStateException(
  4571. "build() has already been called on this Builder.");
  4572. }
  4573. net.osmand.binary.OsmandIndex.TransportPart returnMe = result;
  4574. result = null;
  4575. return returnMe;
  4576. }
  4577. @Override
  4578. public Builder mergeFrom(net.osmand.binary.OsmandIndex.TransportPart other) {
  4579. if (other == net.osmand.binary.OsmandIndex.TransportPart.getDefaultInstance()) return this;
  4580. if (other.hasSize()) {
  4581. setSize(other.getSize());
  4582. }
  4583. if (other.hasOffset()) {
  4584. setOffset(other.getOffset());
  4585. }
  4586. if (other.hasName()) {
  4587. setName(other.getName());
  4588. }
  4589. if (other.hasLeft()) {
  4590. setLeft(other.getLeft());
  4591. }
  4592. if (other.hasRight()) {
  4593. setRight(other.getRight());
  4594. }
  4595. if (other.hasTop()) {
  4596. setTop(other.getTop());
  4597. }
  4598. if (other.hasBottom()) {
  4599. setBottom(other.getBottom());
  4600. }
  4601. if (other.hasStringTableOffset()) {
  4602. setStringTableOffset(other.getStringTableOffset());
  4603. }
  4604. if (other.hasStringTableLength()) {
  4605. setStringTableLength(other.getStringTableLength());
  4606. }
  4607. if (other.hasStopsTableOffset()) {
  4608. setStopsTableOffset(other.getStopsTableOffset());
  4609. }
  4610. if (other.hasStopsTableLength()) {
  4611. setStopsTableLength(other.getStopsTableLength());
  4612. }
  4613. return this;
  4614. }
  4615. @Override
  4616. public Builder mergeFrom(
  4617. com.google.protobuf.CodedInputStream input,
  4618. com.google.protobuf.ExtensionRegistryLite extensionRegistry)
  4619. throws java.io.IOException {
  4620. while (true) {
  4621. int tag = input.readTag();
  4622. switch (tag) {
  4623. case 0:
  4624. return this;
  4625. default: {
  4626. if (!parseUnknownField(input, extensionRegistry, tag)) {
  4627. return this;
  4628. }
  4629. break;
  4630. }
  4631. case 8: {
  4632. setSize(input.readInt64());
  4633. break;
  4634. }
  4635. case 16: {
  4636. setOffset(input.readInt64());
  4637. break;
  4638. }
  4639. case 26: {
  4640. setName(input.readString());
  4641. break;
  4642. }
  4643. case 32: {
  4644. setLeft(input.readInt32());
  4645. break;
  4646. }
  4647. case 40: {
  4648. setRight(input.readInt32());
  4649. break;
  4650. }
  4651. case 48: {
  4652. setTop(input.readInt32());
  4653. break;
  4654. }
  4655. case 56: {
  4656. setBottom(input.readInt32());
  4657. break;
  4658. }
  4659. case 64: {
  4660. setStringTableOffset(input.readUInt32());
  4661. break;
  4662. }
  4663. case 72: {
  4664. setStringTableLength(input.readUInt32());
  4665. break;
  4666. }
  4667. case 80: {
  4668. setStopsTableOffset(input.readUInt32());
  4669. break;
  4670. }
  4671. case 88: {
  4672. setStopsTableLength(input.readUInt32());
  4673. break;
  4674. }
  4675. }
  4676. }
  4677. }
  4678. // required int64 size = 1;
  4679. public boolean hasSize() {
  4680. return result.hasSize();
  4681. }
  4682. public long getSize() {
  4683. return result.getSize();
  4684. }
  4685. public Builder setSize(long value) {
  4686. result.hasSize = true;
  4687. result.size_ = value;
  4688. return this;
  4689. }
  4690. public Builder clearSize() {
  4691. result.hasSize = false;
  4692. result.size_ = 0L;
  4693. return this;
  4694. }
  4695. // required int64 offset = 2;
  4696. public boolean hasOffset() {
  4697. return result.hasOffset();
  4698. }
  4699. public long getOffset() {
  4700. return result.getOffset();
  4701. }
  4702. public Builder setOffset(long value) {
  4703. result.hasOffset = true;
  4704. result.offset_ = value;
  4705. return this;
  4706. }
  4707. public Builder clearOffset() {
  4708. result.hasOffset = false;
  4709. result.offset_ = 0L;
  4710. return this;
  4711. }
  4712. // optional string name = 3;
  4713. public boolean hasName() {
  4714. return result.hasName();
  4715. }
  4716. public java.lang.String getName() {
  4717. return result.getName();
  4718. }
  4719. public Builder setName(java.lang.String value) {
  4720. if (value == null) {
  4721. throw new NullPointerException();
  4722. }
  4723. result.hasName = true;
  4724. result.name_ = value;
  4725. return this;
  4726. }
  4727. public Builder clearName() {
  4728. result.hasName = false;
  4729. result.name_ = getDefaultInstance().getName();
  4730. return this;
  4731. }
  4732. // optional int32 left = 4;
  4733. public boolean hasLeft() {
  4734. return result.hasLeft();
  4735. }
  4736. public int getLeft() {
  4737. return result.getLeft();
  4738. }
  4739. public Builder setLeft(int value) {
  4740. result.hasLeft = true;
  4741. result.left_ = value;
  4742. return this;
  4743. }
  4744. public Builder clearLeft() {
  4745. result.hasLeft = false;
  4746. result.left_ = 0;
  4747. return this;
  4748. }
  4749. // optional int32 right = 5;
  4750. public boolean hasRight() {
  4751. return result.hasRight();
  4752. }
  4753. public int getRight() {
  4754. return result.getRight();
  4755. }
  4756. public Builder setRight(int value) {
  4757. result.hasRight = true;
  4758. result.right_ = value;
  4759. return this;
  4760. }
  4761. public Builder clearRight() {
  4762. result.hasRight = false;
  4763. result.right_ = 0;
  4764. return this;
  4765. }
  4766. // optional int32 top = 6;
  4767. public boolean hasTop() {
  4768. return result.hasTop();
  4769. }
  4770. public int getTop() {
  4771. return result.getTop();
  4772. }
  4773. public Builder setTop(int value) {
  4774. result.hasTop = true;
  4775. result.top_ = value;
  4776. return this;
  4777. }
  4778. public Builder clearTop() {
  4779. result.hasTop = false;
  4780. result.top_ = 0;
  4781. return this;
  4782. }
  4783. // optional int32 bottom = 7;
  4784. public boolean hasBottom() {
  4785. return result.hasBottom();
  4786. }
  4787. public int getBottom() {
  4788. return result.getBottom();
  4789. }
  4790. public Builder setBottom(int value) {
  4791. result.hasBottom = true;
  4792. result.bottom_ = value;
  4793. return this;
  4794. }
  4795. public Builder clearBottom() {
  4796. result.hasBottom = false;
  4797. result.bottom_ = 0;
  4798. return this;
  4799. }
  4800. // optional uint32 stringTableOffset = 8;
  4801. public boolean hasStringTableOffset() {
  4802. return result.hasStringTableOffset();
  4803. }
  4804. public int getStringTableOffset() {
  4805. return result.getStringTableOffset();
  4806. }
  4807. public Builder setStringTableOffset(int value) {
  4808. result.hasStringTableOffset = true;
  4809. result.stringTableOffset_ = value;
  4810. return this;
  4811. }
  4812. public Builder clearStringTableOffset() {
  4813. result.hasStringTableOffset = false;
  4814. result.stringTableOffset_ = 0;
  4815. return this;
  4816. }
  4817. // optional uint32 stringTableLength = 9;
  4818. public boolean hasStringTableLength() {
  4819. return result.hasStringTableLength();
  4820. }
  4821. public int getStringTableLength() {
  4822. return result.getStringTableLength();
  4823. }
  4824. public Builder setStringTableLength(int value) {
  4825. result.hasStringTableLength = true;
  4826. result.stringTableLength_ = value;
  4827. return this;
  4828. }
  4829. public Builder clearStringTableLength() {
  4830. result.hasStringTableLength = false;
  4831. result.stringTableLength_ = 0;
  4832. return this;
  4833. }
  4834. // optional uint32 stopsTableOffset = 10;
  4835. public boolean hasStopsTableOffset() {
  4836. return result.hasStopsTableOffset();
  4837. }
  4838. public int getStopsTableOffset() {
  4839. return result.getStopsTableOffset();
  4840. }
  4841. public Builder setStopsTableOffset(int value) {
  4842. result.hasStopsTableOffset = true;
  4843. result.stopsTableOffset_ = value;
  4844. return this;
  4845. }
  4846. public Builder clearStopsTableOffset() {
  4847. result.hasStopsTableOffset = false;
  4848. result.stopsTableOffset_ = 0;
  4849. return this;
  4850. }
  4851. // optional uint32 stopsTableLength = 11;
  4852. public boolean hasStopsTableLength() {
  4853. return result.hasStopsTableLength();
  4854. }
  4855. public int getStopsTableLength() {
  4856. return result.getStopsTableLength();
  4857. }
  4858. public Builder setStopsTableLength(int value) {
  4859. result.hasStopsTableLength = true;
  4860. result.stopsTableLength_ = value;
  4861. return this;
  4862. }
  4863. public Builder clearStopsTableLength() {
  4864. result.hasStopsTableLength = false;
  4865. result.stopsTableLength_ = 0;
  4866. return this;
  4867. }
  4868. // @@protoc_insertion_point(builder_scope:TransportPart)
  4869. }
  4870. static {
  4871. defaultInstance = new TransportPart(true);
  4872. net.osmand.binary.OsmandIndex.internalForceInit();
  4873. defaultInstance.initFields();
  4874. }
  4875. // @@protoc_insertion_point(class_scope:TransportPart)
  4876. }
  4877. static {
  4878. }
  4879. public static void internalForceInit() {}
  4880. // @@protoc_insertion_point(outer_class_scope)
  4881. }