/DataExtractionOSM/src/net/osmand/binary/OsmandOdb.java
https://code.google.com/ · Java · 1765 lines · 1602 code · 123 blank · 40 comment · 198 complexity · 3dc925d3a71027da5914276d3d0c93fa MD5 · raw file
- // Generated by the protocol buffer compiler. DO NOT EDIT!
- // source: src/osmand_odb.proto
- package net.osmand.binary;
- public final class OsmandOdb {
- private OsmandOdb() {}
- public static void registerAllExtensions(
- com.google.protobuf.ExtensionRegistry registry) {
- }
- public static final class OsmAndStructure extends
- com.google.protobuf.GeneratedMessage {
- // Use OsmAndStructure.newBuilder() to construct.
- private OsmAndStructure() {
- initFields();
- }
- private OsmAndStructure(boolean noInit) {}
-
- private static final OsmAndStructure defaultInstance;
- public static OsmAndStructure getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public OsmAndStructure getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return net.osmand.binary.OsmandOdb.internal_static_OsmAndStructure_descriptor;
- }
-
- @Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return net.osmand.binary.OsmandOdb.internal_static_OsmAndStructure_fieldAccessorTable;
- }
-
- // required uint32 version = 1;
- public static final int VERSION_FIELD_NUMBER = 1;
- private boolean hasVersion;
- private int version_ = 0;
- public boolean hasVersion() { return hasVersion; }
- public int getVersion() { return version_; }
-
- // repeated .OsmAndMapIndex mapIndex = 2;
- public static final int MAPINDEX_FIELD_NUMBER = 2;
- private java.util.List<net.osmand.binary.OsmandOdb.OsmAndMapIndex> mapIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandOdb.OsmAndMapIndex> getMapIndexList() {
- return mapIndex_;
- }
- public int getMapIndexCount() { return mapIndex_.size(); }
- public net.osmand.binary.OsmandOdb.OsmAndMapIndex getMapIndex(int index) {
- return mapIndex_.get(index);
- }
-
- // repeated .OsmAndAddressIndex addressIndex = 3;
- public static final int ADDRESSINDEX_FIELD_NUMBER = 3;
- private java.util.List<net.osmand.binary.OsmandOdb.OsmAndAddressIndex> addressIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandOdb.OsmAndAddressIndex> getAddressIndexList() {
- return addressIndex_;
- }
- public int getAddressIndexCount() { return addressIndex_.size(); }
- public net.osmand.binary.OsmandOdb.OsmAndAddressIndex getAddressIndex(int index) {
- return addressIndex_.get(index);
- }
-
- // repeated .OsmAndTransportIndex transportIndex = 4;
- public static final int TRANSPORTINDEX_FIELD_NUMBER = 4;
- private java.util.List<net.osmand.binary.OsmandOdb.OsmAndTransportIndex> transportIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandOdb.OsmAndTransportIndex> getTransportIndexList() {
- return transportIndex_;
- }
- public int getTransportIndexCount() { return transportIndex_.size(); }
- public net.osmand.binary.OsmandOdb.OsmAndTransportIndex getTransportIndex(int index) {
- return transportIndex_.get(index);
- }
-
- // repeated .OsmAndPoiIndex poiIndex = 5;
- public static final int POIINDEX_FIELD_NUMBER = 5;
- private java.util.List<net.osmand.binary.OsmandOdb.OsmAndPoiIndex> poiIndex_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandOdb.OsmAndPoiIndex> getPoiIndexList() {
- return poiIndex_;
- }
- public int getPoiIndexCount() { return poiIndex_.size(); }
- public net.osmand.binary.OsmandOdb.OsmAndPoiIndex getPoiIndex(int index) {
- return poiIndex_.get(index);
- }
-
- // required uint32 versionConfirm = 32;
- public static final int VERSIONCONFIRM_FIELD_NUMBER = 32;
- private boolean hasVersionConfirm;
- private int versionConfirm_ = 0;
- public boolean hasVersionConfirm() { return hasVersionConfirm; }
- public int getVersionConfirm() { return versionConfirm_; }
-
- private void initFields() {
- }
- @Override
- public final boolean isInitialized() {
- if (!hasVersion) return false;
- if (!hasVersionConfirm) return false;
- for (net.osmand.binary.OsmandOdb.OsmAndMapIndex element : getMapIndexList()) {
- if (!element.isInitialized()) return false;
- }
- for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex element : getAddressIndexList()) {
- if (!element.isInitialized()) return false;
- }
- for (net.osmand.binary.OsmandOdb.OsmAndTransportIndex element : getTransportIndexList()) {
- if (!element.isInitialized()) return false;
- }
- for (net.osmand.binary.OsmandOdb.OsmAndPoiIndex element : getPoiIndexList()) {
- if (!element.isInitialized()) return false;
- }
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasVersion()) {
- output.writeUInt32(1, getVersion());
- }
- for (net.osmand.binary.OsmandOdb.OsmAndMapIndex element : getMapIndexList()) {
- output.writeMessage(2, element);
- }
- for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex element : getAddressIndexList()) {
- output.writeMessage(3, element);
- }
- for (net.osmand.binary.OsmandOdb.OsmAndTransportIndex element : getTransportIndexList()) {
- output.writeMessage(4, element);
- }
- for (net.osmand.binary.OsmandOdb.OsmAndPoiIndex element : getPoiIndexList()) {
- output.writeMessage(5, element);
- }
- if (hasVersionConfirm()) {
- output.writeUInt32(32, getVersionConfirm());
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasVersion()) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(1, getVersion());
- }
- for (net.osmand.binary.OsmandOdb.OsmAndMapIndex element : getMapIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, element);
- }
- for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex element : getAddressIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, element);
- }
- for (net.osmand.binary.OsmandOdb.OsmAndTransportIndex element : getTransportIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, element);
- }
- for (net.osmand.binary.OsmandOdb.OsmAndPoiIndex element : getPoiIndexList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, element);
- }
- if (hasVersionConfirm()) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(32, getVersionConfirm());
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndStructure prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private net.osmand.binary.OsmandOdb.OsmAndStructure result;
-
- // Construct using net.osmand.binary.OsmandOdb.OsmAndStructure.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new net.osmand.binary.OsmandOdb.OsmAndStructure();
- return builder;
- }
-
- @Override
- protected net.osmand.binary.OsmandOdb.OsmAndStructure internalGetResult() {
- return result;
- }
-
- @Override
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new net.osmand.binary.OsmandOdb.OsmAndStructure();
- return this;
- }
-
- @Override
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return net.osmand.binary.OsmandOdb.OsmAndStructure.getDescriptor();
- }
-
- @Override
- public net.osmand.binary.OsmandOdb.OsmAndStructure getDefaultInstanceForType() {
- return net.osmand.binary.OsmandOdb.OsmAndStructure.getDefaultInstance();
- }
-
- @Override
- public boolean isInitialized() {
- return result.isInitialized();
- }
- @Override
- public net.osmand.binary.OsmandOdb.OsmAndStructure build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private net.osmand.binary.OsmandOdb.OsmAndStructure buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- @Override
- public net.osmand.binary.OsmandOdb.OsmAndStructure buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.mapIndex_ != java.util.Collections.EMPTY_LIST) {
- result.mapIndex_ =
- java.util.Collections.unmodifiableList(result.mapIndex_);
- }
- if (result.addressIndex_ != java.util.Collections.EMPTY_LIST) {
- result.addressIndex_ =
- java.util.Collections.unmodifiableList(result.addressIndex_);
- }
- if (result.transportIndex_ != java.util.Collections.EMPTY_LIST) {
- result.transportIndex_ =
- java.util.Collections.unmodifiableList(result.transportIndex_);
- }
- if (result.poiIndex_ != java.util.Collections.EMPTY_LIST) {
- result.poiIndex_ =
- java.util.Collections.unmodifiableList(result.poiIndex_);
- }
- net.osmand.binary.OsmandOdb.OsmAndStructure returnMe = result;
- result = null;
- return returnMe;
- }
-
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof net.osmand.binary.OsmandOdb.OsmAndStructure) {
- return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndStructure)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(net.osmand.binary.OsmandOdb.OsmAndStructure other) {
- if (other == net.osmand.binary.OsmandOdb.OsmAndStructure.getDefaultInstance()) return this;
- if (other.hasVersion()) {
- setVersion(other.getVersion());
- }
- if (!other.mapIndex_.isEmpty()) {
- if (result.mapIndex_.isEmpty()) {
- result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndMapIndex>();
- }
- result.mapIndex_.addAll(other.mapIndex_);
- }
- if (!other.addressIndex_.isEmpty()) {
- if (result.addressIndex_.isEmpty()) {
- result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndAddressIndex>();
- }
- result.addressIndex_.addAll(other.addressIndex_);
- }
- if (!other.transportIndex_.isEmpty()) {
- if (result.transportIndex_.isEmpty()) {
- result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndTransportIndex>();
- }
- result.transportIndex_.addAll(other.transportIndex_);
- }
- if (!other.poiIndex_.isEmpty()) {
- if (result.poiIndex_.isEmpty()) {
- result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndPoiIndex>();
- }
- result.poiIndex_.addAll(other.poiIndex_);
- }
- if (other.hasVersionConfirm()) {
- setVersionConfirm(other.getVersionConfirm());
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 8: {
- setVersion(input.readUInt32());
- break;
- }
- case 18: {
- net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder subBuilder = net.osmand.binary.OsmandOdb.OsmAndMapIndex.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addMapIndex(subBuilder.buildPartial());
- break;
- }
- case 26: {
- net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder subBuilder = net.osmand.binary.OsmandOdb.OsmAndAddressIndex.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addAddressIndex(subBuilder.buildPartial());
- break;
- }
- case 34: {
- net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder subBuilder = net.osmand.binary.OsmandOdb.OsmAndTransportIndex.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addTransportIndex(subBuilder.buildPartial());
- break;
- }
- case 42: {
- net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder subBuilder = net.osmand.binary.OsmandOdb.OsmAndPoiIndex.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addPoiIndex(subBuilder.buildPartial());
- break;
- }
- case 256: {
- setVersionConfirm(input.readUInt32());
- break;
- }
- }
- }
- }
-
-
- // required uint32 version = 1;
- public boolean hasVersion() {
- return result.hasVersion();
- }
- public int getVersion() {
- return result.getVersion();
- }
- public Builder setVersion(int value) {
- result.hasVersion = true;
- result.version_ = value;
- return this;
- }
- public Builder clearVersion() {
- result.hasVersion = false;
- result.version_ = 0;
- return this;
- }
-
- // repeated .OsmAndMapIndex mapIndex = 2;
- public java.util.List<net.osmand.binary.OsmandOdb.OsmAndMapIndex> getMapIndexList() {
- return java.util.Collections.unmodifiableList(result.mapIndex_);
- }
- public int getMapIndexCount() {
- return result.getMapIndexCount();
- }
- public net.osmand.binary.OsmandOdb.OsmAndMapIndex getMapIndex(int index) {
- return result.getMapIndex(index);
- }
- public Builder setMapIndex(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.mapIndex_.set(index, value);
- return this;
- }
- public Builder setMapIndex(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder builderForValue) {
- result.mapIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addMapIndex(net.osmand.binary.OsmandOdb.OsmAndMapIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.mapIndex_.isEmpty()) {
- result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndMapIndex>();
- }
- result.mapIndex_.add(value);
- return this;
- }
- public Builder addMapIndex(net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder builderForValue) {
- if (result.mapIndex_.isEmpty()) {
- result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndMapIndex>();
- }
- result.mapIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllMapIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandOdb.OsmAndMapIndex> values) {
- if (result.mapIndex_.isEmpty()) {
- result.mapIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndMapIndex>();
- }
- super.addAll(values, result.mapIndex_);
- return this;
- }
- public Builder clearMapIndex() {
- result.mapIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .OsmAndAddressIndex addressIndex = 3;
- public java.util.List<net.osmand.binary.OsmandOdb.OsmAndAddressIndex> getAddressIndexList() {
- return java.util.Collections.unmodifiableList(result.addressIndex_);
- }
- public int getAddressIndexCount() {
- return result.getAddressIndexCount();
- }
- public net.osmand.binary.OsmandOdb.OsmAndAddressIndex getAddressIndex(int index) {
- return result.getAddressIndex(index);
- }
- public Builder setAddressIndex(int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.addressIndex_.set(index, value);
- return this;
- }
- public Builder setAddressIndex(int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder builderForValue) {
- result.addressIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addAddressIndex(net.osmand.binary.OsmandOdb.OsmAndAddressIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.addressIndex_.isEmpty()) {
- result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndAddressIndex>();
- }
- result.addressIndex_.add(value);
- return this;
- }
- public Builder addAddressIndex(net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder builderForValue) {
- if (result.addressIndex_.isEmpty()) {
- result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndAddressIndex>();
- }
- result.addressIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllAddressIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandOdb.OsmAndAddressIndex> values) {
- if (result.addressIndex_.isEmpty()) {
- result.addressIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndAddressIndex>();
- }
- super.addAll(values, result.addressIndex_);
- return this;
- }
- public Builder clearAddressIndex() {
- result.addressIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .OsmAndTransportIndex transportIndex = 4;
- public java.util.List<net.osmand.binary.OsmandOdb.OsmAndTransportIndex> getTransportIndexList() {
- return java.util.Collections.unmodifiableList(result.transportIndex_);
- }
- public int getTransportIndexCount() {
- return result.getTransportIndexCount();
- }
- public net.osmand.binary.OsmandOdb.OsmAndTransportIndex getTransportIndex(int index) {
- return result.getTransportIndex(index);
- }
- public Builder setTransportIndex(int index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.transportIndex_.set(index, value);
- return this;
- }
- public Builder setTransportIndex(int index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder builderForValue) {
- result.transportIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addTransportIndex(net.osmand.binary.OsmandOdb.OsmAndTransportIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.transportIndex_.isEmpty()) {
- result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndTransportIndex>();
- }
- result.transportIndex_.add(value);
- return this;
- }
- public Builder addTransportIndex(net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder builderForValue) {
- if (result.transportIndex_.isEmpty()) {
- result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndTransportIndex>();
- }
- result.transportIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllTransportIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandOdb.OsmAndTransportIndex> values) {
- if (result.transportIndex_.isEmpty()) {
- result.transportIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndTransportIndex>();
- }
- super.addAll(values, result.transportIndex_);
- return this;
- }
- public Builder clearTransportIndex() {
- result.transportIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .OsmAndPoiIndex poiIndex = 5;
- public java.util.List<net.osmand.binary.OsmandOdb.OsmAndPoiIndex> getPoiIndexList() {
- return java.util.Collections.unmodifiableList(result.poiIndex_);
- }
- public int getPoiIndexCount() {
- return result.getPoiIndexCount();
- }
- public net.osmand.binary.OsmandOdb.OsmAndPoiIndex getPoiIndex(int index) {
- return result.getPoiIndex(index);
- }
- public Builder setPoiIndex(int index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.poiIndex_.set(index, value);
- return this;
- }
- public Builder setPoiIndex(int index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder builderForValue) {
- result.poiIndex_.set(index, builderForValue.build());
- return this;
- }
- public Builder addPoiIndex(net.osmand.binary.OsmandOdb.OsmAndPoiIndex value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.poiIndex_.isEmpty()) {
- result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndPoiIndex>();
- }
- result.poiIndex_.add(value);
- return this;
- }
- public Builder addPoiIndex(net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder builderForValue) {
- if (result.poiIndex_.isEmpty()) {
- result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndPoiIndex>();
- }
- result.poiIndex_.add(builderForValue.build());
- return this;
- }
- public Builder addAllPoiIndex(
- java.lang.Iterable<? extends net.osmand.binary.OsmandOdb.OsmAndPoiIndex> values) {
- if (result.poiIndex_.isEmpty()) {
- result.poiIndex_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.OsmAndPoiIndex>();
- }
- super.addAll(values, result.poiIndex_);
- return this;
- }
- public Builder clearPoiIndex() {
- result.poiIndex_ = java.util.Collections.emptyList();
- return this;
- }
-
- // required uint32 versionConfirm = 32;
- public boolean hasVersionConfirm() {
- return result.hasVersionConfirm();
- }
- public int getVersionConfirm() {
- return result.getVersionConfirm();
- }
- public Builder setVersionConfirm(int value) {
- result.hasVersionConfirm = true;
- result.versionConfirm_ = value;
- return this;
- }
- public Builder clearVersionConfirm() {
- result.hasVersionConfirm = false;
- result.versionConfirm_ = 0;
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:OsmAndStructure)
- }
-
- static {
- defaultInstance = new OsmAndStructure(true);
- net.osmand.binary.OsmandOdb.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:OsmAndStructure)
- }
-
- public static final class StringTable extends
- com.google.protobuf.GeneratedMessage {
- // Use StringTable.newBuilder() to construct.
- private StringTable() {
- initFields();
- }
- private StringTable(boolean noInit) {}
-
- private static final StringTable defaultInstance;
- public static StringTable getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public StringTable getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return net.osmand.binary.OsmandOdb.internal_static_StringTable_descriptor;
- }
-
- @Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return net.osmand.binary.OsmandOdb.internal_static_StringTable_fieldAccessorTable;
- }
-
- // repeated string s = 1;
- public static final int S_FIELD_NUMBER = 1;
- private java.util.List<java.lang.String> s_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getSList() {
- return s_;
- }
- public int getSCount() { return s_.size(); }
- public java.lang.String getS(int index) {
- return s_.get(index);
- }
-
- private void initFields() {
- }
- @Override
- public final boolean isInitialized() {
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- for (java.lang.String element : getSList()) {
- output.writeString(1, element);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (java.lang.String element : getSList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getSList().size();
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static net.osmand.binary.OsmandOdb.StringTable parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.StringTable parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(net.osmand.binary.OsmandOdb.StringTable prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private net.osmand.binary.OsmandOdb.StringTable result;
-
- // Construct using net.osmand.binary.OsmandOdb.StringTable.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new net.osmand.binary.OsmandOdb.StringTable();
- return builder;
- }
-
- @Override
- protected net.osmand.binary.OsmandOdb.StringTable internalGetResult() {
- return result;
- }
-
- @Override
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new net.osmand.binary.OsmandOdb.StringTable();
- return this;
- }
-
- @Override
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return net.osmand.binary.OsmandOdb.StringTable.getDescriptor();
- }
-
- @Override
- public net.osmand.binary.OsmandOdb.StringTable getDefaultInstanceForType() {
- return net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance();
- }
-
- @Override
- public boolean isInitialized() {
- return result.isInitialized();
- }
- @Override
- public net.osmand.binary.OsmandOdb.StringTable build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private net.osmand.binary.OsmandOdb.StringTable buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- @Override
- public net.osmand.binary.OsmandOdb.StringTable buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.s_ != java.util.Collections.EMPTY_LIST) {
- result.s_ =
- java.util.Collections.unmodifiableList(result.s_);
- }
- net.osmand.binary.OsmandOdb.StringTable returnMe = result;
- result = null;
- return returnMe;
- }
-
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof net.osmand.binary.OsmandOdb.StringTable) {
- return mergeFrom((net.osmand.binary.OsmandOdb.StringTable)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(net.osmand.binary.OsmandOdb.StringTable other) {
- if (other == net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance()) return this;
- if (!other.s_.isEmpty()) {
- if (result.s_.isEmpty()) {
- result.s_ = new java.util.ArrayList<java.lang.String>();
- }
- result.s_.addAll(other.s_);
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- addS(input.readString());
- break;
- }
- }
- }
- }
-
-
- // repeated string s = 1;
- public java.util.List<java.lang.String> getSList() {
- return java.util.Collections.unmodifiableList(result.s_);
- }
- public int getSCount() {
- return result.getSCount();
- }
- public java.lang.String getS(int index) {
- return result.getS(index);
- }
- public Builder setS(int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.s_.set(index, value);
- return this;
- }
- public Builder addS(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.s_.isEmpty()) {
- result.s_ = new java.util.ArrayList<java.lang.String>();
- }
- result.s_.add(value);
- return this;
- }
- public Builder addAllS(
- java.lang.Iterable<? extends java.lang.String> values) {
- if (result.s_.isEmpty()) {
- result.s_ = new java.util.ArrayList<java.lang.String>();
- }
- super.addAll(values, result.s_);
- return this;
- }
- public Builder clearS() {
- result.s_ = java.util.Collections.emptyList();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:StringTable)
- }
-
- static {
- defaultInstance = new StringTable(true);
- net.osmand.binary.OsmandOdb.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:StringTable)
- }
-
- public static final class IndexedStringTable extends
- com.google.protobuf.GeneratedMessage {
- // Use IndexedStringTable.newBuilder() to construct.
- private IndexedStringTable() {
- initFields();
- }
- private IndexedStringTable(boolean noInit) {}
-
- private static final IndexedStringTable defaultInstance;
- public static IndexedStringTable getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public IndexedStringTable getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return net.osmand.binary.OsmandOdb.internal_static_IndexedStringTable_descriptor;
- }
-
- @Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return net.osmand.binary.OsmandOdb.internal_static_IndexedStringTable_fieldAccessorTable;
- }
-
- // optional string prefix = 1;
- public static final int PREFIX_FIELD_NUMBER = 1;
- private boolean hasPrefix;
- private java.lang.String prefix_ = "";
- public boolean hasPrefix() { return hasPrefix; }
- public java.lang.String getPrefix() { return prefix_; }
-
- // repeated string key = 3;
- public static final int KEY_FIELD_NUMBER = 3;
- private java.util.List<java.lang.String> key_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.String> getKeyList() {
- return key_;
- }
- public int getKeyCount() { return key_.size(); }
- public java.lang.String getKey(int index) {
- return key_.get(index);
- }
-
- // repeated uint32 val = 4;
- public static final int VAL_FIELD_NUMBER = 4;
- private java.util.List<java.lang.Integer> val_ =
- java.util.Collections.emptyList();
- public java.util.List<java.lang.Integer> getValList() {
- return val_;
- }
- public int getValCount() { return val_.size(); }
- public int getVal(int index) {
- return val_.get(index);
- }
-
- // repeated .IndexedStringTable subtables = 5;
- public static final int SUBTABLES_FIELD_NUMBER = 5;
- private java.util.List<net.osmand.binary.OsmandOdb.IndexedStringTable> subtables_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandOdb.IndexedStringTable> getSubtablesList() {
- return subtables_;
- }
- public int getSubtablesCount() { return subtables_.size(); }
- public net.osmand.binary.OsmandOdb.IndexedStringTable getSubtables(int index) {
- return subtables_.get(index);
- }
-
- private void initFields() {
- }
- @Override
- public final boolean isInitialized() {
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (hasPrefix()) {
- output.writeString(1, getPrefix());
- }
- for (java.lang.String element : getKeyList()) {
- output.writeString(3, element);
- }
- for (int element : getValList()) {
- output.writeUInt32(4, element);
- }
- for (net.osmand.binary.OsmandOdb.IndexedStringTable element : getSubtablesList()) {
- output.writeMessage(5, element);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- if (hasPrefix()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(1, getPrefix());
- }
- {
- int dataSize = 0;
- for (java.lang.String element : getKeyList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeStringSizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getKeyList().size();
- }
- {
- int dataSize = 0;
- for (int element : getValList()) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeUInt32SizeNoTag(element);
- }
- size += dataSize;
- size += 1 * getValList().size();
- }
- for (net.osmand.binary.OsmandOdb.IndexedStringTable element : getSubtablesList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, element);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
-
- public static Builder newBuilder() { return Builder.create(); }
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder(net.osmand.binary.OsmandOdb.IndexedStringTable prototype) {
- return newBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() { return newBuilder(this); }
-
- public static final class Builder extends
- com.google.protobuf.GeneratedMessage.Builder<Builder> {
- private net.osmand.binary.OsmandOdb.IndexedStringTable result;
-
- // Construct using net.osmand.binary.OsmandOdb.IndexedStringTable.newBuilder()
- private Builder() {}
-
- private static Builder create() {
- Builder builder = new Builder();
- builder.result = new net.osmand.binary.OsmandOdb.IndexedStringTable();
- return builder;
- }
-
- @Override
- protected net.osmand.binary.OsmandOdb.IndexedStringTable internalGetResult() {
- return result;
- }
-
- @Override
- public Builder clear() {
- if (result == null) {
- throw new IllegalStateException(
- "Cannot call clear() after build().");
- }
- result = new net.osmand.binary.OsmandOdb.IndexedStringTable();
- return this;
- }
-
- @Override
- public Builder clone() {
- return create().mergeFrom(result);
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return net.osmand.binary.OsmandOdb.IndexedStringTable.getDescriptor();
- }
-
- @Override
- public net.osmand.binary.OsmandOdb.IndexedStringTable getDefaultInstanceForType() {
- return net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance();
- }
-
- @Override
- public boolean isInitialized() {
- return result.isInitialized();
- }
- @Override
- public net.osmand.binary.OsmandOdb.IndexedStringTable build() {
- if (result != null && !isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return buildPartial();
- }
-
- private net.osmand.binary.OsmandOdb.IndexedStringTable buildParsed()
- throws com.google.protobuf.InvalidProtocolBufferException {
- if (!isInitialized()) {
- throw newUninitializedMessageException(
- result).asInvalidProtocolBufferException();
- }
- return buildPartial();
- }
-
- @Override
- public net.osmand.binary.OsmandOdb.IndexedStringTable buildPartial() {
- if (result == null) {
- throw new IllegalStateException(
- "build() has already been called on this Builder.");
- }
- if (result.key_ != java.util.Collections.EMPTY_LIST) {
- result.key_ =
- java.util.Collections.unmodifiableList(result.key_);
- }
- if (result.val_ != java.util.Collections.EMPTY_LIST) {
- result.val_ =
- java.util.Collections.unmodifiableList(result.val_);
- }
- if (result.subtables_ != java.util.Collections.EMPTY_LIST) {
- result.subtables_ =
- java.util.Collections.unmodifiableList(result.subtables_);
- }
- net.osmand.binary.OsmandOdb.IndexedStringTable returnMe = result;
- result = null;
- return returnMe;
- }
-
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof net.osmand.binary.OsmandOdb.IndexedStringTable) {
- return mergeFrom((net.osmand.binary.OsmandOdb.IndexedStringTable)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(net.osmand.binary.OsmandOdb.IndexedStringTable other) {
- if (other == net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance()) return this;
- if (other.hasPrefix()) {
- setPrefix(other.getPrefix());
- }
- if (!other.key_.isEmpty()) {
- if (result.key_.isEmpty()) {
- result.key_ = new java.util.ArrayList<java.lang.String>();
- }
- result.key_.addAll(other.key_);
- }
- if (!other.val_.isEmpty()) {
- if (result.val_.isEmpty()) {
- result.val_ = new java.util.ArrayList<java.lang.Integer>();
- }
- result.val_.addAll(other.val_);
- }
- if (!other.subtables_.isEmpty()) {
- if (result.subtables_.isEmpty()) {
- result.subtables_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.IndexedStringTable>();
- }
- result.subtables_.addAll(other.subtables_);
- }
- this.mergeUnknownFields(other.getUnknownFields());
- return this;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder(
- this.getUnknownFields());
- while (true) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- this.setUnknownFields(unknownFields.build());
- return this;
- default: {
- if (!parseUnknownField(input, unknownFields,
- extensionRegistry, tag)) {
- this.setUnknownFields(unknownFields.build());
- return this;
- }
- break;
- }
- case 10: {
- setPrefix(input.readString());
- break;
- }
- case 26: {
- addKey(input.readString());
- break;
- }
- case 32: {
- addVal(input.readUInt32());
- break;
- }
- case 34: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- while (input.getBytesUntilLimit() > 0) {
- addVal(input.readUInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 42: {
- net.osmand.binary.OsmandOdb.IndexedStringTable.Builder subBuilder = net.osmand.binary.OsmandOdb.IndexedStringTable.newBuilder();
- input.readMessage(subBuilder, extensionRegistry);
- addSubtables(subBuilder.buildPartial());
- break;
- }
- }
- }
- }
-
-
- // optional string prefix = 1;
- public boolean hasPrefix() {
- return result.hasPrefix();
- }
- public java.lang.String getPrefix() {
- return result.getPrefix();
- }
- public Builder setPrefix(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.hasPrefix = true;
- result.prefix_ = value;
- return this;
- }
- public Builder clearPrefix() {
- result.hasPrefix = false;
- result.prefix_ = getDefaultInstance().getPrefix();
- return this;
- }
-
- // repeated string key = 3;
- public java.util.List<java.lang.String> getKeyList() {
- return java.util.Collections.unmodifiableList(result.key_);
- }
- public int getKeyCount() {
- return result.getKeyCount();
- }
- public java.lang.String getKey(int index) {
- return result.getKey(index);
- }
- public Builder setKey(int index, java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.key_.set(index, value);
- return this;
- }
- public Builder addKey(java.lang.String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.key_.isEmpty()) {
- result.key_ = new java.util.ArrayList<java.lang.String>();
- }
- result.key_.add(value);
- return this;
- }
- public Builder addAllKey(
- java.lang.Iterable<? extends java.lang.String> values) {
- if (result.key_.isEmpty()) {
- result.key_ = new java.util.ArrayList<java.lang.String>();
- }
- super.addAll(values, result.key_);
- return this;
- }
- public Builder clearKey() {
- result.key_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated uint32 val = 4;
- public java.util.List<java.lang.Integer> getValList() {
- return java.util.Collections.unmodifiableList(result.val_);
- }
- public int getValCount() {
- return result.getValCount();
- }
- public int getVal(int index) {
- return result.getVal(index);
- }
- public Builder setVal(int index, int value) {
- result.val_.set(index, value);
- return this;
- }
- public Builder addVal(int value) {
- if (result.val_.isEmpty()) {
- result.val_ = new java.util.ArrayList<java.lang.Integer>();
- }
- result.val_.add(value);
- return this;
- }
- public Builder addAllVal(
- java.lang.Iterable<? extends java.lang.Integer> values) {
- if (result.val_.isEmpty()) {
- result.val_ = new java.util.ArrayList<java.lang.Integer>();
- }
- super.addAll(values, result.val_);
- return this;
- }
- public Builder clearVal() {
- result.val_ = java.util.Collections.emptyList();
- return this;
- }
-
- // repeated .IndexedStringTable subtables = 5;
- public java.util.List<net.osmand.binary.OsmandOdb.IndexedStringTable> getSubtablesList() {
- return java.util.Collections.unmodifiableList(result.subtables_);
- }
- public int getSubtablesCount() {
- return result.getSubtablesCount();
- }
- public net.osmand.binary.OsmandOdb.IndexedStringTable getSubtables(int index) {
- return result.getSubtables(index);
- }
- public Builder setSubtables(int index, net.osmand.binary.OsmandOdb.IndexedStringTable value) {
- if (value == null) {
- throw new NullPointerException();
- }
- result.subtables_.set(index, value);
- return this;
- }
- public Builder setSubtables(int index, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) {
- result.subtables_.set(index, builderForValue.build());
- return this;
- }
- public Builder addSubtables(net.osmand.binary.OsmandOdb.IndexedStringTable value) {
- if (value == null) {
- throw new NullPointerException();
- }
- if (result.subtables_.isEmpty()) {
- result.subtables_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.IndexedStringTable>();
- }
- result.subtables_.add(value);
- return this;
- }
- public Builder addSubtables(net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) {
- if (result.subtables_.isEmpty()) {
- result.subtables_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.IndexedStringTable>();
- }
- result.subtables_.add(builderForValue.build());
- return this;
- }
- public Builder addAllSubtables(
- java.lang.Iterable<? extends net.osmand.binary.OsmandOdb.IndexedStringTable> values) {
- if (result.subtables_.isEmpty()) {
- result.subtables_ = new java.util.ArrayList<net.osmand.binary.OsmandOdb.IndexedStringTable>();
- }
- super.addAll(values, result.subtables_);
- return this;
- }
- public Builder clearSubtables() {
- result.subtables_ = java.util.Collections.emptyList();
- return this;
- }
-
- // @@protoc_insertion_point(builder_scope:IndexedStringTable)
- }
-
- static {
- defaultInstance = new IndexedStringTable(true);
- net.osmand.binary.OsmandOdb.internalForceInit();
- defaultInstance.initFields();
- }
-
- // @@protoc_insertion_point(class_scope:IndexedStringTable)
- }
-
- public static final class OsmAndMapIndex extends
- com.google.protobuf.GeneratedMessage {
- // Use OsmAndMapIndex.newBuilder() to construct.
- private OsmAndMapIndex() {
- initFields();
- }
- private OsmAndMapIndex(boolean noInit) {}
-
- private static final OsmAndMapIndex defaultInstance;
- public static OsmAndMapIndex getDefaultInstance() {
- return defaultInstance;
- }
-
- @Override
- public OsmAndMapIndex getDefaultInstanceForType() {
- return defaultInstance;
- }
-
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_descriptor;
- }
-
- @Override
- protected com.google.protobuf.GeneratedMessage.FieldAccessorTable
- internalGetFieldAccessorTable() {
- return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_fieldAccessorTable;
- }
-
- // repeated .MapRootLevel levels = 1;
- public static final int LEVELS_FIELD_NUMBER = 1;
- private java.util.List<net.osmand.binary.OsmandOdb.MapRootLevel> levels_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandOdb.MapRootLevel> getLevelsList() {
- return levels_;
- }
- public int getLevelsCount() { return levels_.size(); }
- public net.osmand.binary.OsmandOdb.MapRootLevel getLevels(int index) {
- return levels_.get(index);
- }
-
- // optional string name = 3;
- public static final int NAME_FIELD_NUMBER = 3;
- private boolean hasName;
- private java.lang.String name_ = "";
- public boolean hasName() { return hasName; }
- public java.lang.String getName() { return name_; }
-
- // repeated .MapEncodingRule rules = 8;
- public static final int RULES_FIELD_NUMBER = 8;
- private java.util.List<net.osmand.binary.OsmandOdb.MapEncodingRule> rules_ =
- java.util.Collections.emptyList();
- public java.util.List<net.osmand.binary.OsmandOdb.MapEncodingRule> getRulesList() {
- return rules_;
- }
- public int getRulesCount() { return rules_.size(); }
- public net.osmand.binary.OsmandOdb.MapEncodingRule getRules(int index) {
- return rules_.get(index);
- }
-
- private void initFields() {
- }
- @Override
- public final boolean isInitialized() {
- for (net.osmand.binary.OsmandOdb.MapRootLevel element : getLevelsList()) {
- if (!element.isInitialized()) return false;
- }
- for (net.osmand.binary.OsmandOdb.MapEncodingRule element : getRulesList()) {
- if (!element.isInitialized()) return false;
- }
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- for (net.osmand.binary.OsmandOdb.MapRootLevel element : getLevelsList()) {
- output.writeMessage(1, element);
- }
- if (hasName()) {
- output.writeString(3, getName());
- }
- for (net.osmand.binary.OsmandOdb.MapEncodingRule element : getRulesList()) {
- output.writeMessage(8, element);
- }
- getUnknownFields().writeTo(output);
- }
-
- private int memoizedSerializedSize = -1;
- @Override
- public int getSerializedSize() {
- int size = memoizedSerializedSize;
- if (size != -1) return size;
-
- size = 0;
- for (net.osmand.binary.OsmandOdb.MapRootLevel element : getLevelsList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, element);
- }
- if (hasName()) {
- size += com.google.protobuf.CodedOutputStream
- .computeStringSize(3, getName());
- }
- for (net.osmand.binary.OsmandOdb.MapEncodingRule element : getRulesList()) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(8, element);
- }
- size += getUnknownFields().getSerializedSize();
- memoizedSerializedSize = size;
- return size;
- }
-
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return newBuilder().mergeFrom(data, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input).buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return newBuilder().mergeFrom(input, extensionRegistry)
- .buildParsed();
- }
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Builder builder = newBuilder();
- if (builder.mergeDelimitedFrom(input, extensionRegistry)) {
- return builder.buildParsed();
- } else {
- return null;
- }
- }
- public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parse