PageRenderTime 51ms CodeModel.GetById 12ms RepoModel.GetById 1ms 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

Large files files are truncated, but you can click here to view the full file

  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. outpu

Large files files are truncated, but you can click here to view the full file