- getOptionalFeaturesList();
- /**
- * repeated string optional_features = 5;
- * @return The count of optionalFeatures.
- */
- int getOptionalFeaturesCount();
- /**
- * repeated string optional_features = 5;
- * @param index The index of the element to return.
- * @return The optionalFeatures at the given index.
- */
- String getOptionalFeatures(int index);
- /**
- * repeated string optional_features = 5;
- * @param index The index of the value to return.
- * @return The bytes of the optionalFeatures at the given index.
- */
- com.google.protobuf.ByteString
- getOptionalFeaturesBytes(int index);
-
- /**
- * optional string writingprogram = 16;
- * @return Whether the writingprogram field is set.
- */
- boolean hasWritingprogram();
- /**
- * optional string writingprogram = 16;
- * @return The writingprogram.
- */
- String getWritingprogram();
- /**
- * optional string writingprogram = 16;
- * @return The bytes for writingprogram.
- */
- com.google.protobuf.ByteString
- getWritingprogramBytes();
-
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return Whether the source field is set.
- */
- boolean hasSource();
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return The source.
- */
- String getSource();
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return The bytes for source.
- */
- com.google.protobuf.ByteString
- getSourceBytes();
-
- /**
- *
- * replication timestamp, expressed in seconds since the epoch,
- * otherwise the same value as in the "timestamp=..." field
- * in the state.txt file used by Osmosis
- *
- *
- * optional int64 osmosis_replication_timestamp = 32;
- * @return Whether the osmosisReplicationTimestamp field is set.
- */
- boolean hasOsmosisReplicationTimestamp();
- /**
- *
- * replication timestamp, expressed in seconds since the epoch,
- * otherwise the same value as in the "timestamp=..." field
- * in the state.txt file used by Osmosis
- *
- *
- * optional int64 osmosis_replication_timestamp = 32;
- * @return The osmosisReplicationTimestamp.
- */
- long getOsmosisReplicationTimestamp();
-
- /**
- *
- * replication sequence number (sequenceNumber in state.txt)
- *
- *
- * optional int64 osmosis_replication_sequence_number = 33;
- * @return Whether the osmosisReplicationSequenceNumber field is set.
- */
- boolean hasOsmosisReplicationSequenceNumber();
- /**
- *
- * replication sequence number (sequenceNumber in state.txt)
- *
- *
- * optional int64 osmosis_replication_sequence_number = 33;
- * @return The osmosisReplicationSequenceNumber.
- */
- long getOsmosisReplicationSequenceNumber();
-
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return Whether the osmosisReplicationBaseUrl field is set.
- */
- boolean hasOsmosisReplicationBaseUrl();
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return The osmosisReplicationBaseUrl.
- */
- String getOsmosisReplicationBaseUrl();
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return The bytes for osmosisReplicationBaseUrl.
- */
- com.google.protobuf.ByteString
- getOsmosisReplicationBaseUrlBytes();
- }
- /**
- * Protobuf type {@code OSMPBF.HeaderBlock}
- */
- public static final class HeaderBlock extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBlock)
- HeaderBlockOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use HeaderBlock.newBuilder() to construct.
- private HeaderBlock(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private HeaderBlock() {
- requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- writingprogram_ = "";
- source_ = "";
- osmosisReplicationBaseUrl_ = "";
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new HeaderBlock();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private HeaderBlock(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- HeaderBBox.Builder subBuilder = null;
- if (((bitField0_ & 0x00000001) != 0)) {
- subBuilder = bbox_.toBuilder();
- }
- bbox_ = input.readMessage(HeaderBBox.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(bbox_);
- bbox_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000001;
- break;
- }
- case 34: {
- com.google.protobuf.ByteString bs = input.readBytes();
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- requiredFeatures_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000002;
- }
- requiredFeatures_.add(bs);
- break;
- }
- case 42: {
- com.google.protobuf.ByteString bs = input.readBytes();
- if (!((mutable_bitField0_ & 0x00000004) != 0)) {
- optionalFeatures_ = new com.google.protobuf.LazyStringArrayList();
- mutable_bitField0_ |= 0x00000004;
- }
- optionalFeatures_.add(bs);
- break;
- }
- case 130: {
- com.google.protobuf.ByteString bs = input.readBytes();
- bitField0_ |= 0x00000002;
- writingprogram_ = bs;
- break;
- }
- case 138: {
- com.google.protobuf.ByteString bs = input.readBytes();
- bitField0_ |= 0x00000004;
- source_ = bs;
- break;
- }
- case 256: {
- bitField0_ |= 0x00000008;
- osmosisReplicationTimestamp_ = input.readInt64();
- break;
- }
- case 264: {
- bitField0_ |= 0x00000010;
- osmosisReplicationSequenceNumber_ = input.readInt64();
- break;
- }
- case 274: {
- com.google.protobuf.ByteString bs = input.readBytes();
- bitField0_ |= 0x00000020;
- osmosisReplicationBaseUrl_ = bs;
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- requiredFeatures_ = requiredFeatures_.getUnmodifiableView();
- }
- if (((mutable_bitField0_ & 0x00000004) != 0)) {
- optionalFeatures_ = optionalFeatures_.getUnmodifiableView();
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_HeaderBlock_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_HeaderBlock_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- HeaderBlock.class, HeaderBlock.Builder.class);
- }
-
- private int bitField0_;
- public static final int BBOX_FIELD_NUMBER = 1;
- private HeaderBBox bbox_;
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- * @return Whether the bbox field is set.
- */
- public boolean hasBbox() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- * @return The bbox.
- */
- public HeaderBBox getBbox() {
- return bbox_ == null ? HeaderBBox.getDefaultInstance() : bbox_;
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- */
- public HeaderBBoxOrBuilder getBboxOrBuilder() {
- return bbox_ == null ? HeaderBBox.getDefaultInstance() : bbox_;
- }
-
- public static final int REQUIRED_FEATURES_FIELD_NUMBER = 4;
- private com.google.protobuf.LazyStringList requiredFeatures_;
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @return A list containing the requiredFeatures.
- */
- public com.google.protobuf.ProtocolStringList
- getRequiredFeaturesList() {
- return requiredFeatures_;
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @return The count of requiredFeatures.
- */
- public int getRequiredFeaturesCount() {
- return requiredFeatures_.size();
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @param index The index of the element to return.
- * @return The requiredFeatures at the given index.
- */
- public String getRequiredFeatures(int index) {
- return requiredFeatures_.get(index);
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @param index The index of the value to return.
- * @return The bytes of the requiredFeatures at the given index.
- */
- public com.google.protobuf.ByteString
- getRequiredFeaturesBytes(int index) {
- return requiredFeatures_.getByteString(index);
- }
-
- public static final int OPTIONAL_FEATURES_FIELD_NUMBER = 5;
- private com.google.protobuf.LazyStringList optionalFeatures_;
- /**
- * repeated string optional_features = 5;
- * @return A list containing the optionalFeatures.
- */
- public com.google.protobuf.ProtocolStringList
- getOptionalFeaturesList() {
- return optionalFeatures_;
- }
- /**
- * repeated string optional_features = 5;
- * @return The count of optionalFeatures.
- */
- public int getOptionalFeaturesCount() {
- return optionalFeatures_.size();
- }
- /**
- * repeated string optional_features = 5;
- * @param index The index of the element to return.
- * @return The optionalFeatures at the given index.
- */
- public String getOptionalFeatures(int index) {
- return optionalFeatures_.get(index);
- }
- /**
- * repeated string optional_features = 5;
- * @param index The index of the value to return.
- * @return The bytes of the optionalFeatures at the given index.
- */
- public com.google.protobuf.ByteString
- getOptionalFeaturesBytes(int index) {
- return optionalFeatures_.getByteString(index);
- }
-
- public static final int WRITINGPROGRAM_FIELD_NUMBER = 16;
- private volatile Object writingprogram_;
- /**
- * optional string writingprogram = 16;
- * @return Whether the writingprogram field is set.
- */
- public boolean hasWritingprogram() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional string writingprogram = 16;
- * @return The writingprogram.
- */
- public String getWritingprogram() {
- Object ref = writingprogram_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- writingprogram_ = s;
- }
- return s;
- }
- }
- /**
- * optional string writingprogram = 16;
- * @return The bytes for writingprogram.
- */
- public com.google.protobuf.ByteString
- getWritingprogramBytes() {
- Object ref = writingprogram_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- writingprogram_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int SOURCE_FIELD_NUMBER = 17;
- private volatile Object source_;
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return Whether the source field is set.
- */
- public boolean hasSource() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return The source.
- */
- public String getSource() {
- Object ref = source_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- source_ = s;
- }
- return s;
- }
- }
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return The bytes for source.
- */
- public com.google.protobuf.ByteString
- getSourceBytes() {
- Object ref = source_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- source_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- public static final int OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER = 32;
- private long osmosisReplicationTimestamp_;
- /**
- *
- * replication timestamp, expressed in seconds since the epoch,
- * otherwise the same value as in the "timestamp=..." field
- * in the state.txt file used by Osmosis
- *
- *
- * optional int64 osmosis_replication_timestamp = 32;
- * @return Whether the osmosisReplicationTimestamp field is set.
- */
- public boolean hasOsmosisReplicationTimestamp() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * replication timestamp, expressed in seconds since the epoch,
- * otherwise the same value as in the "timestamp=..." field
- * in the state.txt file used by Osmosis
- *
- *
- * optional int64 osmosis_replication_timestamp = 32;
- * @return The osmosisReplicationTimestamp.
- */
- public long getOsmosisReplicationTimestamp() {
- return osmosisReplicationTimestamp_;
- }
-
- public static final int OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER = 33;
- private long osmosisReplicationSequenceNumber_;
- /**
- *
- * replication sequence number (sequenceNumber in state.txt)
- *
- *
- * optional int64 osmosis_replication_sequence_number = 33;
- * @return Whether the osmosisReplicationSequenceNumber field is set.
- */
- public boolean hasOsmosisReplicationSequenceNumber() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * replication sequence number (sequenceNumber in state.txt)
- *
- *
- * optional int64 osmosis_replication_sequence_number = 33;
- * @return The osmosisReplicationSequenceNumber.
- */
- public long getOsmosisReplicationSequenceNumber() {
- return osmosisReplicationSequenceNumber_;
- }
-
- public static final int OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER = 34;
- private volatile Object osmosisReplicationBaseUrl_;
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return Whether the osmosisReplicationBaseUrl field is set.
- */
- public boolean hasOsmosisReplicationBaseUrl() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return The osmosisReplicationBaseUrl.
- */
- public String getOsmosisReplicationBaseUrl() {
- Object ref = osmosisReplicationBaseUrl_;
- if (ref instanceof String) {
- return (String) ref;
- } else {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- osmosisReplicationBaseUrl_ = s;
- }
- return s;
- }
- }
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return The bytes for osmosisReplicationBaseUrl.
- */
- public com.google.protobuf.ByteString
- getOsmosisReplicationBaseUrlBytes() {
- Object ref = osmosisReplicationBaseUrl_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- osmosisReplicationBaseUrl_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (hasBbox()) {
- if (!getBbox().isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(1, getBbox());
- }
- for (int i = 0; i < requiredFeatures_.size(); i++) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 4, requiredFeatures_.getRaw(i));
- }
- for (int i = 0; i < optionalFeatures_.size(); i++) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 5, optionalFeatures_.getRaw(i));
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 16, writingprogram_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 17, source_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeInt64(32, osmosisReplicationTimestamp_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- output.writeInt64(33, osmosisReplicationSequenceNumber_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- com.google.protobuf.GeneratedMessageV3.writeString(output, 34, osmosisReplicationBaseUrl_);
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getBbox());
- }
- {
- int dataSize = 0;
- for (int i = 0; i < requiredFeatures_.size(); i++) {
- dataSize += computeStringSizeNoTag(requiredFeatures_.getRaw(i));
- }
- size += dataSize;
- size += 1 * getRequiredFeaturesList().size();
- }
- {
- int dataSize = 0;
- for (int i = 0; i < optionalFeatures_.size(); i++) {
- dataSize += computeStringSizeNoTag(optionalFeatures_.getRaw(i));
- }
- size += dataSize;
- size += 1 * getOptionalFeaturesList().size();
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(16, writingprogram_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, source_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(32, osmosisReplicationTimestamp_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(33, osmosisReplicationSequenceNumber_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- size += com.google.protobuf.GeneratedMessageV3.computeStringSize(34, osmosisReplicationBaseUrl_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof HeaderBlock)) {
- return super.equals(obj);
- }
- HeaderBlock other = (HeaderBlock) obj;
-
- if (hasBbox() != other.hasBbox()) return false;
- if (hasBbox()) {
- if (!getBbox()
- .equals(other.getBbox())) return false;
- }
- if (!getRequiredFeaturesList()
- .equals(other.getRequiredFeaturesList())) return false;
- if (!getOptionalFeaturesList()
- .equals(other.getOptionalFeaturesList())) return false;
- if (hasWritingprogram() != other.hasWritingprogram()) return false;
- if (hasWritingprogram()) {
- if (!getWritingprogram()
- .equals(other.getWritingprogram())) return false;
- }
- if (hasSource() != other.hasSource()) return false;
- if (hasSource()) {
- if (!getSource()
- .equals(other.getSource())) return false;
- }
- if (hasOsmosisReplicationTimestamp() != other.hasOsmosisReplicationTimestamp()) return false;
- if (hasOsmosisReplicationTimestamp()) {
- if (getOsmosisReplicationTimestamp()
- != other.getOsmosisReplicationTimestamp()) return false;
- }
- if (hasOsmosisReplicationSequenceNumber() != other.hasOsmosisReplicationSequenceNumber()) return false;
- if (hasOsmosisReplicationSequenceNumber()) {
- if (getOsmosisReplicationSequenceNumber()
- != other.getOsmosisReplicationSequenceNumber()) return false;
- }
- if (hasOsmosisReplicationBaseUrl() != other.hasOsmosisReplicationBaseUrl()) return false;
- if (hasOsmosisReplicationBaseUrl()) {
- if (!getOsmosisReplicationBaseUrl()
- .equals(other.getOsmosisReplicationBaseUrl())) return false;
- }
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasBbox()) {
- hash = (37 * hash) + BBOX_FIELD_NUMBER;
- hash = (53 * hash) + getBbox().hashCode();
- }
- if (getRequiredFeaturesCount() > 0) {
- hash = (37 * hash) + REQUIRED_FEATURES_FIELD_NUMBER;
- hash = (53 * hash) + getRequiredFeaturesList().hashCode();
- }
- if (getOptionalFeaturesCount() > 0) {
- hash = (37 * hash) + OPTIONAL_FEATURES_FIELD_NUMBER;
- hash = (53 * hash) + getOptionalFeaturesList().hashCode();
- }
- if (hasWritingprogram()) {
- hash = (37 * hash) + WRITINGPROGRAM_FIELD_NUMBER;
- hash = (53 * hash) + getWritingprogram().hashCode();
- }
- if (hasSource()) {
- hash = (37 * hash) + SOURCE_FIELD_NUMBER;
- hash = (53 * hash) + getSource().hashCode();
- }
- if (hasOsmosisReplicationTimestamp()) {
- hash = (37 * hash) + OSMOSIS_REPLICATION_TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getOsmosisReplicationTimestamp());
- }
- if (hasOsmosisReplicationSequenceNumber()) {
- hash = (37 * hash) + OSMOSIS_REPLICATION_SEQUENCE_NUMBER_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getOsmosisReplicationSequenceNumber());
- }
- if (hasOsmosisReplicationBaseUrl()) {
- hash = (37 * hash) + OSMOSIS_REPLICATION_BASE_URL_FIELD_NUMBER;
- hash = (53 * hash) + getOsmosisReplicationBaseUrl().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static HeaderBlock parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static HeaderBlock parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static HeaderBlock parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static HeaderBlock parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static HeaderBlock parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static HeaderBlock parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static HeaderBlock parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static HeaderBlock parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static HeaderBlock parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static HeaderBlock parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static HeaderBlock parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static HeaderBlock parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(HeaderBlock prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code OSMPBF.HeaderBlock}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBlock)
- HeaderBlockOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_HeaderBlock_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_HeaderBlock_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- HeaderBlock.class, HeaderBlock.Builder.class);
- }
-
- // Construct using HeaderBlock.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getBboxFieldBuilder();
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- if (bboxBuilder_ == null) {
- bbox_ = null;
- } else {
- bboxBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000002);
- optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000004);
- writingprogram_ = "";
- bitField0_ = (bitField0_ & ~0x00000008);
- source_ = "";
- bitField0_ = (bitField0_ & ~0x00000010);
- osmosisReplicationTimestamp_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000020);
- osmosisReplicationSequenceNumber_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000040);
- osmosisReplicationBaseUrl_ = "";
- bitField0_ = (bitField0_ & ~0x00000080);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_HeaderBlock_descriptor;
- }
-
- @Override
- public HeaderBlock getDefaultInstanceForType() {
- return HeaderBlock.getDefaultInstance();
- }
-
- @Override
- public HeaderBlock build() {
- HeaderBlock result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public HeaderBlock buildPartial() {
- HeaderBlock result = new HeaderBlock(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- if (bboxBuilder_ == null) {
- result.bbox_ = bbox_;
- } else {
- result.bbox_ = bboxBuilder_.build();
- }
- to_bitField0_ |= 0x00000001;
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- requiredFeatures_ = requiredFeatures_.getUnmodifiableView();
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.requiredFeatures_ = requiredFeatures_;
- if (((bitField0_ & 0x00000004) != 0)) {
- optionalFeatures_ = optionalFeatures_.getUnmodifiableView();
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.optionalFeatures_ = optionalFeatures_;
- if (((from_bitField0_ & 0x00000008) != 0)) {
- to_bitField0_ |= 0x00000002;
- }
- result.writingprogram_ = writingprogram_;
- if (((from_bitField0_ & 0x00000010) != 0)) {
- to_bitField0_ |= 0x00000004;
- }
- result.source_ = source_;
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.osmosisReplicationTimestamp_ = osmosisReplicationTimestamp_;
- to_bitField0_ |= 0x00000008;
- }
- if (((from_bitField0_ & 0x00000040) != 0)) {
- result.osmosisReplicationSequenceNumber_ = osmosisReplicationSequenceNumber_;
- to_bitField0_ |= 0x00000010;
- }
- if (((from_bitField0_ & 0x00000080) != 0)) {
- to_bitField0_ |= 0x00000020;
- }
- result.osmosisReplicationBaseUrl_ = osmosisReplicationBaseUrl_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof HeaderBlock) {
- return mergeFrom((HeaderBlock)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(HeaderBlock other) {
- if (other == HeaderBlock.getDefaultInstance()) return this;
- if (other.hasBbox()) {
- mergeBbox(other.getBbox());
- }
- if (!other.requiredFeatures_.isEmpty()) {
- if (requiredFeatures_.isEmpty()) {
- requiredFeatures_ = other.requiredFeatures_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureRequiredFeaturesIsMutable();
- requiredFeatures_.addAll(other.requiredFeatures_);
- }
- onChanged();
- }
- if (!other.optionalFeatures_.isEmpty()) {
- if (optionalFeatures_.isEmpty()) {
- optionalFeatures_ = other.optionalFeatures_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureOptionalFeaturesIsMutable();
- optionalFeatures_.addAll(other.optionalFeatures_);
- }
- onChanged();
- }
- if (other.hasWritingprogram()) {
- bitField0_ |= 0x00000008;
- writingprogram_ = other.writingprogram_;
- onChanged();
- }
- if (other.hasSource()) {
- bitField0_ |= 0x00000010;
- source_ = other.source_;
- onChanged();
- }
- if (other.hasOsmosisReplicationTimestamp()) {
- setOsmosisReplicationTimestamp(other.getOsmosisReplicationTimestamp());
- }
- if (other.hasOsmosisReplicationSequenceNumber()) {
- setOsmosisReplicationSequenceNumber(other.getOsmosisReplicationSequenceNumber());
- }
- if (other.hasOsmosisReplicationBaseUrl()) {
- bitField0_ |= 0x00000080;
- osmosisReplicationBaseUrl_ = other.osmosisReplicationBaseUrl_;
- onChanged();
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- if (hasBbox()) {
- if (!getBbox().isInitialized()) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- HeaderBlock parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (HeaderBlock) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private HeaderBBox bbox_;
- private com.google.protobuf.SingleFieldBuilderV3<
- HeaderBBox, HeaderBBox.Builder, HeaderBBoxOrBuilder> bboxBuilder_;
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- * @return Whether the bbox field is set.
- */
- public boolean hasBbox() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- * @return The bbox.
- */
- public HeaderBBox getBbox() {
- if (bboxBuilder_ == null) {
- return bbox_ == null ? HeaderBBox.getDefaultInstance() : bbox_;
- } else {
- return bboxBuilder_.getMessage();
- }
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- */
- public Builder setBbox(HeaderBBox value) {
- if (bboxBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- bbox_ = value;
- onChanged();
- } else {
- bboxBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000001;
- return this;
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- */
- public Builder setBbox(
- HeaderBBox.Builder builderForValue) {
- if (bboxBuilder_ == null) {
- bbox_ = builderForValue.build();
- onChanged();
- } else {
- bboxBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000001;
- return this;
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- */
- public Builder mergeBbox(HeaderBBox value) {
- if (bboxBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0) &&
- bbox_ != null &&
- bbox_ != HeaderBBox.getDefaultInstance()) {
- bbox_ =
- HeaderBBox.newBuilder(bbox_).mergeFrom(value).buildPartial();
- } else {
- bbox_ = value;
- }
- onChanged();
- } else {
- bboxBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000001;
- return this;
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- */
- public Builder clearBbox() {
- if (bboxBuilder_ == null) {
- bbox_ = null;
- onChanged();
- } else {
- bboxBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- */
- public HeaderBBox.Builder getBboxBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getBboxFieldBuilder().getBuilder();
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- */
- public HeaderBBoxOrBuilder getBboxOrBuilder() {
- if (bboxBuilder_ != null) {
- return bboxBuilder_.getMessageOrBuilder();
- } else {
- return bbox_ == null ?
- HeaderBBox.getDefaultInstance() : bbox_;
- }
- }
- /**
- * optional .OSMPBF.HeaderBBox bbox = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- HeaderBBox, HeaderBBox.Builder, HeaderBBoxOrBuilder>
- getBboxFieldBuilder() {
- if (bboxBuilder_ == null) {
- bboxBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- HeaderBBox, HeaderBBox.Builder, HeaderBBoxOrBuilder>(
- getBbox(),
- getParentForChildren(),
- isClean());
- bbox_ = null;
- }
- return bboxBuilder_;
- }
-
- private com.google.protobuf.LazyStringList requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- private void ensureRequiredFeaturesIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- requiredFeatures_ = new com.google.protobuf.LazyStringArrayList(requiredFeatures_);
- bitField0_ |= 0x00000002;
- }
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @return A list containing the requiredFeatures.
- */
- public com.google.protobuf.ProtocolStringList
- getRequiredFeaturesList() {
- return requiredFeatures_.getUnmodifiableView();
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @return The count of requiredFeatures.
- */
- public int getRequiredFeaturesCount() {
- return requiredFeatures_.size();
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @param index The index of the element to return.
- * @return The requiredFeatures at the given index.
- */
- public String getRequiredFeatures(int index) {
- return requiredFeatures_.get(index);
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @param index The index of the value to return.
- * @return The bytes of the requiredFeatures at the given index.
- */
- public com.google.protobuf.ByteString
- getRequiredFeaturesBytes(int index) {
- return requiredFeatures_.getByteString(index);
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @param index The index to set the value at.
- * @param value The requiredFeatures to set.
- * @return This builder for chaining.
- */
- public Builder setRequiredFeatures(
- int index, String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureRequiredFeaturesIsMutable();
- requiredFeatures_.set(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @param value The requiredFeatures to add.
- * @return This builder for chaining.
- */
- public Builder addRequiredFeatures(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureRequiredFeaturesIsMutable();
- requiredFeatures_.add(value);
- onChanged();
- return this;
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @param values The requiredFeatures to add.
- * @return This builder for chaining.
- */
- public Builder addAllRequiredFeatures(
- Iterable values) {
- ensureRequiredFeaturesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, requiredFeatures_);
- onChanged();
- return this;
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @return This builder for chaining.
- */
- public Builder clearRequiredFeatures() {
- requiredFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
- /**
- *
- * Additional tags to aid in parsing this dataset
- *
- *
- * repeated string required_features = 4;
- * @param value The bytes of the requiredFeatures to add.
- * @return This builder for chaining.
- */
- public Builder addRequiredFeaturesBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureRequiredFeaturesIsMutable();
- requiredFeatures_.add(value);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.LazyStringList optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- private void ensureOptionalFeaturesIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- optionalFeatures_ = new com.google.protobuf.LazyStringArrayList(optionalFeatures_);
- bitField0_ |= 0x00000004;
- }
- }
- /**
- * repeated string optional_features = 5;
- * @return A list containing the optionalFeatures.
- */
- public com.google.protobuf.ProtocolStringList
- getOptionalFeaturesList() {
- return optionalFeatures_.getUnmodifiableView();
- }
- /**
- * repeated string optional_features = 5;
- * @return The count of optionalFeatures.
- */
- public int getOptionalFeaturesCount() {
- return optionalFeatures_.size();
- }
- /**
- * repeated string optional_features = 5;
- * @param index The index of the element to return.
- * @return The optionalFeatures at the given index.
- */
- public String getOptionalFeatures(int index) {
- return optionalFeatures_.get(index);
- }
- /**
- * repeated string optional_features = 5;
- * @param index The index of the value to return.
- * @return The bytes of the optionalFeatures at the given index.
- */
- public com.google.protobuf.ByteString
- getOptionalFeaturesBytes(int index) {
- return optionalFeatures_.getByteString(index);
- }
- /**
- * repeated string optional_features = 5;
- * @param index The index to set the value at.
- * @param value The optionalFeatures to set.
- * @return This builder for chaining.
- */
- public Builder setOptionalFeatures(
- int index, String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureOptionalFeaturesIsMutable();
- optionalFeatures_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated string optional_features = 5;
- * @param value The optionalFeatures to add.
- * @return This builder for chaining.
- */
- public Builder addOptionalFeatures(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureOptionalFeaturesIsMutable();
- optionalFeatures_.add(value);
- onChanged();
- return this;
- }
- /**
- * repeated string optional_features = 5;
- * @param values The optionalFeatures to add.
- * @return This builder for chaining.
- */
- public Builder addAllOptionalFeatures(
- Iterable values) {
- ensureOptionalFeaturesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, optionalFeatures_);
- onChanged();
- return this;
- }
- /**
- * repeated string optional_features = 5;
- * @return This builder for chaining.
- */
- public Builder clearOptionalFeatures() {
- optionalFeatures_ = com.google.protobuf.LazyStringArrayList.EMPTY;
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
- /**
- * repeated string optional_features = 5;
- * @param value The bytes of the optionalFeatures to add.
- * @return This builder for chaining.
- */
- public Builder addOptionalFeaturesBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureOptionalFeaturesIsMutable();
- optionalFeatures_.add(value);
- onChanged();
- return this;
- }
-
- private Object writingprogram_ = "";
- /**
- * optional string writingprogram = 16;
- * @return Whether the writingprogram field is set.
- */
- public boolean hasWritingprogram() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional string writingprogram = 16;
- * @return The writingprogram.
- */
- public String getWritingprogram() {
- Object ref = writingprogram_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- writingprogram_ = s;
- }
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- * optional string writingprogram = 16;
- * @return The bytes for writingprogram.
- */
- public com.google.protobuf.ByteString
- getWritingprogramBytes() {
- Object ref = writingprogram_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- writingprogram_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- * optional string writingprogram = 16;
- * @param value The writingprogram to set.
- * @return This builder for chaining.
- */
- public Builder setWritingprogram(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- writingprogram_ = value;
- onChanged();
- return this;
- }
- /**
- * optional string writingprogram = 16;
- * @return This builder for chaining.
- */
- public Builder clearWritingprogram() {
- bitField0_ = (bitField0_ & ~0x00000008);
- writingprogram_ = getDefaultInstance().getWritingprogram();
- onChanged();
- return this;
- }
- /**
- * optional string writingprogram = 16;
- * @param value The bytes for writingprogram to set.
- * @return This builder for chaining.
- */
- public Builder setWritingprogramBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000008;
- writingprogram_ = value;
- onChanged();
- return this;
- }
-
- private Object source_ = "";
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return Whether the source field is set.
- */
- public boolean hasSource() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return The source.
- */
- public String getSource() {
- Object ref = source_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- source_ = s;
- }
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return The bytes for source.
- */
- public com.google.protobuf.ByteString
- getSourceBytes() {
- Object ref = source_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- source_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @param value The source to set.
- * @return This builder for chaining.
- */
- public Builder setSource(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- source_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @return This builder for chaining.
- */
- public Builder clearSource() {
- bitField0_ = (bitField0_ & ~0x00000010);
- source_ = getDefaultInstance().getSource();
- onChanged();
- return this;
- }
- /**
- *
- * From the bbox field.
- *
- *
- * optional string source = 17;
- * @param value The bytes for source to set.
- * @return This builder for chaining.
- */
- public Builder setSourceBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000010;
- source_ = value;
- onChanged();
- return this;
- }
-
- private long osmosisReplicationTimestamp_ ;
- /**
- *
- * replication timestamp, expressed in seconds since the epoch,
- * otherwise the same value as in the "timestamp=..." field
- * in the state.txt file used by Osmosis
- *
- *
- * optional int64 osmosis_replication_timestamp = 32;
- * @return Whether the osmosisReplicationTimestamp field is set.
- */
- public boolean hasOsmosisReplicationTimestamp() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * replication timestamp, expressed in seconds since the epoch,
- * otherwise the same value as in the "timestamp=..." field
- * in the state.txt file used by Osmosis
- *
- *
- * optional int64 osmosis_replication_timestamp = 32;
- * @return The osmosisReplicationTimestamp.
- */
- public long getOsmosisReplicationTimestamp() {
- return osmosisReplicationTimestamp_;
- }
- /**
- *
- * replication timestamp, expressed in seconds since the epoch,
- * otherwise the same value as in the "timestamp=..." field
- * in the state.txt file used by Osmosis
- *
- *
- * optional int64 osmosis_replication_timestamp = 32;
- * @param value The osmosisReplicationTimestamp to set.
- * @return This builder for chaining.
- */
- public Builder setOsmosisReplicationTimestamp(long value) {
- bitField0_ |= 0x00000020;
- osmosisReplicationTimestamp_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * replication timestamp, expressed in seconds since the epoch,
- * otherwise the same value as in the "timestamp=..." field
- * in the state.txt file used by Osmosis
- *
- *
- * optional int64 osmosis_replication_timestamp = 32;
- * @return This builder for chaining.
- */
- public Builder clearOsmosisReplicationTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000020);
- osmosisReplicationTimestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private long osmosisReplicationSequenceNumber_ ;
- /**
- *
- * replication sequence number (sequenceNumber in state.txt)
- *
- *
- * optional int64 osmosis_replication_sequence_number = 33;
- * @return Whether the osmosisReplicationSequenceNumber field is set.
- */
- public boolean hasOsmosisReplicationSequenceNumber() {
- return ((bitField0_ & 0x00000040) != 0);
- }
- /**
- *
- * replication sequence number (sequenceNumber in state.txt)
- *
- *
- * optional int64 osmosis_replication_sequence_number = 33;
- * @return The osmosisReplicationSequenceNumber.
- */
- public long getOsmosisReplicationSequenceNumber() {
- return osmosisReplicationSequenceNumber_;
- }
- /**
- *
- * replication sequence number (sequenceNumber in state.txt)
- *
- *
- * optional int64 osmosis_replication_sequence_number = 33;
- * @param value The osmosisReplicationSequenceNumber to set.
- * @return This builder for chaining.
- */
- public Builder setOsmosisReplicationSequenceNumber(long value) {
- bitField0_ |= 0x00000040;
- osmosisReplicationSequenceNumber_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * replication sequence number (sequenceNumber in state.txt)
- *
- *
- * optional int64 osmosis_replication_sequence_number = 33;
- * @return This builder for chaining.
- */
- public Builder clearOsmosisReplicationSequenceNumber() {
- bitField0_ = (bitField0_ & ~0x00000040);
- osmosisReplicationSequenceNumber_ = 0L;
- onChanged();
- return this;
- }
-
- private Object osmosisReplicationBaseUrl_ = "";
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return Whether the osmosisReplicationBaseUrl field is set.
- */
- public boolean hasOsmosisReplicationBaseUrl() {
- return ((bitField0_ & 0x00000080) != 0);
- }
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return The osmosisReplicationBaseUrl.
- */
- public String getOsmosisReplicationBaseUrl() {
- Object ref = osmosisReplicationBaseUrl_;
- if (!(ref instanceof String)) {
- com.google.protobuf.ByteString bs =
- (com.google.protobuf.ByteString) ref;
- String s = bs.toStringUtf8();
- if (bs.isValidUtf8()) {
- osmosisReplicationBaseUrl_ = s;
- }
- return s;
- } else {
- return (String) ref;
- }
- }
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return The bytes for osmosisReplicationBaseUrl.
- */
- public com.google.protobuf.ByteString
- getOsmosisReplicationBaseUrlBytes() {
- Object ref = osmosisReplicationBaseUrl_;
- if (ref instanceof String) {
- com.google.protobuf.ByteString b =
- com.google.protobuf.ByteString.copyFromUtf8(
- (String) ref);
- osmosisReplicationBaseUrl_ = b;
- return b;
- } else {
- return (com.google.protobuf.ByteString) ref;
- }
- }
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @param value The osmosisReplicationBaseUrl to set.
- * @return This builder for chaining.
- */
- public Builder setOsmosisReplicationBaseUrl(
- String value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000080;
- osmosisReplicationBaseUrl_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @return This builder for chaining.
- */
- public Builder clearOsmosisReplicationBaseUrl() {
- bitField0_ = (bitField0_ & ~0x00000080);
- osmosisReplicationBaseUrl_ = getDefaultInstance().getOsmosisReplicationBaseUrl();
- onChanged();
- return this;
- }
- /**
- *
- * replication base URL (from Osmosis' configuration.txt file)
- *
- *
- * optional string osmosis_replication_base_url = 34;
- * @param value The bytes for osmosisReplicationBaseUrl to set.
- * @return This builder for chaining.
- */
- public Builder setOsmosisReplicationBaseUrlBytes(
- com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- bitField0_ |= 0x00000080;
- osmosisReplicationBaseUrl_ = value;
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBlock)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBlock)
- private static final HeaderBlock DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new HeaderBlock();
- }
-
- public static HeaderBlock getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public HeaderBlock parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new HeaderBlock(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public HeaderBlock getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface HeaderBBoxOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.HeaderBBox)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * required sint64 left = 1;
- * @return Whether the left field is set.
- */
- boolean hasLeft();
- /**
- * required sint64 left = 1;
- * @return The left.
- */
- long getLeft();
-
- /**
- * required sint64 right = 2;
- * @return Whether the right field is set.
- */
- boolean hasRight();
- /**
- * required sint64 right = 2;
- * @return The right.
- */
- long getRight();
-
- /**
- * required sint64 top = 3;
- * @return Whether the top field is set.
- */
- boolean hasTop();
- /**
- * required sint64 top = 3;
- * @return The top.
- */
- long getTop();
-
- /**
- * required sint64 bottom = 4;
- * @return Whether the bottom field is set.
- */
- boolean hasBottom();
- /**
- * required sint64 bottom = 4;
- * @return The bottom.
- */
- long getBottom();
- }
- /**
- * Protobuf type {@code OSMPBF.HeaderBBox}
- */
- public static final class HeaderBBox extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.HeaderBBox)
- HeaderBBoxOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use HeaderBBox.newBuilder() to construct.
- private HeaderBBox(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private HeaderBBox() {
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new HeaderBBox();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private HeaderBBox(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- bitField0_ |= 0x00000001;
- left_ = input.readSInt64();
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- right_ = input.readSInt64();
- break;
- }
- case 24: {
- bitField0_ |= 0x00000004;
- top_ = input.readSInt64();
- break;
- }
- case 32: {
- bitField0_ |= 0x00000008;
- bottom_ = input.readSInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_HeaderBBox_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_HeaderBBox_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- HeaderBBox.class, HeaderBBox.Builder.class);
- }
-
- private int bitField0_;
- public static final int LEFT_FIELD_NUMBER = 1;
- private long left_;
- /**
- * required sint64 left = 1;
- * @return Whether the left field is set.
- */
- public boolean hasLeft() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required sint64 left = 1;
- * @return The left.
- */
- public long getLeft() {
- return left_;
- }
-
- public static final int RIGHT_FIELD_NUMBER = 2;
- private long right_;
- /**
- * required sint64 right = 2;
- * @return Whether the right field is set.
- */
- public boolean hasRight() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * required sint64 right = 2;
- * @return The right.
- */
- public long getRight() {
- return right_;
- }
-
- public static final int TOP_FIELD_NUMBER = 3;
- private long top_;
- /**
- * required sint64 top = 3;
- * @return Whether the top field is set.
- */
- public boolean hasTop() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- * required sint64 top = 3;
- * @return The top.
- */
- public long getTop() {
- return top_;
- }
-
- public static final int BOTTOM_FIELD_NUMBER = 4;
- private long bottom_;
- /**
- * required sint64 bottom = 4;
- * @return Whether the bottom field is set.
- */
- public boolean hasBottom() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * required sint64 bottom = 4;
- * @return The bottom.
- */
- public long getBottom() {
- return bottom_;
- }
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!hasLeft()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasRight()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasTop()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasBottom()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeSInt64(1, left_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeSInt64(2, right_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeSInt64(3, top_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeSInt64(4, bottom_);
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(1, left_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(2, right_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(3, top_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(4, bottom_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof HeaderBBox)) {
- return super.equals(obj);
- }
- HeaderBBox other = (HeaderBBox) obj;
-
- if (hasLeft() != other.hasLeft()) return false;
- if (hasLeft()) {
- if (getLeft()
- != other.getLeft()) return false;
- }
- if (hasRight() != other.hasRight()) return false;
- if (hasRight()) {
- if (getRight()
- != other.getRight()) return false;
- }
- if (hasTop() != other.hasTop()) return false;
- if (hasTop()) {
- if (getTop()
- != other.getTop()) return false;
- }
- if (hasBottom() != other.hasBottom()) return false;
- if (hasBottom()) {
- if (getBottom()
- != other.getBottom()) return false;
- }
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasLeft()) {
- hash = (37 * hash) + LEFT_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getLeft());
- }
- if (hasRight()) {
- hash = (37 * hash) + RIGHT_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getRight());
- }
- if (hasTop()) {
- hash = (37 * hash) + TOP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getTop());
- }
- if (hasBottom()) {
- hash = (37 * hash) + BOTTOM_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getBottom());
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static HeaderBBox parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static HeaderBBox parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static HeaderBBox parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static HeaderBBox parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static HeaderBBox parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static HeaderBBox parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static HeaderBBox parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static HeaderBBox parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static HeaderBBox parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static HeaderBBox parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static HeaderBBox parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static HeaderBBox parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(HeaderBBox prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code OSMPBF.HeaderBBox}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.HeaderBBox)
- HeaderBBoxOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_HeaderBBox_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_HeaderBBox_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- HeaderBBox.class, HeaderBBox.Builder.class);
- }
-
- // Construct using HeaderBBox.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- left_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- right_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000002);
- top_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000004);
- bottom_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000008);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_HeaderBBox_descriptor;
- }
-
- @Override
- public HeaderBBox getDefaultInstanceForType() {
- return HeaderBBox.getDefaultInstance();
- }
-
- @Override
- public HeaderBBox build() {
- HeaderBBox result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public HeaderBBox buildPartial() {
- HeaderBBox result = new HeaderBBox(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.left_ = left_;
- to_bitField0_ |= 0x00000001;
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.right_ = right_;
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.top_ = top_;
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.bottom_ = bottom_;
- to_bitField0_ |= 0x00000008;
- }
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof HeaderBBox) {
- return mergeFrom((HeaderBBox)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(HeaderBBox other) {
- if (other == HeaderBBox.getDefaultInstance()) return this;
- if (other.hasLeft()) {
- setLeft(other.getLeft());
- }
- if (other.hasRight()) {
- setRight(other.getRight());
- }
- if (other.hasTop()) {
- setTop(other.getTop());
- }
- if (other.hasBottom()) {
- setBottom(other.getBottom());
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- if (!hasLeft()) {
- return false;
- }
- if (!hasRight()) {
- return false;
- }
- if (!hasTop()) {
- return false;
- }
- if (!hasBottom()) {
- return false;
- }
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- HeaderBBox parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (HeaderBBox) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private long left_ ;
- /**
- * required sint64 left = 1;
- * @return Whether the left field is set.
- */
- public boolean hasLeft() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required sint64 left = 1;
- * @return The left.
- */
- public long getLeft() {
- return left_;
- }
- /**
- * required sint64 left = 1;
- * @param value The left to set.
- * @return This builder for chaining.
- */
- public Builder setLeft(long value) {
- bitField0_ |= 0x00000001;
- left_ = value;
- onChanged();
- return this;
- }
- /**
- * required sint64 left = 1;
- * @return This builder for chaining.
- */
- public Builder clearLeft() {
- bitField0_ = (bitField0_ & ~0x00000001);
- left_ = 0L;
- onChanged();
- return this;
- }
-
- private long right_ ;
- /**
- * required sint64 right = 2;
- * @return Whether the right field is set.
- */
- public boolean hasRight() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * required sint64 right = 2;
- * @return The right.
- */
- public long getRight() {
- return right_;
- }
- /**
- * required sint64 right = 2;
- * @param value The right to set.
- * @return This builder for chaining.
- */
- public Builder setRight(long value) {
- bitField0_ |= 0x00000002;
- right_ = value;
- onChanged();
- return this;
- }
- /**
- * required sint64 right = 2;
- * @return This builder for chaining.
- */
- public Builder clearRight() {
- bitField0_ = (bitField0_ & ~0x00000002);
- right_ = 0L;
- onChanged();
- return this;
- }
-
- private long top_ ;
- /**
- * required sint64 top = 3;
- * @return Whether the top field is set.
- */
- public boolean hasTop() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- * required sint64 top = 3;
- * @return The top.
- */
- public long getTop() {
- return top_;
- }
- /**
- * required sint64 top = 3;
- * @param value The top to set.
- * @return This builder for chaining.
- */
- public Builder setTop(long value) {
- bitField0_ |= 0x00000004;
- top_ = value;
- onChanged();
- return this;
- }
- /**
- * required sint64 top = 3;
- * @return This builder for chaining.
- */
- public Builder clearTop() {
- bitField0_ = (bitField0_ & ~0x00000004);
- top_ = 0L;
- onChanged();
- return this;
- }
-
- private long bottom_ ;
- /**
- * required sint64 bottom = 4;
- * @return Whether the bottom field is set.
- */
- public boolean hasBottom() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * required sint64 bottom = 4;
- * @return The bottom.
- */
- public long getBottom() {
- return bottom_;
- }
- /**
- * required sint64 bottom = 4;
- * @param value The bottom to set.
- * @return This builder for chaining.
- */
- public Builder setBottom(long value) {
- bitField0_ |= 0x00000008;
- bottom_ = value;
- onChanged();
- return this;
- }
- /**
- * required sint64 bottom = 4;
- * @return This builder for chaining.
- */
- public Builder clearBottom() {
- bitField0_ = (bitField0_ & ~0x00000008);
- bottom_ = 0L;
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.HeaderBBox)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.HeaderBBox)
- private static final HeaderBBox DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new HeaderBBox();
- }
-
- public static HeaderBBox getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public HeaderBBox parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new HeaderBBox(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public HeaderBBox getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface PrimitiveBlockOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.PrimitiveBlock)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- * @return Whether the stringtable field is set.
- */
- boolean hasStringtable();
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- * @return The stringtable.
- */
- StringTable getStringtable();
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- StringTableOrBuilder getStringtableOrBuilder();
-
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- java.util.List
- getPrimitivegroupList();
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- PrimitiveGroup getPrimitivegroup(int index);
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- int getPrimitivegroupCount();
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- java.util.List extends PrimitiveGroupOrBuilder>
- getPrimitivegroupOrBuilderList();
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(
- int index);
-
- /**
- *
- * Granularity, units of nanodegrees, used to store coordinates in this block
- *
- *
- * optional int32 granularity = 17 [default = 100];
- * @return Whether the granularity field is set.
- */
- boolean hasGranularity();
- /**
- *
- * Granularity, units of nanodegrees, used to store coordinates in this block
- *
- *
- * optional int32 granularity = 17 [default = 100];
- * @return The granularity.
- */
- int getGranularity();
-
- /**
- *
- * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
- *
- *
- * optional int64 lat_offset = 19 [default = 0];
- * @return Whether the latOffset field is set.
- */
- boolean hasLatOffset();
- /**
- *
- * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
- *
- *
- * optional int64 lat_offset = 19 [default = 0];
- * @return The latOffset.
- */
- long getLatOffset();
-
- /**
- * optional int64 lon_offset = 20 [default = 0];
- * @return Whether the lonOffset field is set.
- */
- boolean hasLonOffset();
- /**
- * optional int64 lon_offset = 20 [default = 0];
- * @return The lonOffset.
- */
- long getLonOffset();
-
- /**
- *
- * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
- *
- *
- * optional int32 date_granularity = 18 [default = 1000];
- * @return Whether the dateGranularity field is set.
- */
- boolean hasDateGranularity();
- /**
- *
- * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
- *
- *
- * optional int32 date_granularity = 18 [default = 1000];
- * @return The dateGranularity.
- */
- int getDateGranularity();
- }
- /**
- * Protobuf type {@code OSMPBF.PrimitiveBlock}
- */
- public static final class PrimitiveBlock extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveBlock)
- PrimitiveBlockOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use PrimitiveBlock.newBuilder() to construct.
- private PrimitiveBlock(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private PrimitiveBlock() {
- primitivegroup_ = java.util.Collections.emptyList();
- granularity_ = 100;
- dateGranularity_ = 1000;
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new PrimitiveBlock();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private PrimitiveBlock(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- StringTable.Builder subBuilder = null;
- if (((bitField0_ & 0x00000001) != 0)) {
- subBuilder = stringtable_.toBuilder();
- }
- stringtable_ = input.readMessage(StringTable.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(stringtable_);
- stringtable_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000001;
- break;
- }
- case 18: {
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- primitivegroup_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000002;
- }
- primitivegroup_.add(
- input.readMessage(PrimitiveGroup.PARSER, extensionRegistry));
- break;
- }
- case 136: {
- bitField0_ |= 0x00000002;
- granularity_ = input.readInt32();
- break;
- }
- case 144: {
- bitField0_ |= 0x00000010;
- dateGranularity_ = input.readInt32();
- break;
- }
- case 152: {
- bitField0_ |= 0x00000004;
- latOffset_ = input.readInt64();
- break;
- }
- case 160: {
- bitField0_ |= 0x00000008;
- lonOffset_ = input.readInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- primitivegroup_ = java.util.Collections.unmodifiableList(primitivegroup_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_PrimitiveBlock_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- PrimitiveBlock.class, PrimitiveBlock.Builder.class);
- }
-
- private int bitField0_;
- public static final int STRINGTABLE_FIELD_NUMBER = 1;
- private StringTable stringtable_;
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- * @return Whether the stringtable field is set.
- */
- public boolean hasStringtable() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- * @return The stringtable.
- */
- public StringTable getStringtable() {
- return stringtable_ == null ? StringTable.getDefaultInstance() : stringtable_;
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- public StringTableOrBuilder getStringtableOrBuilder() {
- return stringtable_ == null ? StringTable.getDefaultInstance() : stringtable_;
- }
-
- public static final int PRIMITIVEGROUP_FIELD_NUMBER = 2;
- private java.util.List primitivegroup_;
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public java.util.List getPrimitivegroupList() {
- return primitivegroup_;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public java.util.List extends PrimitiveGroupOrBuilder>
- getPrimitivegroupOrBuilderList() {
- return primitivegroup_;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public int getPrimitivegroupCount() {
- return primitivegroup_.size();
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public PrimitiveGroup getPrimitivegroup(int index) {
- return primitivegroup_.get(index);
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(
- int index) {
- return primitivegroup_.get(index);
- }
-
- public static final int GRANULARITY_FIELD_NUMBER = 17;
- private int granularity_;
- /**
- *
- * Granularity, units of nanodegrees, used to store coordinates in this block
- *
- *
- * optional int32 granularity = 17 [default = 100];
- * @return Whether the granularity field is set.
- */
- public boolean hasGranularity() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * Granularity, units of nanodegrees, used to store coordinates in this block
- *
- *
- * optional int32 granularity = 17 [default = 100];
- * @return The granularity.
- */
- public int getGranularity() {
- return granularity_;
- }
-
- public static final int LAT_OFFSET_FIELD_NUMBER = 19;
- private long latOffset_;
- /**
- *
- * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
- *
- *
- * optional int64 lat_offset = 19 [default = 0];
- * @return Whether the latOffset field is set.
- */
- public boolean hasLatOffset() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
- *
- *
- * optional int64 lat_offset = 19 [default = 0];
- * @return The latOffset.
- */
- public long getLatOffset() {
- return latOffset_;
- }
-
- public static final int LON_OFFSET_FIELD_NUMBER = 20;
- private long lonOffset_;
- /**
- * optional int64 lon_offset = 20 [default = 0];
- * @return Whether the lonOffset field is set.
- */
- public boolean hasLonOffset() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional int64 lon_offset = 20 [default = 0];
- * @return The lonOffset.
- */
- public long getLonOffset() {
- return lonOffset_;
- }
-
- public static final int DATE_GRANULARITY_FIELD_NUMBER = 18;
- private int dateGranularity_;
- /**
- *
- * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
- *
- *
- * optional int32 date_granularity = 18 [default = 1000];
- * @return Whether the dateGranularity field is set.
- */
- public boolean hasDateGranularity() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
- *
- *
- * optional int32 date_granularity = 18 [default = 1000];
- * @return The dateGranularity.
- */
- public int getDateGranularity() {
- return dateGranularity_;
- }
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!hasStringtable()) {
- memoizedIsInitialized = 0;
- return false;
- }
- for (int i = 0; i < getPrimitivegroupCount(); i++) {
- if (!getPrimitivegroup(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(1, getStringtable());
- }
- for (int i = 0; i < primitivegroup_.size(); i++) {
- output.writeMessage(2, primitivegroup_.get(i));
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeInt32(17, granularity_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- output.writeInt32(18, dateGranularity_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeInt64(19, latOffset_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeInt64(20, lonOffset_);
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, getStringtable());
- }
- for (int i = 0; i < primitivegroup_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, primitivegroup_.get(i));
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(17, granularity_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(18, dateGranularity_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(19, latOffset_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(20, lonOffset_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof PrimitiveBlock)) {
- return super.equals(obj);
- }
- PrimitiveBlock other = (PrimitiveBlock) obj;
-
- if (hasStringtable() != other.hasStringtable()) return false;
- if (hasStringtable()) {
- if (!getStringtable()
- .equals(other.getStringtable())) return false;
- }
- if (!getPrimitivegroupList()
- .equals(other.getPrimitivegroupList())) return false;
- if (hasGranularity() != other.hasGranularity()) return false;
- if (hasGranularity()) {
- if (getGranularity()
- != other.getGranularity()) return false;
- }
- if (hasLatOffset() != other.hasLatOffset()) return false;
- if (hasLatOffset()) {
- if (getLatOffset()
- != other.getLatOffset()) return false;
- }
- if (hasLonOffset() != other.hasLonOffset()) return false;
- if (hasLonOffset()) {
- if (getLonOffset()
- != other.getLonOffset()) return false;
- }
- if (hasDateGranularity() != other.hasDateGranularity()) return false;
- if (hasDateGranularity()) {
- if (getDateGranularity()
- != other.getDateGranularity()) return false;
- }
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasStringtable()) {
- hash = (37 * hash) + STRINGTABLE_FIELD_NUMBER;
- hash = (53 * hash) + getStringtable().hashCode();
- }
- if (getPrimitivegroupCount() > 0) {
- hash = (37 * hash) + PRIMITIVEGROUP_FIELD_NUMBER;
- hash = (53 * hash) + getPrimitivegroupList().hashCode();
- }
- if (hasGranularity()) {
- hash = (37 * hash) + GRANULARITY_FIELD_NUMBER;
- hash = (53 * hash) + getGranularity();
- }
- if (hasLatOffset()) {
- hash = (37 * hash) + LAT_OFFSET_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getLatOffset());
- }
- if (hasLonOffset()) {
- hash = (37 * hash) + LON_OFFSET_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getLonOffset());
- }
- if (hasDateGranularity()) {
- hash = (37 * hash) + DATE_GRANULARITY_FIELD_NUMBER;
- hash = (53 * hash) + getDateGranularity();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static PrimitiveBlock parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static PrimitiveBlock parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static PrimitiveBlock parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static PrimitiveBlock parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static PrimitiveBlock parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static PrimitiveBlock parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static PrimitiveBlock parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static PrimitiveBlock parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static PrimitiveBlock parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static PrimitiveBlock parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static PrimitiveBlock parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static PrimitiveBlock parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(PrimitiveBlock prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code OSMPBF.PrimitiveBlock}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveBlock)
- PrimitiveBlockOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_PrimitiveBlock_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_PrimitiveBlock_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- PrimitiveBlock.class, PrimitiveBlock.Builder.class);
- }
-
- // Construct using PrimitiveBlock.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getStringtableFieldBuilder();
- getPrimitivegroupFieldBuilder();
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- if (stringtableBuilder_ == null) {
- stringtable_ = null;
- } else {
- stringtableBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- if (primitivegroupBuilder_ == null) {
- primitivegroup_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- primitivegroupBuilder_.clear();
- }
- granularity_ = 100;
- bitField0_ = (bitField0_ & ~0x00000004);
- latOffset_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000008);
- lonOffset_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000010);
- dateGranularity_ = 1000;
- bitField0_ = (bitField0_ & ~0x00000020);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_PrimitiveBlock_descriptor;
- }
-
- @Override
- public PrimitiveBlock getDefaultInstanceForType() {
- return PrimitiveBlock.getDefaultInstance();
- }
-
- @Override
- public PrimitiveBlock build() {
- PrimitiveBlock result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public PrimitiveBlock buildPartial() {
- PrimitiveBlock result = new PrimitiveBlock(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- if (stringtableBuilder_ == null) {
- result.stringtable_ = stringtable_;
- } else {
- result.stringtable_ = stringtableBuilder_.build();
- }
- to_bitField0_ |= 0x00000001;
- }
- if (primitivegroupBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0)) {
- primitivegroup_ = java.util.Collections.unmodifiableList(primitivegroup_);
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.primitivegroup_ = primitivegroup_;
- } else {
- result.primitivegroup_ = primitivegroupBuilder_.build();
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- to_bitField0_ |= 0x00000002;
- }
- result.granularity_ = granularity_;
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.latOffset_ = latOffset_;
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.lonOffset_ = lonOffset_;
- to_bitField0_ |= 0x00000008;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- to_bitField0_ |= 0x00000010;
- }
- result.dateGranularity_ = dateGranularity_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof PrimitiveBlock) {
- return mergeFrom((PrimitiveBlock)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(PrimitiveBlock other) {
- if (other == PrimitiveBlock.getDefaultInstance()) return this;
- if (other.hasStringtable()) {
- mergeStringtable(other.getStringtable());
- }
- if (primitivegroupBuilder_ == null) {
- if (!other.primitivegroup_.isEmpty()) {
- if (primitivegroup_.isEmpty()) {
- primitivegroup_ = other.primitivegroup_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensurePrimitivegroupIsMutable();
- primitivegroup_.addAll(other.primitivegroup_);
- }
- onChanged();
- }
- } else {
- if (!other.primitivegroup_.isEmpty()) {
- if (primitivegroupBuilder_.isEmpty()) {
- primitivegroupBuilder_.dispose();
- primitivegroupBuilder_ = null;
- primitivegroup_ = other.primitivegroup_;
- bitField0_ = (bitField0_ & ~0x00000002);
- primitivegroupBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getPrimitivegroupFieldBuilder() : null;
- } else {
- primitivegroupBuilder_.addAllMessages(other.primitivegroup_);
- }
- }
- }
- if (other.hasGranularity()) {
- setGranularity(other.getGranularity());
- }
- if (other.hasLatOffset()) {
- setLatOffset(other.getLatOffset());
- }
- if (other.hasLonOffset()) {
- setLonOffset(other.getLonOffset());
- }
- if (other.hasDateGranularity()) {
- setDateGranularity(other.getDateGranularity());
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- if (!hasStringtable()) {
- return false;
- }
- for (int i = 0; i < getPrimitivegroupCount(); i++) {
- if (!getPrimitivegroup(i).isInitialized()) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- PrimitiveBlock parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (PrimitiveBlock) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private StringTable stringtable_;
- private com.google.protobuf.SingleFieldBuilderV3<
- StringTable, StringTable.Builder, StringTableOrBuilder> stringtableBuilder_;
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- * @return Whether the stringtable field is set.
- */
- public boolean hasStringtable() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- * @return The stringtable.
- */
- public StringTable getStringtable() {
- if (stringtableBuilder_ == null) {
- return stringtable_ == null ? StringTable.getDefaultInstance() : stringtable_;
- } else {
- return stringtableBuilder_.getMessage();
- }
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- public Builder setStringtable(StringTable value) {
- if (stringtableBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- stringtable_ = value;
- onChanged();
- } else {
- stringtableBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000001;
- return this;
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- public Builder setStringtable(
- StringTable.Builder builderForValue) {
- if (stringtableBuilder_ == null) {
- stringtable_ = builderForValue.build();
- onChanged();
- } else {
- stringtableBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000001;
- return this;
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- public Builder mergeStringtable(StringTable value) {
- if (stringtableBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0) &&
- stringtable_ != null &&
- stringtable_ != StringTable.getDefaultInstance()) {
- stringtable_ =
- StringTable.newBuilder(stringtable_).mergeFrom(value).buildPartial();
- } else {
- stringtable_ = value;
- }
- onChanged();
- } else {
- stringtableBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000001;
- return this;
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- public Builder clearStringtable() {
- if (stringtableBuilder_ == null) {
- stringtable_ = null;
- onChanged();
- } else {
- stringtableBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- public StringTable.Builder getStringtableBuilder() {
- bitField0_ |= 0x00000001;
- onChanged();
- return getStringtableFieldBuilder().getBuilder();
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- public StringTableOrBuilder getStringtableOrBuilder() {
- if (stringtableBuilder_ != null) {
- return stringtableBuilder_.getMessageOrBuilder();
- } else {
- return stringtable_ == null ?
- StringTable.getDefaultInstance() : stringtable_;
- }
- }
- /**
- * required .OSMPBF.StringTable stringtable = 1;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- StringTable, StringTable.Builder, StringTableOrBuilder>
- getStringtableFieldBuilder() {
- if (stringtableBuilder_ == null) {
- stringtableBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- StringTable, StringTable.Builder, StringTableOrBuilder>(
- getStringtable(),
- getParentForChildren(),
- isClean());
- stringtable_ = null;
- }
- return stringtableBuilder_;
- }
-
- private java.util.List primitivegroup_ =
- java.util.Collections.emptyList();
- private void ensurePrimitivegroupIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- primitivegroup_ = new java.util.ArrayList(primitivegroup_);
- bitField0_ |= 0x00000002;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- PrimitiveGroup, PrimitiveGroup.Builder, PrimitiveGroupOrBuilder> primitivegroupBuilder_;
-
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public java.util.List getPrimitivegroupList() {
- if (primitivegroupBuilder_ == null) {
- return java.util.Collections.unmodifiableList(primitivegroup_);
- } else {
- return primitivegroupBuilder_.getMessageList();
- }
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public int getPrimitivegroupCount() {
- if (primitivegroupBuilder_ == null) {
- return primitivegroup_.size();
- } else {
- return primitivegroupBuilder_.getCount();
- }
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public PrimitiveGroup getPrimitivegroup(int index) {
- if (primitivegroupBuilder_ == null) {
- return primitivegroup_.get(index);
- } else {
- return primitivegroupBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder setPrimitivegroup(
- int index, PrimitiveGroup value) {
- if (primitivegroupBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePrimitivegroupIsMutable();
- primitivegroup_.set(index, value);
- onChanged();
- } else {
- primitivegroupBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder setPrimitivegroup(
- int index, PrimitiveGroup.Builder builderForValue) {
- if (primitivegroupBuilder_ == null) {
- ensurePrimitivegroupIsMutable();
- primitivegroup_.set(index, builderForValue.build());
- onChanged();
- } else {
- primitivegroupBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder addPrimitivegroup(PrimitiveGroup value) {
- if (primitivegroupBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePrimitivegroupIsMutable();
- primitivegroup_.add(value);
- onChanged();
- } else {
- primitivegroupBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder addPrimitivegroup(
- int index, PrimitiveGroup value) {
- if (primitivegroupBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensurePrimitivegroupIsMutable();
- primitivegroup_.add(index, value);
- onChanged();
- } else {
- primitivegroupBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder addPrimitivegroup(
- PrimitiveGroup.Builder builderForValue) {
- if (primitivegroupBuilder_ == null) {
- ensurePrimitivegroupIsMutable();
- primitivegroup_.add(builderForValue.build());
- onChanged();
- } else {
- primitivegroupBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder addPrimitivegroup(
- int index, PrimitiveGroup.Builder builderForValue) {
- if (primitivegroupBuilder_ == null) {
- ensurePrimitivegroupIsMutable();
- primitivegroup_.add(index, builderForValue.build());
- onChanged();
- } else {
- primitivegroupBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder addAllPrimitivegroup(
- Iterable extends PrimitiveGroup> values) {
- if (primitivegroupBuilder_ == null) {
- ensurePrimitivegroupIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, primitivegroup_);
- onChanged();
- } else {
- primitivegroupBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder clearPrimitivegroup() {
- if (primitivegroupBuilder_ == null) {
- primitivegroup_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- } else {
- primitivegroupBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public Builder removePrimitivegroup(int index) {
- if (primitivegroupBuilder_ == null) {
- ensurePrimitivegroupIsMutable();
- primitivegroup_.remove(index);
- onChanged();
- } else {
- primitivegroupBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public PrimitiveGroup.Builder getPrimitivegroupBuilder(
- int index) {
- return getPrimitivegroupFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public PrimitiveGroupOrBuilder getPrimitivegroupOrBuilder(
- int index) {
- if (primitivegroupBuilder_ == null) {
- return primitivegroup_.get(index); } else {
- return primitivegroupBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public java.util.List extends PrimitiveGroupOrBuilder>
- getPrimitivegroupOrBuilderList() {
- if (primitivegroupBuilder_ != null) {
- return primitivegroupBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(primitivegroup_);
- }
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public PrimitiveGroup.Builder addPrimitivegroupBuilder() {
- return getPrimitivegroupFieldBuilder().addBuilder(
- PrimitiveGroup.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public PrimitiveGroup.Builder addPrimitivegroupBuilder(
- int index) {
- return getPrimitivegroupFieldBuilder().addBuilder(
- index, PrimitiveGroup.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.PrimitiveGroup primitivegroup = 2;
- */
- public java.util.List
- getPrimitivegroupBuilderList() {
- return getPrimitivegroupFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- PrimitiveGroup, PrimitiveGroup.Builder, PrimitiveGroupOrBuilder>
- getPrimitivegroupFieldBuilder() {
- if (primitivegroupBuilder_ == null) {
- primitivegroupBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- PrimitiveGroup, PrimitiveGroup.Builder, PrimitiveGroupOrBuilder>(
- primitivegroup_,
- ((bitField0_ & 0x00000002) != 0),
- getParentForChildren(),
- isClean());
- primitivegroup_ = null;
- }
- return primitivegroupBuilder_;
- }
-
- private int granularity_ = 100;
- /**
- *
- * Granularity, units of nanodegrees, used to store coordinates in this block
- *
- *
- * optional int32 granularity = 17 [default = 100];
- * @return Whether the granularity field is set.
- */
- public boolean hasGranularity() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- *
- * Granularity, units of nanodegrees, used to store coordinates in this block
- *
- *
- * optional int32 granularity = 17 [default = 100];
- * @return The granularity.
- */
- public int getGranularity() {
- return granularity_;
- }
- /**
- *
- * Granularity, units of nanodegrees, used to store coordinates in this block
- *
- *
- * optional int32 granularity = 17 [default = 100];
- * @param value The granularity to set.
- * @return This builder for chaining.
- */
- public Builder setGranularity(int value) {
- bitField0_ |= 0x00000004;
- granularity_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Granularity, units of nanodegrees, used to store coordinates in this block
- *
- *
- * optional int32 granularity = 17 [default = 100];
- * @return This builder for chaining.
- */
- public Builder clearGranularity() {
- bitField0_ = (bitField0_ & ~0x00000004);
- granularity_ = 100;
- onChanged();
- return this;
- }
-
- private long latOffset_ ;
- /**
- *
- * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
- *
- *
- * optional int64 lat_offset = 19 [default = 0];
- * @return Whether the latOffset field is set.
- */
- public boolean hasLatOffset() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
- *
- *
- * optional int64 lat_offset = 19 [default = 0];
- * @return The latOffset.
- */
- public long getLatOffset() {
- return latOffset_;
- }
- /**
- *
- * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
- *
- *
- * optional int64 lat_offset = 19 [default = 0];
- * @param value The latOffset to set.
- * @return This builder for chaining.
- */
- public Builder setLatOffset(long value) {
- bitField0_ |= 0x00000008;
- latOffset_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Offset value between the output coordinates coordinates and the granularity grid in unites of nanodegrees.
- *
- *
- * optional int64 lat_offset = 19 [default = 0];
- * @return This builder for chaining.
- */
- public Builder clearLatOffset() {
- bitField0_ = (bitField0_ & ~0x00000008);
- latOffset_ = 0L;
- onChanged();
- return this;
- }
-
- private long lonOffset_ ;
- /**
- * optional int64 lon_offset = 20 [default = 0];
- * @return Whether the lonOffset field is set.
- */
- public boolean hasLonOffset() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- * optional int64 lon_offset = 20 [default = 0];
- * @return The lonOffset.
- */
- public long getLonOffset() {
- return lonOffset_;
- }
- /**
- * optional int64 lon_offset = 20 [default = 0];
- * @param value The lonOffset to set.
- * @return This builder for chaining.
- */
- public Builder setLonOffset(long value) {
- bitField0_ |= 0x00000010;
- lonOffset_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 lon_offset = 20 [default = 0];
- * @return This builder for chaining.
- */
- public Builder clearLonOffset() {
- bitField0_ = (bitField0_ & ~0x00000010);
- lonOffset_ = 0L;
- onChanged();
- return this;
- }
-
- private int dateGranularity_ = 1000;
- /**
- *
- * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
- *
- *
- * optional int32 date_granularity = 18 [default = 1000];
- * @return Whether the dateGranularity field is set.
- */
- public boolean hasDateGranularity() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
- *
- *
- * optional int32 date_granularity = 18 [default = 1000];
- * @return The dateGranularity.
- */
- public int getDateGranularity() {
- return dateGranularity_;
- }
- /**
- *
- * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
- *
- *
- * optional int32 date_granularity = 18 [default = 1000];
- * @param value The dateGranularity to set.
- * @return This builder for chaining.
- */
- public Builder setDateGranularity(int value) {
- bitField0_ |= 0x00000020;
- dateGranularity_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * Granularity of dates, normally represented in units of milliseconds since the 1970 epoch.
- *
- *
- * optional int32 date_granularity = 18 [default = 1000];
- * @return This builder for chaining.
- */
- public Builder clearDateGranularity() {
- bitField0_ = (bitField0_ & ~0x00000020);
- dateGranularity_ = 1000;
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveBlock)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveBlock)
- private static final PrimitiveBlock DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new PrimitiveBlock();
- }
-
- public static PrimitiveBlock getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public PrimitiveBlock parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new PrimitiveBlock(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public PrimitiveBlock getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface PrimitiveGroupOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.PrimitiveGroup)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- java.util.List
- getNodesList();
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- Node getNodes(int index);
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- int getNodesCount();
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- java.util.List extends NodeOrBuilder>
- getNodesOrBuilderList();
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- NodeOrBuilder getNodesOrBuilder(
- int index);
-
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- * @return Whether the dense field is set.
- */
- boolean hasDense();
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- * @return The dense.
- */
- DenseNodes getDense();
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- DenseNodesOrBuilder getDenseOrBuilder();
-
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- java.util.List
- getWaysList();
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- Way getWays(int index);
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- int getWaysCount();
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- java.util.List extends WayOrBuilder>
- getWaysOrBuilderList();
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- WayOrBuilder getWaysOrBuilder(
- int index);
-
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- java.util.List
- getRelationsList();
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- Relation getRelations(int index);
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- int getRelationsCount();
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- java.util.List extends RelationOrBuilder>
- getRelationsOrBuilderList();
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- RelationOrBuilder getRelationsOrBuilder(
- int index);
-
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- java.util.List
- getChangesetsList();
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- ChangeSet getChangesets(int index);
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- int getChangesetsCount();
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- java.util.List extends ChangeSetOrBuilder>
- getChangesetsOrBuilderList();
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- ChangeSetOrBuilder getChangesetsOrBuilder(
- int index);
- }
- /**
- *
- * Group of OSMPrimitives. All primitives in a group must be the same type.
- *
- *
- * Protobuf type {@code OSMPBF.PrimitiveGroup}
- */
- public static final class PrimitiveGroup extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.PrimitiveGroup)
- PrimitiveGroupOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use PrimitiveGroup.newBuilder() to construct.
- private PrimitiveGroup(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private PrimitiveGroup() {
- nodes_ = java.util.Collections.emptyList();
- ways_ = java.util.Collections.emptyList();
- relations_ = java.util.Collections.emptyList();
- changesets_ = java.util.Collections.emptyList();
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new PrimitiveGroup();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private PrimitiveGroup(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- nodes_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- nodes_.add(
- input.readMessage(Node.PARSER, extensionRegistry));
- break;
- }
- case 18: {
- DenseNodes.Builder subBuilder = null;
- if (((bitField0_ & 0x00000001) != 0)) {
- subBuilder = dense_.toBuilder();
- }
- dense_ = input.readMessage(DenseNodes.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(dense_);
- dense_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000001;
- break;
- }
- case 26: {
- if (!((mutable_bitField0_ & 0x00000004) != 0)) {
- ways_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000004;
- }
- ways_.add(
- input.readMessage(Way.PARSER, extensionRegistry));
- break;
- }
- case 34: {
- if (!((mutable_bitField0_ & 0x00000008) != 0)) {
- relations_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000008;
- }
- relations_.add(
- input.readMessage(Relation.PARSER, extensionRegistry));
- break;
- }
- case 42: {
- if (!((mutable_bitField0_ & 0x00000010) != 0)) {
- changesets_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000010;
- }
- changesets_.add(
- input.readMessage(ChangeSet.PARSER, extensionRegistry));
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- nodes_ = java.util.Collections.unmodifiableList(nodes_);
- }
- if (((mutable_bitField0_ & 0x00000004) != 0)) {
- ways_ = java.util.Collections.unmodifiableList(ways_);
- }
- if (((mutable_bitField0_ & 0x00000008) != 0)) {
- relations_ = java.util.Collections.unmodifiableList(relations_);
- }
- if (((mutable_bitField0_ & 0x00000010) != 0)) {
- changesets_ = java.util.Collections.unmodifiableList(changesets_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_PrimitiveGroup_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- PrimitiveGroup.class, PrimitiveGroup.Builder.class);
- }
-
- private int bitField0_;
- public static final int NODES_FIELD_NUMBER = 1;
- private java.util.List nodes_;
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public java.util.List getNodesList() {
- return nodes_;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public java.util.List extends NodeOrBuilder>
- getNodesOrBuilderList() {
- return nodes_;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public int getNodesCount() {
- return nodes_.size();
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Node getNodes(int index) {
- return nodes_.get(index);
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public NodeOrBuilder getNodesOrBuilder(
- int index) {
- return nodes_.get(index);
- }
-
- public static final int DENSE_FIELD_NUMBER = 2;
- private DenseNodes dense_;
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- * @return Whether the dense field is set.
- */
- public boolean hasDense() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- * @return The dense.
- */
- public DenseNodes getDense() {
- return dense_ == null ? DenseNodes.getDefaultInstance() : dense_;
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- public DenseNodesOrBuilder getDenseOrBuilder() {
- return dense_ == null ? DenseNodes.getDefaultInstance() : dense_;
- }
-
- public static final int WAYS_FIELD_NUMBER = 3;
- private java.util.List ways_;
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public java.util.List getWaysList() {
- return ways_;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public java.util.List extends WayOrBuilder>
- getWaysOrBuilderList() {
- return ways_;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public int getWaysCount() {
- return ways_.size();
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Way getWays(int index) {
- return ways_.get(index);
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public WayOrBuilder getWaysOrBuilder(
- int index) {
- return ways_.get(index);
- }
-
- public static final int RELATIONS_FIELD_NUMBER = 4;
- private java.util.List relations_;
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public java.util.List getRelationsList() {
- return relations_;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public java.util.List extends RelationOrBuilder>
- getRelationsOrBuilderList() {
- return relations_;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public int getRelationsCount() {
- return relations_.size();
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Relation getRelations(int index) {
- return relations_.get(index);
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public RelationOrBuilder getRelationsOrBuilder(
- int index) {
- return relations_.get(index);
- }
-
- public static final int CHANGESETS_FIELD_NUMBER = 5;
- private java.util.List changesets_;
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public java.util.List getChangesetsList() {
- return changesets_;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public java.util.List extends ChangeSetOrBuilder>
- getChangesetsOrBuilderList() {
- return changesets_;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public int getChangesetsCount() {
- return changesets_.size();
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public ChangeSet getChangesets(int index) {
- return changesets_.get(index);
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public ChangeSetOrBuilder getChangesetsOrBuilder(
- int index) {
- return changesets_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- for (int i = 0; i < getNodesCount(); i++) {
- if (!getNodes(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- for (int i = 0; i < getWaysCount(); i++) {
- if (!getWays(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- for (int i = 0; i < getRelationsCount(); i++) {
- if (!getRelations(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- for (int i = 0; i < getChangesetsCount(); i++) {
- if (!getChangesets(i).isInitialized()) {
- memoizedIsInitialized = 0;
- return false;
- }
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < nodes_.size(); i++) {
- output.writeMessage(1, nodes_.get(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(2, getDense());
- }
- for (int i = 0; i < ways_.size(); i++) {
- output.writeMessage(3, ways_.get(i));
- }
- for (int i = 0; i < relations_.size(); i++) {
- output.writeMessage(4, relations_.get(i));
- }
- for (int i = 0; i < changesets_.size(); i++) {
- output.writeMessage(5, changesets_.get(i));
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- for (int i = 0; i < nodes_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(1, nodes_.get(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(2, getDense());
- }
- for (int i = 0; i < ways_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(3, ways_.get(i));
- }
- for (int i = 0; i < relations_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, relations_.get(i));
- }
- for (int i = 0; i < changesets_.size(); i++) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, changesets_.get(i));
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof PrimitiveGroup)) {
- return super.equals(obj);
- }
- PrimitiveGroup other = (PrimitiveGroup) obj;
-
- if (!getNodesList()
- .equals(other.getNodesList())) return false;
- if (hasDense() != other.hasDense()) return false;
- if (hasDense()) {
- if (!getDense()
- .equals(other.getDense())) return false;
- }
- if (!getWaysList()
- .equals(other.getWaysList())) return false;
- if (!getRelationsList()
- .equals(other.getRelationsList())) return false;
- if (!getChangesetsList()
- .equals(other.getChangesetsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getNodesCount() > 0) {
- hash = (37 * hash) + NODES_FIELD_NUMBER;
- hash = (53 * hash) + getNodesList().hashCode();
- }
- if (hasDense()) {
- hash = (37 * hash) + DENSE_FIELD_NUMBER;
- hash = (53 * hash) + getDense().hashCode();
- }
- if (getWaysCount() > 0) {
- hash = (37 * hash) + WAYS_FIELD_NUMBER;
- hash = (53 * hash) + getWaysList().hashCode();
- }
- if (getRelationsCount() > 0) {
- hash = (37 * hash) + RELATIONS_FIELD_NUMBER;
- hash = (53 * hash) + getRelationsList().hashCode();
- }
- if (getChangesetsCount() > 0) {
- hash = (37 * hash) + CHANGESETS_FIELD_NUMBER;
- hash = (53 * hash) + getChangesetsList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static PrimitiveGroup parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static PrimitiveGroup parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static PrimitiveGroup parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static PrimitiveGroup parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static PrimitiveGroup parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static PrimitiveGroup parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static PrimitiveGroup parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static PrimitiveGroup parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static PrimitiveGroup parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static PrimitiveGroup parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static PrimitiveGroup parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static PrimitiveGroup parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(PrimitiveGroup prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Group of OSMPrimitives. All primitives in a group must be the same type.
- *
- *
- * Protobuf type {@code OSMPBF.PrimitiveGroup}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.PrimitiveGroup)
- PrimitiveGroupOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_PrimitiveGroup_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_PrimitiveGroup_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- PrimitiveGroup.class, PrimitiveGroup.Builder.class);
- }
-
- // Construct using PrimitiveGroup.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getNodesFieldBuilder();
- getDenseFieldBuilder();
- getWaysFieldBuilder();
- getRelationsFieldBuilder();
- getChangesetsFieldBuilder();
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- if (nodesBuilder_ == null) {
- nodes_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- nodesBuilder_.clear();
- }
- if (denseBuilder_ == null) {
- dense_ = null;
- } else {
- denseBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- if (waysBuilder_ == null) {
- ways_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- waysBuilder_.clear();
- }
- if (relationsBuilder_ == null) {
- relations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- relationsBuilder_.clear();
- }
- if (changesetsBuilder_ == null) {
- changesets_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000010);
- } else {
- changesetsBuilder_.clear();
- }
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_PrimitiveGroup_descriptor;
- }
-
- @Override
- public PrimitiveGroup getDefaultInstanceForType() {
- return PrimitiveGroup.getDefaultInstance();
- }
-
- @Override
- public PrimitiveGroup build() {
- PrimitiveGroup result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public PrimitiveGroup buildPartial() {
- PrimitiveGroup result = new PrimitiveGroup(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (nodesBuilder_ == null) {
- if (((bitField0_ & 0x00000001) != 0)) {
- nodes_ = java.util.Collections.unmodifiableList(nodes_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.nodes_ = nodes_;
- } else {
- result.nodes_ = nodesBuilder_.build();
- }
- if (((from_bitField0_ & 0x00000002) != 0)) {
- if (denseBuilder_ == null) {
- result.dense_ = dense_;
- } else {
- result.dense_ = denseBuilder_.build();
- }
- to_bitField0_ |= 0x00000001;
- }
- if (waysBuilder_ == null) {
- if (((bitField0_ & 0x00000004) != 0)) {
- ways_ = java.util.Collections.unmodifiableList(ways_);
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.ways_ = ways_;
- } else {
- result.ways_ = waysBuilder_.build();
- }
- if (relationsBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0)) {
- relations_ = java.util.Collections.unmodifiableList(relations_);
- bitField0_ = (bitField0_ & ~0x00000008);
- }
- result.relations_ = relations_;
- } else {
- result.relations_ = relationsBuilder_.build();
- }
- if (changesetsBuilder_ == null) {
- if (((bitField0_ & 0x00000010) != 0)) {
- changesets_ = java.util.Collections.unmodifiableList(changesets_);
- bitField0_ = (bitField0_ & ~0x00000010);
- }
- result.changesets_ = changesets_;
- } else {
- result.changesets_ = changesetsBuilder_.build();
- }
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof PrimitiveGroup) {
- return mergeFrom((PrimitiveGroup)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(PrimitiveGroup other) {
- if (other == PrimitiveGroup.getDefaultInstance()) return this;
- if (nodesBuilder_ == null) {
- if (!other.nodes_.isEmpty()) {
- if (nodes_.isEmpty()) {
- nodes_ = other.nodes_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureNodesIsMutable();
- nodes_.addAll(other.nodes_);
- }
- onChanged();
- }
- } else {
- if (!other.nodes_.isEmpty()) {
- if (nodesBuilder_.isEmpty()) {
- nodesBuilder_.dispose();
- nodesBuilder_ = null;
- nodes_ = other.nodes_;
- bitField0_ = (bitField0_ & ~0x00000001);
- nodesBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getNodesFieldBuilder() : null;
- } else {
- nodesBuilder_.addAllMessages(other.nodes_);
- }
- }
- }
- if (other.hasDense()) {
- mergeDense(other.getDense());
- }
- if (waysBuilder_ == null) {
- if (!other.ways_.isEmpty()) {
- if (ways_.isEmpty()) {
- ways_ = other.ways_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureWaysIsMutable();
- ways_.addAll(other.ways_);
- }
- onChanged();
- }
- } else {
- if (!other.ways_.isEmpty()) {
- if (waysBuilder_.isEmpty()) {
- waysBuilder_.dispose();
- waysBuilder_ = null;
- ways_ = other.ways_;
- bitField0_ = (bitField0_ & ~0x00000004);
- waysBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getWaysFieldBuilder() : null;
- } else {
- waysBuilder_.addAllMessages(other.ways_);
- }
- }
- }
- if (relationsBuilder_ == null) {
- if (!other.relations_.isEmpty()) {
- if (relations_.isEmpty()) {
- relations_ = other.relations_;
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- ensureRelationsIsMutable();
- relations_.addAll(other.relations_);
- }
- onChanged();
- }
- } else {
- if (!other.relations_.isEmpty()) {
- if (relationsBuilder_.isEmpty()) {
- relationsBuilder_.dispose();
- relationsBuilder_ = null;
- relations_ = other.relations_;
- bitField0_ = (bitField0_ & ~0x00000008);
- relationsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getRelationsFieldBuilder() : null;
- } else {
- relationsBuilder_.addAllMessages(other.relations_);
- }
- }
- }
- if (changesetsBuilder_ == null) {
- if (!other.changesets_.isEmpty()) {
- if (changesets_.isEmpty()) {
- changesets_ = other.changesets_;
- bitField0_ = (bitField0_ & ~0x00000010);
- } else {
- ensureChangesetsIsMutable();
- changesets_.addAll(other.changesets_);
- }
- onChanged();
- }
- } else {
- if (!other.changesets_.isEmpty()) {
- if (changesetsBuilder_.isEmpty()) {
- changesetsBuilder_.dispose();
- changesetsBuilder_ = null;
- changesets_ = other.changesets_;
- bitField0_ = (bitField0_ & ~0x00000010);
- changesetsBuilder_ =
- com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
- getChangesetsFieldBuilder() : null;
- } else {
- changesetsBuilder_.addAllMessages(other.changesets_);
- }
- }
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- for (int i = 0; i < getNodesCount(); i++) {
- if (!getNodes(i).isInitialized()) {
- return false;
- }
- }
- for (int i = 0; i < getWaysCount(); i++) {
- if (!getWays(i).isInitialized()) {
- return false;
- }
- }
- for (int i = 0; i < getRelationsCount(); i++) {
- if (!getRelations(i).isInitialized()) {
- return false;
- }
- }
- for (int i = 0; i < getChangesetsCount(); i++) {
- if (!getChangesets(i).isInitialized()) {
- return false;
- }
- }
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- PrimitiveGroup parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (PrimitiveGroup) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List nodes_ =
- java.util.Collections.emptyList();
- private void ensureNodesIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- nodes_ = new java.util.ArrayList(nodes_);
- bitField0_ |= 0x00000001;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- Node, Node.Builder, NodeOrBuilder> nodesBuilder_;
-
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public java.util.List getNodesList() {
- if (nodesBuilder_ == null) {
- return java.util.Collections.unmodifiableList(nodes_);
- } else {
- return nodesBuilder_.getMessageList();
- }
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public int getNodesCount() {
- if (nodesBuilder_ == null) {
- return nodes_.size();
- } else {
- return nodesBuilder_.getCount();
- }
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Node getNodes(int index) {
- if (nodesBuilder_ == null) {
- return nodes_.get(index);
- } else {
- return nodesBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder setNodes(
- int index, Node value) {
- if (nodesBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureNodesIsMutable();
- nodes_.set(index, value);
- onChanged();
- } else {
- nodesBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder setNodes(
- int index, Node.Builder builderForValue) {
- if (nodesBuilder_ == null) {
- ensureNodesIsMutable();
- nodes_.set(index, builderForValue.build());
- onChanged();
- } else {
- nodesBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder addNodes(Node value) {
- if (nodesBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureNodesIsMutable();
- nodes_.add(value);
- onChanged();
- } else {
- nodesBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder addNodes(
- int index, Node value) {
- if (nodesBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureNodesIsMutable();
- nodes_.add(index, value);
- onChanged();
- } else {
- nodesBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder addNodes(
- Node.Builder builderForValue) {
- if (nodesBuilder_ == null) {
- ensureNodesIsMutable();
- nodes_.add(builderForValue.build());
- onChanged();
- } else {
- nodesBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder addNodes(
- int index, Node.Builder builderForValue) {
- if (nodesBuilder_ == null) {
- ensureNodesIsMutable();
- nodes_.add(index, builderForValue.build());
- onChanged();
- } else {
- nodesBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder addAllNodes(
- Iterable extends Node> values) {
- if (nodesBuilder_ == null) {
- ensureNodesIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, nodes_);
- onChanged();
- } else {
- nodesBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder clearNodes() {
- if (nodesBuilder_ == null) {
- nodes_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- } else {
- nodesBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Builder removeNodes(int index) {
- if (nodesBuilder_ == null) {
- ensureNodesIsMutable();
- nodes_.remove(index);
- onChanged();
- } else {
- nodesBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Node.Builder getNodesBuilder(
- int index) {
- return getNodesFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public NodeOrBuilder getNodesOrBuilder(
- int index) {
- if (nodesBuilder_ == null) {
- return nodes_.get(index); } else {
- return nodesBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public java.util.List extends NodeOrBuilder>
- getNodesOrBuilderList() {
- if (nodesBuilder_ != null) {
- return nodesBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(nodes_);
- }
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Node.Builder addNodesBuilder() {
- return getNodesFieldBuilder().addBuilder(
- Node.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public Node.Builder addNodesBuilder(
- int index) {
- return getNodesFieldBuilder().addBuilder(
- index, Node.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.Node nodes = 1;
- */
- public java.util.List
- getNodesBuilderList() {
- return getNodesFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- Node, Node.Builder, NodeOrBuilder>
- getNodesFieldBuilder() {
- if (nodesBuilder_ == null) {
- nodesBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- Node, Node.Builder, NodeOrBuilder>(
- nodes_,
- ((bitField0_ & 0x00000001) != 0),
- getParentForChildren(),
- isClean());
- nodes_ = null;
- }
- return nodesBuilder_;
- }
-
- private DenseNodes dense_;
- private com.google.protobuf.SingleFieldBuilderV3<
- DenseNodes, DenseNodes.Builder, DenseNodesOrBuilder> denseBuilder_;
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- * @return Whether the dense field is set.
- */
- public boolean hasDense() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- * @return The dense.
- */
- public DenseNodes getDense() {
- if (denseBuilder_ == null) {
- return dense_ == null ? DenseNodes.getDefaultInstance() : dense_;
- } else {
- return denseBuilder_.getMessage();
- }
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- public Builder setDense(DenseNodes value) {
- if (denseBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- dense_ = value;
- onChanged();
- } else {
- denseBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- public Builder setDense(
- DenseNodes.Builder builderForValue) {
- if (denseBuilder_ == null) {
- dense_ = builderForValue.build();
- onChanged();
- } else {
- denseBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- public Builder mergeDense(DenseNodes value) {
- if (denseBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0) &&
- dense_ != null &&
- dense_ != DenseNodes.getDefaultInstance()) {
- dense_ =
- DenseNodes.newBuilder(dense_).mergeFrom(value).buildPartial();
- } else {
- dense_ = value;
- }
- onChanged();
- } else {
- denseBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- public Builder clearDense() {
- if (denseBuilder_ == null) {
- dense_ = null;
- onChanged();
- } else {
- denseBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- public DenseNodes.Builder getDenseBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getDenseFieldBuilder().getBuilder();
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- public DenseNodesOrBuilder getDenseOrBuilder() {
- if (denseBuilder_ != null) {
- return denseBuilder_.getMessageOrBuilder();
- } else {
- return dense_ == null ?
- DenseNodes.getDefaultInstance() : dense_;
- }
- }
- /**
- * optional .OSMPBF.DenseNodes dense = 2;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- DenseNodes, DenseNodes.Builder, DenseNodesOrBuilder>
- getDenseFieldBuilder() {
- if (denseBuilder_ == null) {
- denseBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- DenseNodes, DenseNodes.Builder, DenseNodesOrBuilder>(
- getDense(),
- getParentForChildren(),
- isClean());
- dense_ = null;
- }
- return denseBuilder_;
- }
-
- private java.util.List ways_ =
- java.util.Collections.emptyList();
- private void ensureWaysIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- ways_ = new java.util.ArrayList(ways_);
- bitField0_ |= 0x00000004;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- Way, Way.Builder, WayOrBuilder> waysBuilder_;
-
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public java.util.List getWaysList() {
- if (waysBuilder_ == null) {
- return java.util.Collections.unmodifiableList(ways_);
- } else {
- return waysBuilder_.getMessageList();
- }
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public int getWaysCount() {
- if (waysBuilder_ == null) {
- return ways_.size();
- } else {
- return waysBuilder_.getCount();
- }
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Way getWays(int index) {
- if (waysBuilder_ == null) {
- return ways_.get(index);
- } else {
- return waysBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder setWays(
- int index, Way value) {
- if (waysBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWaysIsMutable();
- ways_.set(index, value);
- onChanged();
- } else {
- waysBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder setWays(
- int index, Way.Builder builderForValue) {
- if (waysBuilder_ == null) {
- ensureWaysIsMutable();
- ways_.set(index, builderForValue.build());
- onChanged();
- } else {
- waysBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder addWays(Way value) {
- if (waysBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWaysIsMutable();
- ways_.add(value);
- onChanged();
- } else {
- waysBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder addWays(
- int index, Way value) {
- if (waysBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureWaysIsMutable();
- ways_.add(index, value);
- onChanged();
- } else {
- waysBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder addWays(
- Way.Builder builderForValue) {
- if (waysBuilder_ == null) {
- ensureWaysIsMutable();
- ways_.add(builderForValue.build());
- onChanged();
- } else {
- waysBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder addWays(
- int index, Way.Builder builderForValue) {
- if (waysBuilder_ == null) {
- ensureWaysIsMutable();
- ways_.add(index, builderForValue.build());
- onChanged();
- } else {
- waysBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder addAllWays(
- Iterable extends Way> values) {
- if (waysBuilder_ == null) {
- ensureWaysIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, ways_);
- onChanged();
- } else {
- waysBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder clearWays() {
- if (waysBuilder_ == null) {
- ways_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- } else {
- waysBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Builder removeWays(int index) {
- if (waysBuilder_ == null) {
- ensureWaysIsMutable();
- ways_.remove(index);
- onChanged();
- } else {
- waysBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Way.Builder getWaysBuilder(
- int index) {
- return getWaysFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public WayOrBuilder getWaysOrBuilder(
- int index) {
- if (waysBuilder_ == null) {
- return ways_.get(index); } else {
- return waysBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public java.util.List extends WayOrBuilder>
- getWaysOrBuilderList() {
- if (waysBuilder_ != null) {
- return waysBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(ways_);
- }
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Way.Builder addWaysBuilder() {
- return getWaysFieldBuilder().addBuilder(
- Way.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public Way.Builder addWaysBuilder(
- int index) {
- return getWaysFieldBuilder().addBuilder(
- index, Way.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.Way ways = 3;
- */
- public java.util.List
- getWaysBuilderList() {
- return getWaysFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- Way, Way.Builder, WayOrBuilder>
- getWaysFieldBuilder() {
- if (waysBuilder_ == null) {
- waysBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- Way, Way.Builder, WayOrBuilder>(
- ways_,
- ((bitField0_ & 0x00000004) != 0),
- getParentForChildren(),
- isClean());
- ways_ = null;
- }
- return waysBuilder_;
- }
-
- private java.util.List relations_ =
- java.util.Collections.emptyList();
- private void ensureRelationsIsMutable() {
- if (!((bitField0_ & 0x00000008) != 0)) {
- relations_ = new java.util.ArrayList(relations_);
- bitField0_ |= 0x00000008;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- Relation, Relation.Builder, RelationOrBuilder> relationsBuilder_;
-
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public java.util.List getRelationsList() {
- if (relationsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(relations_);
- } else {
- return relationsBuilder_.getMessageList();
- }
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public int getRelationsCount() {
- if (relationsBuilder_ == null) {
- return relations_.size();
- } else {
- return relationsBuilder_.getCount();
- }
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Relation getRelations(int index) {
- if (relationsBuilder_ == null) {
- return relations_.get(index);
- } else {
- return relationsBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder setRelations(
- int index, Relation value) {
- if (relationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureRelationsIsMutable();
- relations_.set(index, value);
- onChanged();
- } else {
- relationsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder setRelations(
- int index, Relation.Builder builderForValue) {
- if (relationsBuilder_ == null) {
- ensureRelationsIsMutable();
- relations_.set(index, builderForValue.build());
- onChanged();
- } else {
- relationsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder addRelations(Relation value) {
- if (relationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureRelationsIsMutable();
- relations_.add(value);
- onChanged();
- } else {
- relationsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder addRelations(
- int index, Relation value) {
- if (relationsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureRelationsIsMutable();
- relations_.add(index, value);
- onChanged();
- } else {
- relationsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder addRelations(
- Relation.Builder builderForValue) {
- if (relationsBuilder_ == null) {
- ensureRelationsIsMutable();
- relations_.add(builderForValue.build());
- onChanged();
- } else {
- relationsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder addRelations(
- int index, Relation.Builder builderForValue) {
- if (relationsBuilder_ == null) {
- ensureRelationsIsMutable();
- relations_.add(index, builderForValue.build());
- onChanged();
- } else {
- relationsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder addAllRelations(
- Iterable extends Relation> values) {
- if (relationsBuilder_ == null) {
- ensureRelationsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, relations_);
- onChanged();
- } else {
- relationsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder clearRelations() {
- if (relationsBuilder_ == null) {
- relations_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- } else {
- relationsBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Builder removeRelations(int index) {
- if (relationsBuilder_ == null) {
- ensureRelationsIsMutable();
- relations_.remove(index);
- onChanged();
- } else {
- relationsBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Relation.Builder getRelationsBuilder(
- int index) {
- return getRelationsFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public RelationOrBuilder getRelationsOrBuilder(
- int index) {
- if (relationsBuilder_ == null) {
- return relations_.get(index); } else {
- return relationsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public java.util.List extends RelationOrBuilder>
- getRelationsOrBuilderList() {
- if (relationsBuilder_ != null) {
- return relationsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(relations_);
- }
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Relation.Builder addRelationsBuilder() {
- return getRelationsFieldBuilder().addBuilder(
- Relation.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public Relation.Builder addRelationsBuilder(
- int index) {
- return getRelationsFieldBuilder().addBuilder(
- index, Relation.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.Relation relations = 4;
- */
- public java.util.List
- getRelationsBuilderList() {
- return getRelationsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- Relation, Relation.Builder, RelationOrBuilder>
- getRelationsFieldBuilder() {
- if (relationsBuilder_ == null) {
- relationsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- Relation, Relation.Builder, RelationOrBuilder>(
- relations_,
- ((bitField0_ & 0x00000008) != 0),
- getParentForChildren(),
- isClean());
- relations_ = null;
- }
- return relationsBuilder_;
- }
-
- private java.util.List changesets_ =
- java.util.Collections.emptyList();
- private void ensureChangesetsIsMutable() {
- if (!((bitField0_ & 0x00000010) != 0)) {
- changesets_ = new java.util.ArrayList(changesets_);
- bitField0_ |= 0x00000010;
- }
- }
-
- private com.google.protobuf.RepeatedFieldBuilderV3<
- ChangeSet, ChangeSet.Builder, ChangeSetOrBuilder> changesetsBuilder_;
-
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public java.util.List getChangesetsList() {
- if (changesetsBuilder_ == null) {
- return java.util.Collections.unmodifiableList(changesets_);
- } else {
- return changesetsBuilder_.getMessageList();
- }
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public int getChangesetsCount() {
- if (changesetsBuilder_ == null) {
- return changesets_.size();
- } else {
- return changesetsBuilder_.getCount();
- }
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public ChangeSet getChangesets(int index) {
- if (changesetsBuilder_ == null) {
- return changesets_.get(index);
- } else {
- return changesetsBuilder_.getMessage(index);
- }
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder setChangesets(
- int index, ChangeSet value) {
- if (changesetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureChangesetsIsMutable();
- changesets_.set(index, value);
- onChanged();
- } else {
- changesetsBuilder_.setMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder setChangesets(
- int index, ChangeSet.Builder builderForValue) {
- if (changesetsBuilder_ == null) {
- ensureChangesetsIsMutable();
- changesets_.set(index, builderForValue.build());
- onChanged();
- } else {
- changesetsBuilder_.setMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder addChangesets(ChangeSet value) {
- if (changesetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureChangesetsIsMutable();
- changesets_.add(value);
- onChanged();
- } else {
- changesetsBuilder_.addMessage(value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder addChangesets(
- int index, ChangeSet value) {
- if (changesetsBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureChangesetsIsMutable();
- changesets_.add(index, value);
- onChanged();
- } else {
- changesetsBuilder_.addMessage(index, value);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder addChangesets(
- ChangeSet.Builder builderForValue) {
- if (changesetsBuilder_ == null) {
- ensureChangesetsIsMutable();
- changesets_.add(builderForValue.build());
- onChanged();
- } else {
- changesetsBuilder_.addMessage(builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder addChangesets(
- int index, ChangeSet.Builder builderForValue) {
- if (changesetsBuilder_ == null) {
- ensureChangesetsIsMutable();
- changesets_.add(index, builderForValue.build());
- onChanged();
- } else {
- changesetsBuilder_.addMessage(index, builderForValue.build());
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder addAllChangesets(
- Iterable extends ChangeSet> values) {
- if (changesetsBuilder_ == null) {
- ensureChangesetsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, changesets_);
- onChanged();
- } else {
- changesetsBuilder_.addAllMessages(values);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder clearChangesets() {
- if (changesetsBuilder_ == null) {
- changesets_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- } else {
- changesetsBuilder_.clear();
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public Builder removeChangesets(int index) {
- if (changesetsBuilder_ == null) {
- ensureChangesetsIsMutable();
- changesets_.remove(index);
- onChanged();
- } else {
- changesetsBuilder_.remove(index);
- }
- return this;
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public ChangeSet.Builder getChangesetsBuilder(
- int index) {
- return getChangesetsFieldBuilder().getBuilder(index);
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public ChangeSetOrBuilder getChangesetsOrBuilder(
- int index) {
- if (changesetsBuilder_ == null) {
- return changesets_.get(index); } else {
- return changesetsBuilder_.getMessageOrBuilder(index);
- }
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public java.util.List extends ChangeSetOrBuilder>
- getChangesetsOrBuilderList() {
- if (changesetsBuilder_ != null) {
- return changesetsBuilder_.getMessageOrBuilderList();
- } else {
- return java.util.Collections.unmodifiableList(changesets_);
- }
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public ChangeSet.Builder addChangesetsBuilder() {
- return getChangesetsFieldBuilder().addBuilder(
- ChangeSet.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public ChangeSet.Builder addChangesetsBuilder(
- int index) {
- return getChangesetsFieldBuilder().addBuilder(
- index, ChangeSet.getDefaultInstance());
- }
- /**
- * repeated .OSMPBF.ChangeSet changesets = 5;
- */
- public java.util.List
- getChangesetsBuilderList() {
- return getChangesetsFieldBuilder().getBuilderList();
- }
- private com.google.protobuf.RepeatedFieldBuilderV3<
- ChangeSet, ChangeSet.Builder, ChangeSetOrBuilder>
- getChangesetsFieldBuilder() {
- if (changesetsBuilder_ == null) {
- changesetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
- ChangeSet, ChangeSet.Builder, ChangeSetOrBuilder>(
- changesets_,
- ((bitField0_ & 0x00000010) != 0),
- getParentForChildren(),
- isClean());
- changesets_ = null;
- }
- return changesetsBuilder_;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.PrimitiveGroup)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.PrimitiveGroup)
- private static final PrimitiveGroup DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new PrimitiveGroup();
- }
-
- public static PrimitiveGroup getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public PrimitiveGroup parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new PrimitiveGroup(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public PrimitiveGroup getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface StringTableOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.StringTable)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated bytes s = 1;
- * @return A list containing the s.
- */
- java.util.List getSList();
- /**
- * repeated bytes s = 1;
- * @return The count of s.
- */
- int getSCount();
- /**
- * repeated bytes s = 1;
- * @param index The index of the element to return.
- * @return The s at the given index.
- */
- com.google.protobuf.ByteString getS(int index);
- }
- /**
- *
- ** String table, contains the common strings in each block.
- *Note that we reserve index '0' as a delimiter, so the entry at that
- *index in the table is ALWAYS blank and unused.
- *
- *
- * Protobuf type {@code OSMPBF.StringTable}
- */
- public static final class StringTable extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.StringTable)
- StringTableOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use StringTable.newBuilder() to construct.
- private StringTable(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private StringTable() {
- s_ = java.util.Collections.emptyList();
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new StringTable();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private StringTable(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 10: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- s_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000001;
- }
- s_.add(input.readBytes());
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- s_ = java.util.Collections.unmodifiableList(s_); // C
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_StringTable_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_StringTable_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- StringTable.class, StringTable.Builder.class);
- }
-
- public static final int S_FIELD_NUMBER = 1;
- private java.util.List s_;
- /**
- * repeated bytes s = 1;
- * @return A list containing the s.
- */
- public java.util.List
- getSList() {
- return s_;
- }
- /**
- * repeated bytes s = 1;
- * @return The count of s.
- */
- public int getSCount() {
- return s_.size();
- }
- /**
- * repeated bytes s = 1;
- * @param index The index of the element to return.
- * @return The s at the given index.
- */
- public com.google.protobuf.ByteString getS(int index) {
- return s_.get(index);
- }
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- for (int i = 0; i < s_.size(); i++) {
- output.writeBytes(1, s_.get(i));
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (int i = 0; i < s_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeBytesSizeNoTag(s_.get(i));
- }
- size += dataSize;
- size += 1 * getSList().size();
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof StringTable)) {
- return super.equals(obj);
- }
- StringTable other = (StringTable) obj;
-
- if (!getSList()
- .equals(other.getSList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getSCount() > 0) {
- hash = (37 * hash) + S_FIELD_NUMBER;
- hash = (53 * hash) + getSList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static StringTable parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static StringTable parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static StringTable parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static StringTable parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static StringTable parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static StringTable parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static StringTable parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static StringTable parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static StringTable parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static StringTable parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static StringTable parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static StringTable parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(StringTable prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- ** String table, contains the common strings in each block.
- *Note that we reserve index '0' as a delimiter, so the entry at that
- *index in the table is ALWAYS blank and unused.
- *
- *
- * Protobuf type {@code OSMPBF.StringTable}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.StringTable)
- StringTableOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_StringTable_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_StringTable_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- StringTable.class, StringTable.Builder.class);
- }
-
- // Construct using StringTable.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- s_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_StringTable_descriptor;
- }
-
- @Override
- public StringTable getDefaultInstanceForType() {
- return StringTable.getDefaultInstance();
- }
-
- @Override
- public StringTable build() {
- StringTable result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public StringTable buildPartial() {
- StringTable result = new StringTable(this);
- int from_bitField0_ = bitField0_;
- if (((bitField0_ & 0x00000001) != 0)) {
- s_ = java.util.Collections.unmodifiableList(s_);
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.s_ = s_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof StringTable) {
- return mergeFrom((StringTable)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(StringTable other) {
- if (other == StringTable.getDefaultInstance()) return this;
- if (!other.s_.isEmpty()) {
- if (s_.isEmpty()) {
- s_ = other.s_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureSIsMutable();
- s_.addAll(other.s_);
- }
- onChanged();
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- StringTable parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (StringTable) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private java.util.List s_ = java.util.Collections.emptyList();
- private void ensureSIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- s_ = new java.util.ArrayList(s_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- * repeated bytes s = 1;
- * @return A list containing the s.
- */
- public java.util.List
- getSList() {
- return ((bitField0_ & 0x00000001) != 0) ?
- java.util.Collections.unmodifiableList(s_) : s_;
- }
- /**
- * repeated bytes s = 1;
- * @return The count of s.
- */
- public int getSCount() {
- return s_.size();
- }
- /**
- * repeated bytes s = 1;
- * @param index The index of the element to return.
- * @return The s at the given index.
- */
- public com.google.protobuf.ByteString getS(int index) {
- return s_.get(index);
- }
- /**
- * repeated bytes s = 1;
- * @param index The index to set the value at.
- * @param value The s to set.
- * @return This builder for chaining.
- */
- public Builder setS(
- int index, com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureSIsMutable();
- s_.set(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated bytes s = 1;
- * @param value The s to add.
- * @return This builder for chaining.
- */
- public Builder addS(com.google.protobuf.ByteString value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureSIsMutable();
- s_.add(value);
- onChanged();
- return this;
- }
- /**
- * repeated bytes s = 1;
- * @param values The s to add.
- * @return This builder for chaining.
- */
- public Builder addAllS(
- Iterable extends com.google.protobuf.ByteString> values) {
- ensureSIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, s_);
- onChanged();
- return this;
- }
- /**
- * repeated bytes s = 1;
- * @return This builder for chaining.
- */
- public Builder clearS() {
- s_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.StringTable)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.StringTable)
- private static final StringTable DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new StringTable();
- }
-
- public static StringTable getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public StringTable parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new StringTable(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public StringTable getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface InfoOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.Info)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * optional int32 version = 1 [default = -1];
- * @return Whether the version field is set.
- */
- boolean hasVersion();
- /**
- * optional int32 version = 1 [default = -1];
- * @return The version.
- */
- int getVersion();
-
- /**
- * optional int64 timestamp = 2;
- * @return Whether the timestamp field is set.
- */
- boolean hasTimestamp();
- /**
- * optional int64 timestamp = 2;
- * @return The timestamp.
- */
- long getTimestamp();
-
- /**
- * optional int64 changeset = 3;
- * @return Whether the changeset field is set.
- */
- boolean hasChangeset();
- /**
- * optional int64 changeset = 3;
- * @return The changeset.
- */
- long getChangeset();
-
- /**
- * optional int32 uid = 4;
- * @return Whether the uid field is set.
- */
- boolean hasUid();
- /**
- * optional int32 uid = 4;
- * @return The uid.
- */
- int getUid();
-
- /**
- *
- * String IDs
- *
- *
- * optional uint32 user_sid = 5;
- * @return Whether the userSid field is set.
- */
- boolean hasUserSid();
- /**
- *
- * String IDs
- *
- *
- * optional uint32 user_sid = 5;
- * @return The userSid.
- */
- int getUserSid();
-
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * optional bool visible = 6;
- * @return Whether the visible field is set.
- */
- boolean hasVisible();
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * optional bool visible = 6;
- * @return The visible.
- */
- boolean getVisible();
- }
- /**
- *
- * Optional metadata that may be included into each primitive.
- *
- *
- * Protobuf type {@code OSMPBF.Info}
- */
- public static final class Info extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.Info)
- InfoOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Info.newBuilder() to construct.
- private Info(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Info() {
- version_ = -1;
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new Info();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Info(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- bitField0_ |= 0x00000001;
- version_ = input.readInt32();
- break;
- }
- case 16: {
- bitField0_ |= 0x00000002;
- timestamp_ = input.readInt64();
- break;
- }
- case 24: {
- bitField0_ |= 0x00000004;
- changeset_ = input.readInt64();
- break;
- }
- case 32: {
- bitField0_ |= 0x00000008;
- uid_ = input.readInt32();
- break;
- }
- case 40: {
- bitField0_ |= 0x00000010;
- userSid_ = input.readUInt32();
- break;
- }
- case 48: {
- bitField0_ |= 0x00000020;
- visible_ = input.readBool();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_Info_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_Info_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Info.class, Info.Builder.class);
- }
-
- private int bitField0_;
- public static final int VERSION_FIELD_NUMBER = 1;
- private int version_;
- /**
- * optional int32 version = 1 [default = -1];
- * @return Whether the version field is set.
- */
- public boolean hasVersion() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * optional int32 version = 1 [default = -1];
- * @return The version.
- */
- public int getVersion() {
- return version_;
- }
-
- public static final int TIMESTAMP_FIELD_NUMBER = 2;
- private long timestamp_;
- /**
- * optional int64 timestamp = 2;
- * @return Whether the timestamp field is set.
- */
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional int64 timestamp = 2;
- * @return The timestamp.
- */
- public long getTimestamp() {
- return timestamp_;
- }
-
- public static final int CHANGESET_FIELD_NUMBER = 3;
- private long changeset_;
- /**
- * optional int64 changeset = 3;
- * @return Whether the changeset field is set.
- */
- public boolean hasChangeset() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- * optional int64 changeset = 3;
- * @return The changeset.
- */
- public long getChangeset() {
- return changeset_;
- }
-
- public static final int UID_FIELD_NUMBER = 4;
- private int uid_;
- /**
- * optional int32 uid = 4;
- * @return Whether the uid field is set.
- */
- public boolean hasUid() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional int32 uid = 4;
- * @return The uid.
- */
- public int getUid() {
- return uid_;
- }
-
- public static final int USER_SID_FIELD_NUMBER = 5;
- private int userSid_;
- /**
- *
- * String IDs
- *
- *
- * optional uint32 user_sid = 5;
- * @return Whether the userSid field is set.
- */
- public boolean hasUserSid() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * String IDs
- *
- *
- * optional uint32 user_sid = 5;
- * @return The userSid.
- */
- public int getUserSid() {
- return userSid_;
- }
-
- public static final int VISIBLE_FIELD_NUMBER = 6;
- private boolean visible_;
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * optional bool visible = 6;
- * @return Whether the visible field is set.
- */
- public boolean hasVisible() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * optional bool visible = 6;
- * @return The visible.
- */
- public boolean getVisible() {
- return visible_;
- }
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeInt32(1, version_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeInt64(2, timestamp_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeInt64(3, changeset_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeInt32(4, uid_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- output.writeUInt32(5, userSid_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- output.writeBool(6, visible_);
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(1, version_);
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(2, timestamp_);
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(3, changeset_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt32Size(4, uid_);
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32Size(5, userSid_);
- }
- if (((bitField0_ & 0x00000020) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeBoolSize(6, visible_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Info)) {
- return super.equals(obj);
- }
- Info other = (Info) obj;
-
- if (hasVersion() != other.hasVersion()) return false;
- if (hasVersion()) {
- if (getVersion()
- != other.getVersion()) return false;
- }
- if (hasTimestamp() != other.hasTimestamp()) return false;
- if (hasTimestamp()) {
- if (getTimestamp()
- != other.getTimestamp()) return false;
- }
- if (hasChangeset() != other.hasChangeset()) return false;
- if (hasChangeset()) {
- if (getChangeset()
- != other.getChangeset()) return false;
- }
- if (hasUid() != other.hasUid()) return false;
- if (hasUid()) {
- if (getUid()
- != other.getUid()) return false;
- }
- if (hasUserSid() != other.hasUserSid()) return false;
- if (hasUserSid()) {
- if (getUserSid()
- != other.getUserSid()) return false;
- }
- if (hasVisible() != other.hasVisible()) return false;
- if (hasVisible()) {
- if (getVisible()
- != other.getVisible()) return false;
- }
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasVersion()) {
- hash = (37 * hash) + VERSION_FIELD_NUMBER;
- hash = (53 * hash) + getVersion();
- }
- if (hasTimestamp()) {
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getTimestamp());
- }
- if (hasChangeset()) {
- hash = (37 * hash) + CHANGESET_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getChangeset());
- }
- if (hasUid()) {
- hash = (37 * hash) + UID_FIELD_NUMBER;
- hash = (53 * hash) + getUid();
- }
- if (hasUserSid()) {
- hash = (37 * hash) + USER_SID_FIELD_NUMBER;
- hash = (53 * hash) + getUserSid();
- }
- if (hasVisible()) {
- hash = (37 * hash) + VISIBLE_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
- getVisible());
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Info parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Info parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Info parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Info parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Info parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Info parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Info parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Info parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Info parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Info parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Info parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Info parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Info prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * Optional metadata that may be included into each primitive.
- *
- *
- * Protobuf type {@code OSMPBF.Info}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.Info)
- InfoOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_Info_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_Info_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Info.class, Info.Builder.class);
- }
-
- // Construct using Info.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- version_ = -1;
- bitField0_ = (bitField0_ & ~0x00000001);
- timestamp_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000002);
- changeset_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000004);
- uid_ = 0;
- bitField0_ = (bitField0_ & ~0x00000008);
- userSid_ = 0;
- bitField0_ = (bitField0_ & ~0x00000010);
- visible_ = false;
- bitField0_ = (bitField0_ & ~0x00000020);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_Info_descriptor;
- }
-
- @Override
- public Info getDefaultInstanceForType() {
- return Info.getDefaultInstance();
- }
-
- @Override
- public Info build() {
- Info result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public Info buildPartial() {
- Info result = new Info(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- to_bitField0_ |= 0x00000001;
- }
- result.version_ = version_;
- if (((from_bitField0_ & 0x00000002) != 0)) {
- result.timestamp_ = timestamp_;
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000004) != 0)) {
- result.changeset_ = changeset_;
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000008) != 0)) {
- result.uid_ = uid_;
- to_bitField0_ |= 0x00000008;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.userSid_ = userSid_;
- to_bitField0_ |= 0x00000010;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.visible_ = visible_;
- to_bitField0_ |= 0x00000020;
- }
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof Info) {
- return mergeFrom((Info)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(Info other) {
- if (other == Info.getDefaultInstance()) return this;
- if (other.hasVersion()) {
- setVersion(other.getVersion());
- }
- if (other.hasTimestamp()) {
- setTimestamp(other.getTimestamp());
- }
- if (other.hasChangeset()) {
- setChangeset(other.getChangeset());
- }
- if (other.hasUid()) {
- setUid(other.getUid());
- }
- if (other.hasUserSid()) {
- setUserSid(other.getUserSid());
- }
- if (other.hasVisible()) {
- setVisible(other.getVisible());
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Info parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (Info) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private int version_ = -1;
- /**
- * optional int32 version = 1 [default = -1];
- * @return Whether the version field is set.
- */
- public boolean hasVersion() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * optional int32 version = 1 [default = -1];
- * @return The version.
- */
- public int getVersion() {
- return version_;
- }
- /**
- * optional int32 version = 1 [default = -1];
- * @param value The version to set.
- * @return This builder for chaining.
- */
- public Builder setVersion(int value) {
- bitField0_ |= 0x00000001;
- version_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int32 version = 1 [default = -1];
- * @return This builder for chaining.
- */
- public Builder clearVersion() {
- bitField0_ = (bitField0_ & ~0x00000001);
- version_ = -1;
- onChanged();
- return this;
- }
-
- private long timestamp_ ;
- /**
- * optional int64 timestamp = 2;
- * @return Whether the timestamp field is set.
- */
- public boolean hasTimestamp() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional int64 timestamp = 2;
- * @return The timestamp.
- */
- public long getTimestamp() {
- return timestamp_;
- }
- /**
- * optional int64 timestamp = 2;
- * @param value The timestamp to set.
- * @return This builder for chaining.
- */
- public Builder setTimestamp(long value) {
- bitField0_ |= 0x00000002;
- timestamp_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 timestamp = 2;
- * @return This builder for chaining.
- */
- public Builder clearTimestamp() {
- bitField0_ = (bitField0_ & ~0x00000002);
- timestamp_ = 0L;
- onChanged();
- return this;
- }
-
- private long changeset_ ;
- /**
- * optional int64 changeset = 3;
- * @return Whether the changeset field is set.
- */
- public boolean hasChangeset() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- * optional int64 changeset = 3;
- * @return The changeset.
- */
- public long getChangeset() {
- return changeset_;
- }
- /**
- * optional int64 changeset = 3;
- * @param value The changeset to set.
- * @return This builder for chaining.
- */
- public Builder setChangeset(long value) {
- bitField0_ |= 0x00000004;
- changeset_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int64 changeset = 3;
- * @return This builder for chaining.
- */
- public Builder clearChangeset() {
- bitField0_ = (bitField0_ & ~0x00000004);
- changeset_ = 0L;
- onChanged();
- return this;
- }
-
- private int uid_ ;
- /**
- * optional int32 uid = 4;
- * @return Whether the uid field is set.
- */
- public boolean hasUid() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional int32 uid = 4;
- * @return The uid.
- */
- public int getUid() {
- return uid_;
- }
- /**
- * optional int32 uid = 4;
- * @param value The uid to set.
- * @return This builder for chaining.
- */
- public Builder setUid(int value) {
- bitField0_ |= 0x00000008;
- uid_ = value;
- onChanged();
- return this;
- }
- /**
- * optional int32 uid = 4;
- * @return This builder for chaining.
- */
- public Builder clearUid() {
- bitField0_ = (bitField0_ & ~0x00000008);
- uid_ = 0;
- onChanged();
- return this;
- }
-
- private int userSid_ ;
- /**
- *
- * String IDs
- *
- *
- * optional uint32 user_sid = 5;
- * @return Whether the userSid field is set.
- */
- public boolean hasUserSid() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- *
- * String IDs
- *
- *
- * optional uint32 user_sid = 5;
- * @return The userSid.
- */
- public int getUserSid() {
- return userSid_;
- }
- /**
- *
- * String IDs
- *
- *
- * optional uint32 user_sid = 5;
- * @param value The userSid to set.
- * @return This builder for chaining.
- */
- public Builder setUserSid(int value) {
- bitField0_ |= 0x00000010;
- userSid_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * String IDs
- *
- *
- * optional uint32 user_sid = 5;
- * @return This builder for chaining.
- */
- public Builder clearUserSid() {
- bitField0_ = (bitField0_ & ~0x00000010);
- userSid_ = 0;
- onChanged();
- return this;
- }
-
- private boolean visible_ ;
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * optional bool visible = 6;
- * @return Whether the visible field is set.
- */
- public boolean hasVisible() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * optional bool visible = 6;
- * @return The visible.
- */
- public boolean getVisible() {
- return visible_;
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * optional bool visible = 6;
- * @param value The visible to set.
- * @return This builder for chaining.
- */
- public Builder setVisible(boolean value) {
- bitField0_ |= 0x00000020;
- visible_ = value;
- onChanged();
- return this;
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * optional bool visible = 6;
- * @return This builder for chaining.
- */
- public Builder clearVisible() {
- bitField0_ = (bitField0_ & ~0x00000020);
- visible_ = false;
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.Info)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.Info)
- private static final Info DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Info();
- }
-
- public static Info getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public Info parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Info(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public Info getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface DenseInfoOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.DenseInfo)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * repeated int32 version = 1 [packed = true];
- * @return A list containing the version.
- */
- java.util.List getVersionList();
- /**
- * repeated int32 version = 1 [packed = true];
- * @return The count of version.
- */
- int getVersionCount();
- /**
- * repeated int32 version = 1 [packed = true];
- * @param index The index of the element to return.
- * @return The version at the given index.
- */
- int getVersion(int index);
-
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @return A list containing the timestamp.
- */
- java.util.List getTimestampList();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @return The count of timestamp.
- */
- int getTimestampCount();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The timestamp at the given index.
- */
- long getTimestamp(int index);
-
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @return A list containing the changeset.
- */
- java.util.List getChangesetList();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @return The count of changeset.
- */
- int getChangesetCount();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The changeset at the given index.
- */
- long getChangeset(int index);
-
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @return A list containing the uid.
- */
- java.util.List getUidList();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @return The count of uid.
- */
- int getUidCount();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @param index The index of the element to return.
- * @return The uid at the given index.
- */
- int getUid(int index);
-
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @return A list containing the userSid.
- */
- java.util.List getUserSidList();
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @return The count of userSid.
- */
- int getUserSidCount();
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @param index The index of the element to return.
- * @return The userSid at the given index.
- */
- int getUserSid(int index);
-
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @return A list containing the visible.
- */
- java.util.List getVisibleList();
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @return The count of visible.
- */
- int getVisibleCount();
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @param index The index of the element to return.
- * @return The visible at the given index.
- */
- boolean getVisible(int index);
- }
- /**
- *
- ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes.
- *
- *
- * Protobuf type {@code OSMPBF.DenseInfo}
- */
- public static final class DenseInfo extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.DenseInfo)
- DenseInfoOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use DenseInfo.newBuilder() to construct.
- private DenseInfo(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private DenseInfo() {
- version_ = emptyIntList();
- timestamp_ = emptyLongList();
- changeset_ = emptyLongList();
- uid_ = emptyIntList();
- userSid_ = emptyIntList();
- visible_ = emptyBooleanList();
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new DenseInfo();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private DenseInfo(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- version_ = newIntList();
- mutable_bitField0_ |= 0x00000001;
- }
- version_.addInt(input.readInt32());
- break;
- }
- case 10: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
- version_ = newIntList();
- mutable_bitField0_ |= 0x00000001;
- }
- while (input.getBytesUntilLimit() > 0) {
- version_.addInt(input.readInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 16: {
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- timestamp_ = newLongList();
- mutable_bitField0_ |= 0x00000002;
- }
- timestamp_.addLong(input.readSInt64());
- break;
- }
- case 18: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
- timestamp_ = newLongList();
- mutable_bitField0_ |= 0x00000002;
- }
- while (input.getBytesUntilLimit() > 0) {
- timestamp_.addLong(input.readSInt64());
- }
- input.popLimit(limit);
- break;
- }
- case 24: {
- if (!((mutable_bitField0_ & 0x00000004) != 0)) {
- changeset_ = newLongList();
- mutable_bitField0_ |= 0x00000004;
- }
- changeset_.addLong(input.readSInt64());
- break;
- }
- case 26: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
- changeset_ = newLongList();
- mutable_bitField0_ |= 0x00000004;
- }
- while (input.getBytesUntilLimit() > 0) {
- changeset_.addLong(input.readSInt64());
- }
- input.popLimit(limit);
- break;
- }
- case 32: {
- if (!((mutable_bitField0_ & 0x00000008) != 0)) {
- uid_ = newIntList();
- mutable_bitField0_ |= 0x00000008;
- }
- uid_.addInt(input.readSInt32());
- break;
- }
- case 34: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) {
- uid_ = newIntList();
- mutable_bitField0_ |= 0x00000008;
- }
- while (input.getBytesUntilLimit() > 0) {
- uid_.addInt(input.readSInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 40: {
- if (!((mutable_bitField0_ & 0x00000010) != 0)) {
- userSid_ = newIntList();
- mutable_bitField0_ |= 0x00000010;
- }
- userSid_.addInt(input.readSInt32());
- break;
- }
- case 42: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
- userSid_ = newIntList();
- mutable_bitField0_ |= 0x00000010;
- }
- while (input.getBytesUntilLimit() > 0) {
- userSid_.addInt(input.readSInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 48: {
- if (!((mutable_bitField0_ & 0x00000020) != 0)) {
- visible_ = newBooleanList();
- mutable_bitField0_ |= 0x00000020;
- }
- visible_.addBoolean(input.readBool());
- break;
- }
- case 50: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
- visible_ = newBooleanList();
- mutable_bitField0_ |= 0x00000020;
- }
- while (input.getBytesUntilLimit() > 0) {
- visible_.addBoolean(input.readBool());
- }
- input.popLimit(limit);
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- version_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- timestamp_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000004) != 0)) {
- changeset_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000008) != 0)) {
- uid_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000010) != 0)) {
- userSid_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000020) != 0)) {
- visible_.makeImmutable(); // C
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_DenseInfo_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_DenseInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- DenseInfo.class, DenseInfo.Builder.class);
- }
-
- public static final int VERSION_FIELD_NUMBER = 1;
- private com.google.protobuf.Internal.IntList version_;
- /**
- * repeated int32 version = 1 [packed = true];
- * @return A list containing the version.
- */
- public java.util.List
- getVersionList() {
- return version_;
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @return The count of version.
- */
- public int getVersionCount() {
- return version_.size();
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @param index The index of the element to return.
- * @return The version at the given index.
- */
- public int getVersion(int index) {
- return version_.getInt(index);
- }
- private int versionMemoizedSerializedSize = -1;
-
- public static final int TIMESTAMP_FIELD_NUMBER = 2;
- private com.google.protobuf.Internal.LongList timestamp_;
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @return A list containing the timestamp.
- */
- public java.util.List
- getTimestampList() {
- return timestamp_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @return The count of timestamp.
- */
- public int getTimestampCount() {
- return timestamp_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The timestamp at the given index.
- */
- public long getTimestamp(int index) {
- return timestamp_.getLong(index);
- }
- private int timestampMemoizedSerializedSize = -1;
-
- public static final int CHANGESET_FIELD_NUMBER = 3;
- private com.google.protobuf.Internal.LongList changeset_;
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @return A list containing the changeset.
- */
- public java.util.List
- getChangesetList() {
- return changeset_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @return The count of changeset.
- */
- public int getChangesetCount() {
- return changeset_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The changeset at the given index.
- */
- public long getChangeset(int index) {
- return changeset_.getLong(index);
- }
- private int changesetMemoizedSerializedSize = -1;
-
- public static final int UID_FIELD_NUMBER = 4;
- private com.google.protobuf.Internal.IntList uid_;
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @return A list containing the uid.
- */
- public java.util.List
- getUidList() {
- return uid_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @return The count of uid.
- */
- public int getUidCount() {
- return uid_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @param index The index of the element to return.
- * @return The uid at the given index.
- */
- public int getUid(int index) {
- return uid_.getInt(index);
- }
- private int uidMemoizedSerializedSize = -1;
-
- public static final int USER_SID_FIELD_NUMBER = 5;
- private com.google.protobuf.Internal.IntList userSid_;
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @return A list containing the userSid.
- */
- public java.util.List
- getUserSidList() {
- return userSid_;
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @return The count of userSid.
- */
- public int getUserSidCount() {
- return userSid_.size();
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @param index The index of the element to return.
- * @return The userSid at the given index.
- */
- public int getUserSid(int index) {
- return userSid_.getInt(index);
- }
- private int userSidMemoizedSerializedSize = -1;
-
- public static final int VISIBLE_FIELD_NUMBER = 6;
- private com.google.protobuf.Internal.BooleanList visible_;
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @return A list containing the visible.
- */
- public java.util.List
- getVisibleList() {
- return visible_;
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @return The count of visible.
- */
- public int getVisibleCount() {
- return visible_.size();
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @param index The index of the element to return.
- * @return The visible at the given index.
- */
- public boolean getVisible(int index) {
- return visible_.getBoolean(index);
- }
- private int visibleMemoizedSerializedSize = -1;
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (getVersionList().size() > 0) {
- output.writeUInt32NoTag(10);
- output.writeUInt32NoTag(versionMemoizedSerializedSize);
- }
- for (int i = 0; i < version_.size(); i++) {
- output.writeInt32NoTag(version_.getInt(i));
- }
- if (getTimestampList().size() > 0) {
- output.writeUInt32NoTag(18);
- output.writeUInt32NoTag(timestampMemoizedSerializedSize);
- }
- for (int i = 0; i < timestamp_.size(); i++) {
- output.writeSInt64NoTag(timestamp_.getLong(i));
- }
- if (getChangesetList().size() > 0) {
- output.writeUInt32NoTag(26);
- output.writeUInt32NoTag(changesetMemoizedSerializedSize);
- }
- for (int i = 0; i < changeset_.size(); i++) {
- output.writeSInt64NoTag(changeset_.getLong(i));
- }
- if (getUidList().size() > 0) {
- output.writeUInt32NoTag(34);
- output.writeUInt32NoTag(uidMemoizedSerializedSize);
- }
- for (int i = 0; i < uid_.size(); i++) {
- output.writeSInt32NoTag(uid_.getInt(i));
- }
- if (getUserSidList().size() > 0) {
- output.writeUInt32NoTag(42);
- output.writeUInt32NoTag(userSidMemoizedSerializedSize);
- }
- for (int i = 0; i < userSid_.size(); i++) {
- output.writeSInt32NoTag(userSid_.getInt(i));
- }
- if (getVisibleList().size() > 0) {
- output.writeUInt32NoTag(50);
- output.writeUInt32NoTag(visibleMemoizedSerializedSize);
- }
- for (int i = 0; i < visible_.size(); i++) {
- output.writeBoolNoTag(visible_.getBoolean(i));
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (int i = 0; i < version_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(version_.getInt(i));
- }
- size += dataSize;
- if (!getVersionList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- versionMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < timestamp_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt64SizeNoTag(timestamp_.getLong(i));
- }
- size += dataSize;
- if (!getTimestampList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- timestampMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < changeset_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt64SizeNoTag(changeset_.getLong(i));
- }
- size += dataSize;
- if (!getChangesetList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- changesetMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < uid_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt32SizeNoTag(uid_.getInt(i));
- }
- size += dataSize;
- if (!getUidList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- uidMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < userSid_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt32SizeNoTag(userSid_.getInt(i));
- }
- size += dataSize;
- if (!getUserSidList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- userSidMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- dataSize = 1 * getVisibleList().size();
- size += dataSize;
- if (!getVisibleList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- visibleMemoizedSerializedSize = dataSize;
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof DenseInfo)) {
- return super.equals(obj);
- }
- DenseInfo other = (DenseInfo) obj;
-
- if (!getVersionList()
- .equals(other.getVersionList())) return false;
- if (!getTimestampList()
- .equals(other.getTimestampList())) return false;
- if (!getChangesetList()
- .equals(other.getChangesetList())) return false;
- if (!getUidList()
- .equals(other.getUidList())) return false;
- if (!getUserSidList()
- .equals(other.getUserSidList())) return false;
- if (!getVisibleList()
- .equals(other.getVisibleList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getVersionCount() > 0) {
- hash = (37 * hash) + VERSION_FIELD_NUMBER;
- hash = (53 * hash) + getVersionList().hashCode();
- }
- if (getTimestampCount() > 0) {
- hash = (37 * hash) + TIMESTAMP_FIELD_NUMBER;
- hash = (53 * hash) + getTimestampList().hashCode();
- }
- if (getChangesetCount() > 0) {
- hash = (37 * hash) + CHANGESET_FIELD_NUMBER;
- hash = (53 * hash) + getChangesetList().hashCode();
- }
- if (getUidCount() > 0) {
- hash = (37 * hash) + UID_FIELD_NUMBER;
- hash = (53 * hash) + getUidList().hashCode();
- }
- if (getUserSidCount() > 0) {
- hash = (37 * hash) + USER_SID_FIELD_NUMBER;
- hash = (53 * hash) + getUserSidList().hashCode();
- }
- if (getVisibleCount() > 0) {
- hash = (37 * hash) + VISIBLE_FIELD_NUMBER;
- hash = (53 * hash) + getVisibleList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static DenseInfo parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static DenseInfo parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static DenseInfo parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static DenseInfo parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static DenseInfo parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static DenseInfo parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static DenseInfo parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static DenseInfo parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static DenseInfo parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static DenseInfo parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static DenseInfo parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static DenseInfo parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(DenseInfo prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- ** Optional metadata that may be included into each primitive. Special dense format used in DenseNodes.
- *
- *
- * Protobuf type {@code OSMPBF.DenseInfo}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.DenseInfo)
- DenseInfoOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_DenseInfo_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_DenseInfo_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- DenseInfo.class, DenseInfo.Builder.class);
- }
-
- // Construct using DenseInfo.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- version_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000001);
- timestamp_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000002);
- changeset_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000004);
- uid_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000008);
- userSid_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000010);
- visible_ = emptyBooleanList();
- bitField0_ = (bitField0_ & ~0x00000020);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_DenseInfo_descriptor;
- }
-
- @Override
- public DenseInfo getDefaultInstanceForType() {
- return DenseInfo.getDefaultInstance();
- }
-
- @Override
- public DenseInfo build() {
- DenseInfo result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public DenseInfo buildPartial() {
- DenseInfo result = new DenseInfo(this);
- int from_bitField0_ = bitField0_;
- if (((bitField0_ & 0x00000001) != 0)) {
- version_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.version_ = version_;
- if (((bitField0_ & 0x00000002) != 0)) {
- timestamp_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.timestamp_ = timestamp_;
- if (((bitField0_ & 0x00000004) != 0)) {
- changeset_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.changeset_ = changeset_;
- if (((bitField0_ & 0x00000008) != 0)) {
- uid_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000008);
- }
- result.uid_ = uid_;
- if (((bitField0_ & 0x00000010) != 0)) {
- userSid_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000010);
- }
- result.userSid_ = userSid_;
- if (((bitField0_ & 0x00000020) != 0)) {
- visible_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000020);
- }
- result.visible_ = visible_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof DenseInfo) {
- return mergeFrom((DenseInfo)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(DenseInfo other) {
- if (other == DenseInfo.getDefaultInstance()) return this;
- if (!other.version_.isEmpty()) {
- if (version_.isEmpty()) {
- version_ = other.version_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureVersionIsMutable();
- version_.addAll(other.version_);
- }
- onChanged();
- }
- if (!other.timestamp_.isEmpty()) {
- if (timestamp_.isEmpty()) {
- timestamp_ = other.timestamp_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureTimestampIsMutable();
- timestamp_.addAll(other.timestamp_);
- }
- onChanged();
- }
- if (!other.changeset_.isEmpty()) {
- if (changeset_.isEmpty()) {
- changeset_ = other.changeset_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureChangesetIsMutable();
- changeset_.addAll(other.changeset_);
- }
- onChanged();
- }
- if (!other.uid_.isEmpty()) {
- if (uid_.isEmpty()) {
- uid_ = other.uid_;
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- ensureUidIsMutable();
- uid_.addAll(other.uid_);
- }
- onChanged();
- }
- if (!other.userSid_.isEmpty()) {
- if (userSid_.isEmpty()) {
- userSid_ = other.userSid_;
- bitField0_ = (bitField0_ & ~0x00000010);
- } else {
- ensureUserSidIsMutable();
- userSid_.addAll(other.userSid_);
- }
- onChanged();
- }
- if (!other.visible_.isEmpty()) {
- if (visible_.isEmpty()) {
- visible_ = other.visible_;
- bitField0_ = (bitField0_ & ~0x00000020);
- } else {
- ensureVisibleIsMutable();
- visible_.addAll(other.visible_);
- }
- onChanged();
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- DenseInfo parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (DenseInfo) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private com.google.protobuf.Internal.IntList version_ = emptyIntList();
- private void ensureVersionIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- version_ = mutableCopy(version_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @return A list containing the version.
- */
- public java.util.List
- getVersionList() {
- return ((bitField0_ & 0x00000001) != 0) ?
- java.util.Collections.unmodifiableList(version_) : version_;
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @return The count of version.
- */
- public int getVersionCount() {
- return version_.size();
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @param index The index of the element to return.
- * @return The version at the given index.
- */
- public int getVersion(int index) {
- return version_.getInt(index);
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @param index The index to set the value at.
- * @param value The version to set.
- * @return This builder for chaining.
- */
- public Builder setVersion(
- int index, int value) {
- ensureVersionIsMutable();
- version_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @param value The version to add.
- * @return This builder for chaining.
- */
- public Builder addVersion(int value) {
- ensureVersionIsMutable();
- version_.addInt(value);
- onChanged();
- return this;
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @param values The version to add.
- * @return This builder for chaining.
- */
- public Builder addAllVersion(
- Iterable extends Integer> values) {
- ensureVersionIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, version_);
- onChanged();
- return this;
- }
- /**
- * repeated int32 version = 1 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearVersion() {
- version_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.LongList timestamp_ = emptyLongList();
- private void ensureTimestampIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- timestamp_ = mutableCopy(timestamp_);
- bitField0_ |= 0x00000002;
- }
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @return A list containing the timestamp.
- */
- public java.util.List
- getTimestampList() {
- return ((bitField0_ & 0x00000002) != 0) ?
- java.util.Collections.unmodifiableList(timestamp_) : timestamp_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @return The count of timestamp.
- */
- public int getTimestampCount() {
- return timestamp_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The timestamp at the given index.
- */
- public long getTimestamp(int index) {
- return timestamp_.getLong(index);
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @param index The index to set the value at.
- * @param value The timestamp to set.
- * @return This builder for chaining.
- */
- public Builder setTimestamp(
- int index, long value) {
- ensureTimestampIsMutable();
- timestamp_.setLong(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @param value The timestamp to add.
- * @return This builder for chaining.
- */
- public Builder addTimestamp(long value) {
- ensureTimestampIsMutable();
- timestamp_.addLong(value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @param values The timestamp to add.
- * @return This builder for chaining.
- */
- public Builder addAllTimestamp(
- Iterable extends Long> values) {
- ensureTimestampIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, timestamp_);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 timestamp = 2 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearTimestamp() {
- timestamp_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.LongList changeset_ = emptyLongList();
- private void ensureChangesetIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- changeset_ = mutableCopy(changeset_);
- bitField0_ |= 0x00000004;
- }
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @return A list containing the changeset.
- */
- public java.util.List
- getChangesetList() {
- return ((bitField0_ & 0x00000004) != 0) ?
- java.util.Collections.unmodifiableList(changeset_) : changeset_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @return The count of changeset.
- */
- public int getChangesetCount() {
- return changeset_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The changeset at the given index.
- */
- public long getChangeset(int index) {
- return changeset_.getLong(index);
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @param index The index to set the value at.
- * @param value The changeset to set.
- * @return This builder for chaining.
- */
- public Builder setChangeset(
- int index, long value) {
- ensureChangesetIsMutable();
- changeset_.setLong(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @param value The changeset to add.
- * @return This builder for chaining.
- */
- public Builder addChangeset(long value) {
- ensureChangesetIsMutable();
- changeset_.addLong(value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @param values The changeset to add.
- * @return This builder for chaining.
- */
- public Builder addAllChangeset(
- Iterable extends Long> values) {
- ensureChangesetIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, changeset_);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 changeset = 3 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearChangeset() {
- changeset_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList uid_ = emptyIntList();
- private void ensureUidIsMutable() {
- if (!((bitField0_ & 0x00000008) != 0)) {
- uid_ = mutableCopy(uid_);
- bitField0_ |= 0x00000008;
- }
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @return A list containing the uid.
- */
- public java.util.List
- getUidList() {
- return ((bitField0_ & 0x00000008) != 0) ?
- java.util.Collections.unmodifiableList(uid_) : uid_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @return The count of uid.
- */
- public int getUidCount() {
- return uid_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @param index The index of the element to return.
- * @return The uid at the given index.
- */
- public int getUid(int index) {
- return uid_.getInt(index);
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @param index The index to set the value at.
- * @param value The uid to set.
- * @return This builder for chaining.
- */
- public Builder setUid(
- int index, int value) {
- ensureUidIsMutable();
- uid_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @param value The uid to add.
- * @return This builder for chaining.
- */
- public Builder addUid(int value) {
- ensureUidIsMutable();
- uid_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @param values The uid to add.
- * @return This builder for chaining.
- */
- public Builder addAllUid(
- Iterable extends Integer> values) {
- ensureUidIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, uid_);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint32 uid = 4 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearUid() {
- uid_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList userSid_ = emptyIntList();
- private void ensureUserSidIsMutable() {
- if (!((bitField0_ & 0x00000010) != 0)) {
- userSid_ = mutableCopy(userSid_);
- bitField0_ |= 0x00000010;
- }
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @return A list containing the userSid.
- */
- public java.util.List
- getUserSidList() {
- return ((bitField0_ & 0x00000010) != 0) ?
- java.util.Collections.unmodifiableList(userSid_) : userSid_;
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @return The count of userSid.
- */
- public int getUserSidCount() {
- return userSid_.size();
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @param index The index of the element to return.
- * @return The userSid at the given index.
- */
- public int getUserSid(int index) {
- return userSid_.getInt(index);
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @param index The index to set the value at.
- * @param value The userSid to set.
- * @return This builder for chaining.
- */
- public Builder setUserSid(
- int index, int value) {
- ensureUserSidIsMutable();
- userSid_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @param value The userSid to add.
- * @return This builder for chaining.
- */
- public Builder addUserSid(int value) {
- ensureUserSidIsMutable();
- userSid_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @param values The userSid to add.
- * @return This builder for chaining.
- */
- public Builder addAllUserSid(
- Iterable extends Integer> values) {
- ensureUserSidIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, userSid_);
- onChanged();
- return this;
- }
- /**
- *
- * String IDs for usernames. DELTA coded
- *
- *
- * repeated sint32 user_sid = 5 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearUserSid() {
- userSid_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.BooleanList visible_ = emptyBooleanList();
- private void ensureVisibleIsMutable() {
- if (!((bitField0_ & 0x00000020) != 0)) {
- visible_ = mutableCopy(visible_);
- bitField0_ |= 0x00000020;
- }
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @return A list containing the visible.
- */
- public java.util.List
- getVisibleList() {
- return ((bitField0_ & 0x00000020) != 0) ?
- java.util.Collections.unmodifiableList(visible_) : visible_;
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @return The count of visible.
- */
- public int getVisibleCount() {
- return visible_.size();
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @param index The index of the element to return.
- * @return The visible at the given index.
- */
- public boolean getVisible(int index) {
- return visible_.getBoolean(index);
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @param index The index to set the value at.
- * @param value The visible to set.
- * @return This builder for chaining.
- */
- public Builder setVisible(
- int index, boolean value) {
- ensureVisibleIsMutable();
- visible_.setBoolean(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @param value The visible to add.
- * @return This builder for chaining.
- */
- public Builder addVisible(boolean value) {
- ensureVisibleIsMutable();
- visible_.addBoolean(value);
- onChanged();
- return this;
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @param values The visible to add.
- * @return This builder for chaining.
- */
- public Builder addAllVisible(
- Iterable extends Boolean> values) {
- ensureVisibleIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, visible_);
- onChanged();
- return this;
- }
- /**
- *
- * The visible flag is used to store history information. It indicates that
- * the current object version has been created by a delete operation on the
- * OSM API.
- * When a writer sets this flag, it MUST add a required_features tag with
- * value "HistoricalInformation" to the HeaderBlock.
- * If this flag is not available for some object it MUST be assumed to be
- * true if the file has the required_features tag "HistoricalInformation"
- * set.
- *
- *
- * repeated bool visible = 6 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearVisible() {
- visible_ = emptyBooleanList();
- bitField0_ = (bitField0_ & ~0x00000020);
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.DenseInfo)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.DenseInfo)
- private static final DenseInfo DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new DenseInfo();
- }
-
- public static DenseInfo getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public DenseInfo parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new DenseInfo(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public DenseInfo getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface ChangeSetOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.ChangeSet)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- *
- * // Parallel arrays.
- * repeated uint32 keys = 2 [packed = true]; // String IDs.
- * repeated uint32 vals = 3 [packed = true]; // String IDs.
- * optional Info info = 4;
- *
- *
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- boolean hasId();
- /**
- *
- *
- * // Parallel arrays.
- * repeated uint32 keys = 2 [packed = true]; // String IDs.
- * repeated uint32 vals = 3 [packed = true]; // String IDs.
- * optional Info info = 4;
- *
- *
- * required int64 id = 1;
- * @return The id.
- */
- long getId();
- }
- /**
- *
- * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
- * TODO: REMOVE THIS?
- *
- *
- * Protobuf type {@code OSMPBF.ChangeSet}
- */
- public static final class ChangeSet extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.ChangeSet)
- ChangeSetOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use ChangeSet.newBuilder() to construct.
- private ChangeSet(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private ChangeSet() {
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new ChangeSet();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private ChangeSet(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- bitField0_ |= 0x00000001;
- id_ = input.readInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_ChangeSet_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_ChangeSet_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- ChangeSet.class, ChangeSet.Builder.class);
- }
-
- private int bitField0_;
- public static final int ID_FIELD_NUMBER = 1;
- private long id_;
- /**
- *
- *
- * // Parallel arrays.
- * repeated uint32 keys = 2 [packed = true]; // String IDs.
- * repeated uint32 vals = 3 [packed = true]; // String IDs.
- * optional Info info = 4;
- *
- *
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- * // Parallel arrays.
- * repeated uint32 keys = 2 [packed = true]; // String IDs.
- * repeated uint32 vals = 3 [packed = true]; // String IDs.
- * optional Info info = 4;
- *
- *
- * required int64 id = 1;
- * @return The id.
- */
- public long getId() {
- return id_;
- }
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!hasId()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeInt64(1, id_);
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, id_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof ChangeSet)) {
- return super.equals(obj);
- }
- ChangeSet other = (ChangeSet) obj;
-
- if (hasId() != other.hasId()) return false;
- if (hasId()) {
- if (getId()
- != other.getId()) return false;
- }
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasId()) {
- hash = (37 * hash) + ID_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getId());
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static ChangeSet parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static ChangeSet parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static ChangeSet parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static ChangeSet parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static ChangeSet parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static ChangeSet parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static ChangeSet parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static ChangeSet parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static ChangeSet parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static ChangeSet parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static ChangeSet parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static ChangeSet parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(ChangeSet prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- *
- * THIS IS STUB DESIGN FOR CHANGESETS. NOT USED RIGHT NOW.
- * TODO: REMOVE THIS?
- *
- *
- * Protobuf type {@code OSMPBF.ChangeSet}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.ChangeSet)
- ChangeSetOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_ChangeSet_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_ChangeSet_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- ChangeSet.class, ChangeSet.Builder.class);
- }
-
- // Construct using ChangeSet.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- id_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_ChangeSet_descriptor;
- }
-
- @Override
- public ChangeSet getDefaultInstanceForType() {
- return ChangeSet.getDefaultInstance();
- }
-
- @Override
- public ChangeSet build() {
- ChangeSet result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public ChangeSet buildPartial() {
- ChangeSet result = new ChangeSet(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.id_ = id_;
- to_bitField0_ |= 0x00000001;
- }
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof ChangeSet) {
- return mergeFrom((ChangeSet)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(ChangeSet other) {
- if (other == ChangeSet.getDefaultInstance()) return this;
- if (other.hasId()) {
- setId(other.getId());
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- if (!hasId()) {
- return false;
- }
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- ChangeSet parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (ChangeSet) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private long id_ ;
- /**
- *
- *
- * // Parallel arrays.
- * repeated uint32 keys = 2 [packed = true]; // String IDs.
- * repeated uint32 vals = 3 [packed = true]; // String IDs.
- * optional Info info = 4;
- *
- *
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *
- * // Parallel arrays.
- * repeated uint32 keys = 2 [packed = true]; // String IDs.
- * repeated uint32 vals = 3 [packed = true]; // String IDs.
- * optional Info info = 4;
- *
- *
- * required int64 id = 1;
- * @return The id.
- */
- public long getId() {
- return id_;
- }
- /**
- *
- *
- * // Parallel arrays.
- * repeated uint32 keys = 2 [packed = true]; // String IDs.
- * repeated uint32 vals = 3 [packed = true]; // String IDs.
- * optional Info info = 4;
- *
- *
- * required int64 id = 1;
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(long value) {
- bitField0_ |= 0x00000001;
- id_ = value;
- onChanged();
- return this;
- }
- /**
- *
- *
- * // Parallel arrays.
- * repeated uint32 keys = 2 [packed = true]; // String IDs.
- * repeated uint32 vals = 3 [packed = true]; // String IDs.
- * optional Info info = 4;
- *
- *
- * required int64 id = 1;
- * @return This builder for chaining.
- */
- public Builder clearId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- id_ = 0L;
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.ChangeSet)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.ChangeSet)
- private static final ChangeSet DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new ChangeSet();
- }
-
- public static ChangeSet getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public ChangeSet parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new ChangeSet(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public ChangeSet getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface NodeOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.Node)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * required sint64 id = 1;
- * @return Whether the id field is set.
- */
- boolean hasId();
- /**
- * required sint64 id = 1;
- * @return The id.
- */
- long getId();
-
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- java.util.List getKeysList();
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- int getKeysCount();
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- int getKeys(int index);
-
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- java.util.List getValsList();
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- int getValsCount();
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- int getVals(int index);
-
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- boolean hasInfo();
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- Info getInfo();
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- InfoOrBuilder getInfoOrBuilder();
-
- /**
- * required sint64 lat = 8;
- * @return Whether the lat field is set.
- */
- boolean hasLat();
- /**
- * required sint64 lat = 8;
- * @return The lat.
- */
- long getLat();
-
- /**
- * required sint64 lon = 9;
- * @return Whether the lon field is set.
- */
- boolean hasLon();
- /**
- * required sint64 lon = 9;
- * @return The lon.
- */
- long getLon();
- }
- /**
- * Protobuf type {@code OSMPBF.Node}
- */
- public static final class Node extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.Node)
- NodeOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Node.newBuilder() to construct.
- private Node(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Node() {
- keys_ = emptyIntList();
- vals_ = emptyIntList();
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new Node();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Node(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- bitField0_ |= 0x00000001;
- id_ = input.readSInt64();
- break;
- }
- case 16: {
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- keys_ = newIntList();
- mutable_bitField0_ |= 0x00000002;
- }
- keys_.addInt(input.readUInt32());
- break;
- }
- case 18: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
- keys_ = newIntList();
- mutable_bitField0_ |= 0x00000002;
- }
- while (input.getBytesUntilLimit() > 0) {
- keys_.addInt(input.readUInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 24: {
- if (!((mutable_bitField0_ & 0x00000004) != 0)) {
- vals_ = newIntList();
- mutable_bitField0_ |= 0x00000004;
- }
- vals_.addInt(input.readUInt32());
- break;
- }
- case 26: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
- vals_ = newIntList();
- mutable_bitField0_ |= 0x00000004;
- }
- while (input.getBytesUntilLimit() > 0) {
- vals_.addInt(input.readUInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 34: {
- Info.Builder subBuilder = null;
- if (((bitField0_ & 0x00000002) != 0)) {
- subBuilder = info_.toBuilder();
- }
- info_ = input.readMessage(Info.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(info_);
- info_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000002;
- break;
- }
- case 64: {
- bitField0_ |= 0x00000004;
- lat_ = input.readSInt64();
- break;
- }
- case 72: {
- bitField0_ |= 0x00000008;
- lon_ = input.readSInt64();
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- keys_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000004) != 0)) {
- vals_.makeImmutable(); // C
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_Node_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_Node_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Node.class, Node.Builder.class);
- }
-
- private int bitField0_;
- public static final int ID_FIELD_NUMBER = 1;
- private long id_;
- /**
- * required sint64 id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required sint64 id = 1;
- * @return The id.
- */
- public long getId() {
- return id_;
- }
-
- public static final int KEYS_FIELD_NUMBER = 2;
- private com.google.protobuf.Internal.IntList keys_;
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- public java.util.List
- getKeysList() {
- return keys_;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- public int getKeysCount() {
- return keys_.size();
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- public int getKeys(int index) {
- return keys_.getInt(index);
- }
- private int keysMemoizedSerializedSize = -1;
-
- public static final int VALS_FIELD_NUMBER = 3;
- private com.google.protobuf.Internal.IntList vals_;
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- public java.util.List
- getValsList() {
- return vals_;
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- public int getValsCount() {
- return vals_.size();
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- public int getVals(int index) {
- return vals_.getInt(index);
- }
- private int valsMemoizedSerializedSize = -1;
-
- public static final int INFO_FIELD_NUMBER = 4;
- private Info info_;
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- public boolean hasInfo() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- public Info getInfo() {
- return info_ == null ? Info.getDefaultInstance() : info_;
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- public InfoOrBuilder getInfoOrBuilder() {
- return info_ == null ? Info.getDefaultInstance() : info_;
- }
-
- public static final int LAT_FIELD_NUMBER = 8;
- private long lat_;
- /**
- * required sint64 lat = 8;
- * @return Whether the lat field is set.
- */
- public boolean hasLat() {
- return ((bitField0_ & 0x00000004) != 0);
- }
- /**
- * required sint64 lat = 8;
- * @return The lat.
- */
- public long getLat() {
- return lat_;
- }
-
- public static final int LON_FIELD_NUMBER = 9;
- private long lon_;
- /**
- * required sint64 lon = 9;
- * @return Whether the lon field is set.
- */
- public boolean hasLon() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * required sint64 lon = 9;
- * @return The lon.
- */
- public long getLon() {
- return lon_;
- }
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!hasId()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasLat()) {
- memoizedIsInitialized = 0;
- return false;
- }
- if (!hasLon()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeSInt64(1, id_);
- }
- if (getKeysList().size() > 0) {
- output.writeUInt32NoTag(18);
- output.writeUInt32NoTag(keysMemoizedSerializedSize);
- }
- for (int i = 0; i < keys_.size(); i++) {
- output.writeUInt32NoTag(keys_.getInt(i));
- }
- if (getValsList().size() > 0) {
- output.writeUInt32NoTag(26);
- output.writeUInt32NoTag(valsMemoizedSerializedSize);
- }
- for (int i = 0; i < vals_.size(); i++) {
- output.writeUInt32NoTag(vals_.getInt(i));
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(4, getInfo());
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- output.writeSInt64(8, lat_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- output.writeSInt64(9, lon_);
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(1, id_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < keys_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeUInt32SizeNoTag(keys_.getInt(i));
- }
- size += dataSize;
- if (!getKeysList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- keysMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < vals_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeUInt32SizeNoTag(vals_.getInt(i));
- }
- size += dataSize;
- if (!getValsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- valsMemoizedSerializedSize = dataSize;
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, getInfo());
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(8, lat_);
- }
- if (((bitField0_ & 0x00000008) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeSInt64Size(9, lon_);
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Node)) {
- return super.equals(obj);
- }
- Node other = (Node) obj;
-
- if (hasId() != other.hasId()) return false;
- if (hasId()) {
- if (getId()
- != other.getId()) return false;
- }
- if (!getKeysList()
- .equals(other.getKeysList())) return false;
- if (!getValsList()
- .equals(other.getValsList())) return false;
- if (hasInfo() != other.hasInfo()) return false;
- if (hasInfo()) {
- if (!getInfo()
- .equals(other.getInfo())) return false;
- }
- if (hasLat() != other.hasLat()) return false;
- if (hasLat()) {
- if (getLat()
- != other.getLat()) return false;
- }
- if (hasLon() != other.hasLon()) return false;
- if (hasLon()) {
- if (getLon()
- != other.getLon()) return false;
- }
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasId()) {
- hash = (37 * hash) + ID_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getId());
- }
- if (getKeysCount() > 0) {
- hash = (37 * hash) + KEYS_FIELD_NUMBER;
- hash = (53 * hash) + getKeysList().hashCode();
- }
- if (getValsCount() > 0) {
- hash = (37 * hash) + VALS_FIELD_NUMBER;
- hash = (53 * hash) + getValsList().hashCode();
- }
- if (hasInfo()) {
- hash = (37 * hash) + INFO_FIELD_NUMBER;
- hash = (53 * hash) + getInfo().hashCode();
- }
- if (hasLat()) {
- hash = (37 * hash) + LAT_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getLat());
- }
- if (hasLon()) {
- hash = (37 * hash) + LON_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getLon());
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Node parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Node parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Node parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Node parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Node parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Node parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Node parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Node parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Node parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Node parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Node parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Node parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Node prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code OSMPBF.Node}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.Node)
- NodeOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_Node_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_Node_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Node.class, Node.Builder.class);
- }
-
- // Construct using Node.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getInfoFieldBuilder();
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- id_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- keys_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000002);
- vals_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000004);
- if (infoBuilder_ == null) {
- info_ = null;
- } else {
- infoBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- lat_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000010);
- lon_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000020);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_Node_descriptor;
- }
-
- @Override
- public Node getDefaultInstanceForType() {
- return Node.getDefaultInstance();
- }
-
- @Override
- public Node build() {
- Node result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public Node buildPartial() {
- Node result = new Node(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.id_ = id_;
- to_bitField0_ |= 0x00000001;
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- keys_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.keys_ = keys_;
- if (((bitField0_ & 0x00000004) != 0)) {
- vals_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.vals_ = vals_;
- if (((from_bitField0_ & 0x00000008) != 0)) {
- if (infoBuilder_ == null) {
- result.info_ = info_;
- } else {
- result.info_ = infoBuilder_.build();
- }
- to_bitField0_ |= 0x00000002;
- }
- if (((from_bitField0_ & 0x00000010) != 0)) {
- result.lat_ = lat_;
- to_bitField0_ |= 0x00000004;
- }
- if (((from_bitField0_ & 0x00000020) != 0)) {
- result.lon_ = lon_;
- to_bitField0_ |= 0x00000008;
- }
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof Node) {
- return mergeFrom((Node)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(Node other) {
- if (other == Node.getDefaultInstance()) return this;
- if (other.hasId()) {
- setId(other.getId());
- }
- if (!other.keys_.isEmpty()) {
- if (keys_.isEmpty()) {
- keys_ = other.keys_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureKeysIsMutable();
- keys_.addAll(other.keys_);
- }
- onChanged();
- }
- if (!other.vals_.isEmpty()) {
- if (vals_.isEmpty()) {
- vals_ = other.vals_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureValsIsMutable();
- vals_.addAll(other.vals_);
- }
- onChanged();
- }
- if (other.hasInfo()) {
- mergeInfo(other.getInfo());
- }
- if (other.hasLat()) {
- setLat(other.getLat());
- }
- if (other.hasLon()) {
- setLon(other.getLon());
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- if (!hasId()) {
- return false;
- }
- if (!hasLat()) {
- return false;
- }
- if (!hasLon()) {
- return false;
- }
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Node parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (Node) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private long id_ ;
- /**
- * required sint64 id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required sint64 id = 1;
- * @return The id.
- */
- public long getId() {
- return id_;
- }
- /**
- * required sint64 id = 1;
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(long value) {
- bitField0_ |= 0x00000001;
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * required sint64 id = 1;
- * @return This builder for chaining.
- */
- public Builder clearId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- id_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList keys_ = emptyIntList();
- private void ensureKeysIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- keys_ = mutableCopy(keys_);
- bitField0_ |= 0x00000002;
- }
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- public java.util.List
- getKeysList() {
- return ((bitField0_ & 0x00000002) != 0) ?
- java.util.Collections.unmodifiableList(keys_) : keys_;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- public int getKeysCount() {
- return keys_.size();
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- public int getKeys(int index) {
- return keys_.getInt(index);
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index to set the value at.
- * @param value The keys to set.
- * @return This builder for chaining.
- */
- public Builder setKeys(
- int index, int value) {
- ensureKeysIsMutable();
- keys_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param value The keys to add.
- * @return This builder for chaining.
- */
- public Builder addKeys(int value) {
- ensureKeysIsMutable();
- keys_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param values The keys to add.
- * @return This builder for chaining.
- */
- public Builder addAllKeys(
- Iterable extends Integer> values) {
- ensureKeysIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, keys_);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearKeys() {
- keys_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList vals_ = emptyIntList();
- private void ensureValsIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- vals_ = mutableCopy(vals_);
- bitField0_ |= 0x00000004;
- }
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- public java.util.List
- getValsList() {
- return ((bitField0_ & 0x00000004) != 0) ?
- java.util.Collections.unmodifiableList(vals_) : vals_;
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- public int getValsCount() {
- return vals_.size();
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- public int getVals(int index) {
- return vals_.getInt(index);
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index to set the value at.
- * @param value The vals to set.
- * @return This builder for chaining.
- */
- public Builder setVals(
- int index, int value) {
- ensureValsIsMutable();
- vals_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @param value The vals to add.
- * @return This builder for chaining.
- */
- public Builder addVals(int value) {
- ensureValsIsMutable();
- vals_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @param values The vals to add.
- * @return This builder for chaining.
- */
- public Builder addAllVals(
- Iterable extends Integer> values) {
- ensureValsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, vals_);
- onChanged();
- return this;
- }
- /**
- *
- * String IDs.
- *
- *
- * repeated uint32 vals = 3 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearVals() {
- vals_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
-
- private Info info_;
- private com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder> infoBuilder_;
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- public boolean hasInfo() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- public Info getInfo() {
- if (infoBuilder_ == null) {
- return info_ == null ? Info.getDefaultInstance() : info_;
- } else {
- return infoBuilder_.getMessage();
- }
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- public Builder setInfo(Info value) {
- if (infoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- info_ = value;
- onChanged();
- } else {
- infoBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- public Builder setInfo(
- Info.Builder builderForValue) {
- if (infoBuilder_ == null) {
- info_ = builderForValue.build();
- onChanged();
- } else {
- infoBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- public Builder mergeInfo(Info value) {
- if (infoBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0) &&
- info_ != null &&
- info_ != Info.getDefaultInstance()) {
- info_ =
- Info.newBuilder(info_).mergeFrom(value).buildPartial();
- } else {
- info_ = value;
- }
- onChanged();
- } else {
- infoBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- public Builder clearInfo() {
- if (infoBuilder_ == null) {
- info_ = null;
- onChanged();
- } else {
- infoBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- return this;
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- public Info.Builder getInfoBuilder() {
- bitField0_ |= 0x00000008;
- onChanged();
- return getInfoFieldBuilder().getBuilder();
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- public InfoOrBuilder getInfoOrBuilder() {
- if (infoBuilder_ != null) {
- return infoBuilder_.getMessageOrBuilder();
- } else {
- return info_ == null ?
- Info.getDefaultInstance() : info_;
- }
- }
- /**
- *
- * May be omitted in omitmeta
- *
- *
- * optional .OSMPBF.Info info = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder>
- getInfoFieldBuilder() {
- if (infoBuilder_ == null) {
- infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder>(
- getInfo(),
- getParentForChildren(),
- isClean());
- info_ = null;
- }
- return infoBuilder_;
- }
-
- private long lat_ ;
- /**
- * required sint64 lat = 8;
- * @return Whether the lat field is set.
- */
- public boolean hasLat() {
- return ((bitField0_ & 0x00000010) != 0);
- }
- /**
- * required sint64 lat = 8;
- * @return The lat.
- */
- public long getLat() {
- return lat_;
- }
- /**
- * required sint64 lat = 8;
- * @param value The lat to set.
- * @return This builder for chaining.
- */
- public Builder setLat(long value) {
- bitField0_ |= 0x00000010;
- lat_ = value;
- onChanged();
- return this;
- }
- /**
- * required sint64 lat = 8;
- * @return This builder for chaining.
- */
- public Builder clearLat() {
- bitField0_ = (bitField0_ & ~0x00000010);
- lat_ = 0L;
- onChanged();
- return this;
- }
-
- private long lon_ ;
- /**
- * required sint64 lon = 9;
- * @return Whether the lon field is set.
- */
- public boolean hasLon() {
- return ((bitField0_ & 0x00000020) != 0);
- }
- /**
- * required sint64 lon = 9;
- * @return The lon.
- */
- public long getLon() {
- return lon_;
- }
- /**
- * required sint64 lon = 9;
- * @param value The lon to set.
- * @return This builder for chaining.
- */
- public Builder setLon(long value) {
- bitField0_ |= 0x00000020;
- lon_ = value;
- onChanged();
- return this;
- }
- /**
- * required sint64 lon = 9;
- * @return This builder for chaining.
- */
- public Builder clearLon() {
- bitField0_ = (bitField0_ & ~0x00000020);
- lon_ = 0L;
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.Node)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.Node)
- private static final Node DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Node();
- }
-
- public static Node getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public Node parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Node(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public Node getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface DenseNodesOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.DenseNodes)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @return A list containing the id.
- */
- java.util.List getIdList();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @return The count of id.
- */
- int getIdCount();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @param index The index of the element to return.
- * @return The id at the given index.
- */
- long getId(int index);
-
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- * @return Whether the denseinfo field is set.
- */
- boolean hasDenseinfo();
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- * @return The denseinfo.
- */
- DenseInfo getDenseinfo();
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- DenseInfoOrBuilder getDenseinfoOrBuilder();
-
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @return A list containing the lat.
- */
- java.util.List getLatList();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @return The count of lat.
- */
- int getLatCount();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The lat at the given index.
- */
- long getLat(int index);
-
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @return A list containing the lon.
- */
- java.util.List getLonList();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @return The count of lon.
- */
- int getLonCount();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @param index The index of the element to return.
- * @return The lon at the given index.
- */
- long getLon(int index);
-
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @return A list containing the keysVals.
- */
- java.util.List getKeysValsList();
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @return The count of keysVals.
- */
- int getKeysValsCount();
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @param index The index of the element to return.
- * @return The keysVals at the given index.
- */
- int getKeysVals(int index);
- }
- /**
- * Protobuf type {@code OSMPBF.DenseNodes}
- */
- public static final class DenseNodes extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.DenseNodes)
- DenseNodesOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use DenseNodes.newBuilder() to construct.
- private DenseNodes(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private DenseNodes() {
- id_ = emptyLongList();
- lat_ = emptyLongList();
- lon_ = emptyLongList();
- keysVals_ = emptyIntList();
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new DenseNodes();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private DenseNodes(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- if (!((mutable_bitField0_ & 0x00000001) != 0)) {
- id_ = newLongList();
- mutable_bitField0_ |= 0x00000001;
- }
- id_.addLong(input.readSInt64());
- break;
- }
- case 10: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000001) != 0) && input.getBytesUntilLimit() > 0) {
- id_ = newLongList();
- mutable_bitField0_ |= 0x00000001;
- }
- while (input.getBytesUntilLimit() > 0) {
- id_.addLong(input.readSInt64());
- }
- input.popLimit(limit);
- break;
- }
- case 42: {
- DenseInfo.Builder subBuilder = null;
- if (((bitField0_ & 0x00000001) != 0)) {
- subBuilder = denseinfo_.toBuilder();
- }
- denseinfo_ = input.readMessage(DenseInfo.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(denseinfo_);
- denseinfo_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000001;
- break;
- }
- case 64: {
- if (!((mutable_bitField0_ & 0x00000004) != 0)) {
- lat_ = newLongList();
- mutable_bitField0_ |= 0x00000004;
- }
- lat_.addLong(input.readSInt64());
- break;
- }
- case 66: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
- lat_ = newLongList();
- mutable_bitField0_ |= 0x00000004;
- }
- while (input.getBytesUntilLimit() > 0) {
- lat_.addLong(input.readSInt64());
- }
- input.popLimit(limit);
- break;
- }
- case 72: {
- if (!((mutable_bitField0_ & 0x00000008) != 0)) {
- lon_ = newLongList();
- mutable_bitField0_ |= 0x00000008;
- }
- lon_.addLong(input.readSInt64());
- break;
- }
- case 74: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000008) != 0) && input.getBytesUntilLimit() > 0) {
- lon_ = newLongList();
- mutable_bitField0_ |= 0x00000008;
- }
- while (input.getBytesUntilLimit() > 0) {
- lon_.addLong(input.readSInt64());
- }
- input.popLimit(limit);
- break;
- }
- case 80: {
- if (!((mutable_bitField0_ & 0x00000010) != 0)) {
- keysVals_ = newIntList();
- mutable_bitField0_ |= 0x00000010;
- }
- keysVals_.addInt(input.readInt32());
- break;
- }
- case 82: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
- keysVals_ = newIntList();
- mutable_bitField0_ |= 0x00000010;
- }
- while (input.getBytesUntilLimit() > 0) {
- keysVals_.addInt(input.readInt32());
- }
- input.popLimit(limit);
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000001) != 0)) {
- id_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000004) != 0)) {
- lat_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000008) != 0)) {
- lon_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000010) != 0)) {
- keysVals_.makeImmutable(); // C
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_DenseNodes_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_DenseNodes_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- DenseNodes.class, DenseNodes.Builder.class);
- }
-
- private int bitField0_;
- public static final int ID_FIELD_NUMBER = 1;
- private com.google.protobuf.Internal.LongList id_;
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @return A list containing the id.
- */
- public java.util.List
- getIdList() {
- return id_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @return The count of id.
- */
- public int getIdCount() {
- return id_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @param index The index of the element to return.
- * @return The id at the given index.
- */
- public long getId(int index) {
- return id_.getLong(index);
- }
- private int idMemoizedSerializedSize = -1;
-
- public static final int DENSEINFO_FIELD_NUMBER = 5;
- private DenseInfo denseinfo_;
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- * @return Whether the denseinfo field is set.
- */
- public boolean hasDenseinfo() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- * @return The denseinfo.
- */
- public DenseInfo getDenseinfo() {
- return denseinfo_ == null ? DenseInfo.getDefaultInstance() : denseinfo_;
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- public DenseInfoOrBuilder getDenseinfoOrBuilder() {
- return denseinfo_ == null ? DenseInfo.getDefaultInstance() : denseinfo_;
- }
-
- public static final int LAT_FIELD_NUMBER = 8;
- private com.google.protobuf.Internal.LongList lat_;
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @return A list containing the lat.
- */
- public java.util.List
- getLatList() {
- return lat_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @return The count of lat.
- */
- public int getLatCount() {
- return lat_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The lat at the given index.
- */
- public long getLat(int index) {
- return lat_.getLong(index);
- }
- private int latMemoizedSerializedSize = -1;
-
- public static final int LON_FIELD_NUMBER = 9;
- private com.google.protobuf.Internal.LongList lon_;
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @return A list containing the lon.
- */
- public java.util.List
- getLonList() {
- return lon_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @return The count of lon.
- */
- public int getLonCount() {
- return lon_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @param index The index of the element to return.
- * @return The lon at the given index.
- */
- public long getLon(int index) {
- return lon_.getLong(index);
- }
- private int lonMemoizedSerializedSize = -1;
-
- public static final int KEYS_VALS_FIELD_NUMBER = 10;
- private com.google.protobuf.Internal.IntList keysVals_;
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @return A list containing the keysVals.
- */
- public java.util.List
- getKeysValsList() {
- return keysVals_;
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @return The count of keysVals.
- */
- public int getKeysValsCount() {
- return keysVals_.size();
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @param index The index of the element to return.
- * @return The keysVals at the given index.
- */
- public int getKeysVals(int index) {
- return keysVals_.getInt(index);
- }
- private int keysValsMemoizedSerializedSize = -1;
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (getIdList().size() > 0) {
- output.writeUInt32NoTag(10);
- output.writeUInt32NoTag(idMemoizedSerializedSize);
- }
- for (int i = 0; i < id_.size(); i++) {
- output.writeSInt64NoTag(id_.getLong(i));
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeMessage(5, getDenseinfo());
- }
- if (getLatList().size() > 0) {
- output.writeUInt32NoTag(66);
- output.writeUInt32NoTag(latMemoizedSerializedSize);
- }
- for (int i = 0; i < lat_.size(); i++) {
- output.writeSInt64NoTag(lat_.getLong(i));
- }
- if (getLonList().size() > 0) {
- output.writeUInt32NoTag(74);
- output.writeUInt32NoTag(lonMemoizedSerializedSize);
- }
- for (int i = 0; i < lon_.size(); i++) {
- output.writeSInt64NoTag(lon_.getLong(i));
- }
- if (getKeysValsList().size() > 0) {
- output.writeUInt32NoTag(82);
- output.writeUInt32NoTag(keysValsMemoizedSerializedSize);
- }
- for (int i = 0; i < keysVals_.size(); i++) {
- output.writeInt32NoTag(keysVals_.getInt(i));
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- {
- int dataSize = 0;
- for (int i = 0; i < id_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt64SizeNoTag(id_.getLong(i));
- }
- size += dataSize;
- if (!getIdList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- idMemoizedSerializedSize = dataSize;
- }
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(5, getDenseinfo());
- }
- {
- int dataSize = 0;
- for (int i = 0; i < lat_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt64SizeNoTag(lat_.getLong(i));
- }
- size += dataSize;
- if (!getLatList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- latMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < lon_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt64SizeNoTag(lon_.getLong(i));
- }
- size += dataSize;
- if (!getLonList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- lonMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < keysVals_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(keysVals_.getInt(i));
- }
- size += dataSize;
- if (!getKeysValsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- keysValsMemoizedSerializedSize = dataSize;
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof DenseNodes)) {
- return super.equals(obj);
- }
- DenseNodes other = (DenseNodes) obj;
-
- if (!getIdList()
- .equals(other.getIdList())) return false;
- if (hasDenseinfo() != other.hasDenseinfo()) return false;
- if (hasDenseinfo()) {
- if (!getDenseinfo()
- .equals(other.getDenseinfo())) return false;
- }
- if (!getLatList()
- .equals(other.getLatList())) return false;
- if (!getLonList()
- .equals(other.getLonList())) return false;
- if (!getKeysValsList()
- .equals(other.getKeysValsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (getIdCount() > 0) {
- hash = (37 * hash) + ID_FIELD_NUMBER;
- hash = (53 * hash) + getIdList().hashCode();
- }
- if (hasDenseinfo()) {
- hash = (37 * hash) + DENSEINFO_FIELD_NUMBER;
- hash = (53 * hash) + getDenseinfo().hashCode();
- }
- if (getLatCount() > 0) {
- hash = (37 * hash) + LAT_FIELD_NUMBER;
- hash = (53 * hash) + getLatList().hashCode();
- }
- if (getLonCount() > 0) {
- hash = (37 * hash) + LON_FIELD_NUMBER;
- hash = (53 * hash) + getLonList().hashCode();
- }
- if (getKeysValsCount() > 0) {
- hash = (37 * hash) + KEYS_VALS_FIELD_NUMBER;
- hash = (53 * hash) + getKeysValsList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static DenseNodes parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static DenseNodes parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static DenseNodes parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static DenseNodes parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static DenseNodes parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static DenseNodes parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static DenseNodes parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static DenseNodes parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static DenseNodes parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static DenseNodes parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static DenseNodes parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static DenseNodes parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(DenseNodes prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code OSMPBF.DenseNodes}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.DenseNodes)
- DenseNodesOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_DenseNodes_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_DenseNodes_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- DenseNodes.class, DenseNodes.Builder.class);
- }
-
- // Construct using DenseNodes.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getDenseinfoFieldBuilder();
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- id_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000001);
- if (denseinfoBuilder_ == null) {
- denseinfo_ = null;
- } else {
- denseinfoBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- lat_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000004);
- lon_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000008);
- keysVals_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000010);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_DenseNodes_descriptor;
- }
-
- @Override
- public DenseNodes getDefaultInstanceForType() {
- return DenseNodes.getDefaultInstance();
- }
-
- @Override
- public DenseNodes build() {
- DenseNodes result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public DenseNodes buildPartial() {
- DenseNodes result = new DenseNodes(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- id_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000001);
- }
- result.id_ = id_;
- if (((from_bitField0_ & 0x00000002) != 0)) {
- if (denseinfoBuilder_ == null) {
- result.denseinfo_ = denseinfo_;
- } else {
- result.denseinfo_ = denseinfoBuilder_.build();
- }
- to_bitField0_ |= 0x00000001;
- }
- if (((bitField0_ & 0x00000004) != 0)) {
- lat_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.lat_ = lat_;
- if (((bitField0_ & 0x00000008) != 0)) {
- lon_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000008);
- }
- result.lon_ = lon_;
- if (((bitField0_ & 0x00000010) != 0)) {
- keysVals_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000010);
- }
- result.keysVals_ = keysVals_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof DenseNodes) {
- return mergeFrom((DenseNodes)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(DenseNodes other) {
- if (other == DenseNodes.getDefaultInstance()) return this;
- if (!other.id_.isEmpty()) {
- if (id_.isEmpty()) {
- id_ = other.id_;
- bitField0_ = (bitField0_ & ~0x00000001);
- } else {
- ensureIdIsMutable();
- id_.addAll(other.id_);
- }
- onChanged();
- }
- if (other.hasDenseinfo()) {
- mergeDenseinfo(other.getDenseinfo());
- }
- if (!other.lat_.isEmpty()) {
- if (lat_.isEmpty()) {
- lat_ = other.lat_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureLatIsMutable();
- lat_.addAll(other.lat_);
- }
- onChanged();
- }
- if (!other.lon_.isEmpty()) {
- if (lon_.isEmpty()) {
- lon_ = other.lon_;
- bitField0_ = (bitField0_ & ~0x00000008);
- } else {
- ensureLonIsMutable();
- lon_.addAll(other.lon_);
- }
- onChanged();
- }
- if (!other.keysVals_.isEmpty()) {
- if (keysVals_.isEmpty()) {
- keysVals_ = other.keysVals_;
- bitField0_ = (bitField0_ & ~0x00000010);
- } else {
- ensureKeysValsIsMutable();
- keysVals_.addAll(other.keysVals_);
- }
- onChanged();
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- DenseNodes parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (DenseNodes) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private com.google.protobuf.Internal.LongList id_ = emptyLongList();
- private void ensureIdIsMutable() {
- if (!((bitField0_ & 0x00000001) != 0)) {
- id_ = mutableCopy(id_);
- bitField0_ |= 0x00000001;
- }
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @return A list containing the id.
- */
- public java.util.List
- getIdList() {
- return ((bitField0_ & 0x00000001) != 0) ?
- java.util.Collections.unmodifiableList(id_) : id_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @return The count of id.
- */
- public int getIdCount() {
- return id_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @param index The index of the element to return.
- * @return The id at the given index.
- */
- public long getId(int index) {
- return id_.getLong(index);
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @param index The index to set the value at.
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(
- int index, long value) {
- ensureIdIsMutable();
- id_.setLong(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @param value The id to add.
- * @return This builder for chaining.
- */
- public Builder addId(long value) {
- ensureIdIsMutable();
- id_.addLong(value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @param values The id to add.
- * @return This builder for chaining.
- */
- public Builder addAllId(
- Iterable extends Long> values) {
- ensureIdIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, id_);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 id = 1 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearId() {
- id_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000001);
- onChanged();
- return this;
- }
-
- private DenseInfo denseinfo_;
- private com.google.protobuf.SingleFieldBuilderV3<
- DenseInfo, DenseInfo.Builder, DenseInfoOrBuilder> denseinfoBuilder_;
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- * @return Whether the denseinfo field is set.
- */
- public boolean hasDenseinfo() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- * @return The denseinfo.
- */
- public DenseInfo getDenseinfo() {
- if (denseinfoBuilder_ == null) {
- return denseinfo_ == null ? DenseInfo.getDefaultInstance() : denseinfo_;
- } else {
- return denseinfoBuilder_.getMessage();
- }
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- public Builder setDenseinfo(DenseInfo value) {
- if (denseinfoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- denseinfo_ = value;
- onChanged();
- } else {
- denseinfoBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- public Builder setDenseinfo(
- DenseInfo.Builder builderForValue) {
- if (denseinfoBuilder_ == null) {
- denseinfo_ = builderForValue.build();
- onChanged();
- } else {
- denseinfoBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- public Builder mergeDenseinfo(DenseInfo value) {
- if (denseinfoBuilder_ == null) {
- if (((bitField0_ & 0x00000002) != 0) &&
- denseinfo_ != null &&
- denseinfo_ != DenseInfo.getDefaultInstance()) {
- denseinfo_ =
- DenseInfo.newBuilder(denseinfo_).mergeFrom(value).buildPartial();
- } else {
- denseinfo_ = value;
- }
- onChanged();
- } else {
- denseinfoBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000002;
- return this;
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- public Builder clearDenseinfo() {
- if (denseinfoBuilder_ == null) {
- denseinfo_ = null;
- onChanged();
- } else {
- denseinfoBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000002);
- return this;
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- public DenseInfo.Builder getDenseinfoBuilder() {
- bitField0_ |= 0x00000002;
- onChanged();
- return getDenseinfoFieldBuilder().getBuilder();
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- public DenseInfoOrBuilder getDenseinfoOrBuilder() {
- if (denseinfoBuilder_ != null) {
- return denseinfoBuilder_.getMessageOrBuilder();
- } else {
- return denseinfo_ == null ?
- DenseInfo.getDefaultInstance() : denseinfo_;
- }
- }
- /**
- *
- *repeated Info info = 4;
- *
- *
- * optional .OSMPBF.DenseInfo denseinfo = 5;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- DenseInfo, DenseInfo.Builder, DenseInfoOrBuilder>
- getDenseinfoFieldBuilder() {
- if (denseinfoBuilder_ == null) {
- denseinfoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- DenseInfo, DenseInfo.Builder, DenseInfoOrBuilder>(
- getDenseinfo(),
- getParentForChildren(),
- isClean());
- denseinfo_ = null;
- }
- return denseinfoBuilder_;
- }
-
- private com.google.protobuf.Internal.LongList lat_ = emptyLongList();
- private void ensureLatIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- lat_ = mutableCopy(lat_);
- bitField0_ |= 0x00000004;
- }
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @return A list containing the lat.
- */
- public java.util.List
- getLatList() {
- return ((bitField0_ & 0x00000004) != 0) ?
- java.util.Collections.unmodifiableList(lat_) : lat_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @return The count of lat.
- */
- public int getLatCount() {
- return lat_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The lat at the given index.
- */
- public long getLat(int index) {
- return lat_.getLong(index);
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @param index The index to set the value at.
- * @param value The lat to set.
- * @return This builder for chaining.
- */
- public Builder setLat(
- int index, long value) {
- ensureLatIsMutable();
- lat_.setLong(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @param value The lat to add.
- * @return This builder for chaining.
- */
- public Builder addLat(long value) {
- ensureLatIsMutable();
- lat_.addLong(value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @param values The lat to add.
- * @return This builder for chaining.
- */
- public Builder addAllLat(
- Iterable extends Long> values) {
- ensureLatIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, lat_);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lat = 8 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearLat() {
- lat_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.LongList lon_ = emptyLongList();
- private void ensureLonIsMutable() {
- if (!((bitField0_ & 0x00000008) != 0)) {
- lon_ = mutableCopy(lon_);
- bitField0_ |= 0x00000008;
- }
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @return A list containing the lon.
- */
- public java.util.List
- getLonList() {
- return ((bitField0_ & 0x00000008) != 0) ?
- java.util.Collections.unmodifiableList(lon_) : lon_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @return The count of lon.
- */
- public int getLonCount() {
- return lon_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @param index The index of the element to return.
- * @return The lon at the given index.
- */
- public long getLon(int index) {
- return lon_.getLong(index);
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @param index The index to set the value at.
- * @param value The lon to set.
- * @return This builder for chaining.
- */
- public Builder setLon(
- int index, long value) {
- ensureLonIsMutable();
- lon_.setLong(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @param value The lon to add.
- * @return This builder for chaining.
- */
- public Builder addLon(long value) {
- ensureLonIsMutable();
- lon_.addLong(value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @param values The lon to add.
- * @return This builder for chaining.
- */
- public Builder addAllLon(
- Iterable extends Long> values) {
- ensureLonIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, lon_);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 lon = 9 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearLon() {
- lon_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000008);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList keysVals_ = emptyIntList();
- private void ensureKeysValsIsMutable() {
- if (!((bitField0_ & 0x00000010) != 0)) {
- keysVals_ = mutableCopy(keysVals_);
- bitField0_ |= 0x00000010;
- }
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @return A list containing the keysVals.
- */
- public java.util.List
- getKeysValsList() {
- return ((bitField0_ & 0x00000010) != 0) ?
- java.util.Collections.unmodifiableList(keysVals_) : keysVals_;
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @return The count of keysVals.
- */
- public int getKeysValsCount() {
- return keysVals_.size();
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @param index The index of the element to return.
- * @return The keysVals at the given index.
- */
- public int getKeysVals(int index) {
- return keysVals_.getInt(index);
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @param index The index to set the value at.
- * @param value The keysVals to set.
- * @return This builder for chaining.
- */
- public Builder setKeysVals(
- int index, int value) {
- ensureKeysValsIsMutable();
- keysVals_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @param value The keysVals to add.
- * @return This builder for chaining.
- */
- public Builder addKeysVals(int value) {
- ensureKeysValsIsMutable();
- keysVals_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @param values The keysVals to add.
- * @return This builder for chaining.
- */
- public Builder addAllKeysVals(
- Iterable extends Integer> values) {
- ensureKeysValsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, keysVals_);
- onChanged();
- return this;
- }
- /**
- *
- * Special packing of keys and vals into one array. May be empty if all nodes in this block are tagless.
- *
- *
- * repeated int32 keys_vals = 10 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearKeysVals() {
- keysVals_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.DenseNodes)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.DenseNodes)
- private static final DenseNodes DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new DenseNodes();
- }
-
- public static DenseNodes getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public DenseNodes parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new DenseNodes(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public DenseNodes getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface WayOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.Way)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- boolean hasId();
- /**
- * required int64 id = 1;
- * @return The id.
- */
- long getId();
-
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- java.util.List getKeysList();
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- int getKeysCount();
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- int getKeys(int index);
-
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- java.util.List getValsList();
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- int getValsCount();
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- int getVals(int index);
-
- /**
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- boolean hasInfo();
- /**
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- Info getInfo();
- /**
- * optional .OSMPBF.Info info = 4;
- */
- InfoOrBuilder getInfoOrBuilder();
-
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @return A list containing the refs.
- */
- java.util.List getRefsList();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @return The count of refs.
- */
- int getRefsCount();
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The refs at the given index.
- */
- long getRefs(int index);
- }
- /**
- * Protobuf type {@code OSMPBF.Way}
- */
- public static final class Way extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.Way)
- WayOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Way.newBuilder() to construct.
- private Way(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Way() {
- keys_ = emptyIntList();
- vals_ = emptyIntList();
- refs_ = emptyLongList();
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new Way();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Way(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- bitField0_ |= 0x00000001;
- id_ = input.readInt64();
- break;
- }
- case 16: {
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- keys_ = newIntList();
- mutable_bitField0_ |= 0x00000002;
- }
- keys_.addInt(input.readUInt32());
- break;
- }
- case 18: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
- keys_ = newIntList();
- mutable_bitField0_ |= 0x00000002;
- }
- while (input.getBytesUntilLimit() > 0) {
- keys_.addInt(input.readUInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 24: {
- if (!((mutable_bitField0_ & 0x00000004) != 0)) {
- vals_ = newIntList();
- mutable_bitField0_ |= 0x00000004;
- }
- vals_.addInt(input.readUInt32());
- break;
- }
- case 26: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
- vals_ = newIntList();
- mutable_bitField0_ |= 0x00000004;
- }
- while (input.getBytesUntilLimit() > 0) {
- vals_.addInt(input.readUInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 34: {
- Info.Builder subBuilder = null;
- if (((bitField0_ & 0x00000002) != 0)) {
- subBuilder = info_.toBuilder();
- }
- info_ = input.readMessage(Info.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(info_);
- info_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000002;
- break;
- }
- case 64: {
- if (!((mutable_bitField0_ & 0x00000010) != 0)) {
- refs_ = newLongList();
- mutable_bitField0_ |= 0x00000010;
- }
- refs_.addLong(input.readSInt64());
- break;
- }
- case 66: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
- refs_ = newLongList();
- mutable_bitField0_ |= 0x00000010;
- }
- while (input.getBytesUntilLimit() > 0) {
- refs_.addLong(input.readSInt64());
- }
- input.popLimit(limit);
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- keys_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000004) != 0)) {
- vals_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000010) != 0)) {
- refs_.makeImmutable(); // C
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_Way_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_Way_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Way.class, Way.Builder.class);
- }
-
- private int bitField0_;
- public static final int ID_FIELD_NUMBER = 1;
- private long id_;
- /**
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required int64 id = 1;
- * @return The id.
- */
- public long getId() {
- return id_;
- }
-
- public static final int KEYS_FIELD_NUMBER = 2;
- private com.google.protobuf.Internal.IntList keys_;
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- public java.util.List
- getKeysList() {
- return keys_;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- public int getKeysCount() {
- return keys_.size();
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- public int getKeys(int index) {
- return keys_.getInt(index);
- }
- private int keysMemoizedSerializedSize = -1;
-
- public static final int VALS_FIELD_NUMBER = 3;
- private com.google.protobuf.Internal.IntList vals_;
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- public java.util.List
- getValsList() {
- return vals_;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- public int getValsCount() {
- return vals_.size();
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- public int getVals(int index) {
- return vals_.getInt(index);
- }
- private int valsMemoizedSerializedSize = -1;
-
- public static final int INFO_FIELD_NUMBER = 4;
- private Info info_;
- /**
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- public boolean hasInfo() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- public Info getInfo() {
- return info_ == null ? Info.getDefaultInstance() : info_;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public InfoOrBuilder getInfoOrBuilder() {
- return info_ == null ? Info.getDefaultInstance() : info_;
- }
-
- public static final int REFS_FIELD_NUMBER = 8;
- private com.google.protobuf.Internal.LongList refs_;
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @return A list containing the refs.
- */
- public java.util.List
- getRefsList() {
- return refs_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @return The count of refs.
- */
- public int getRefsCount() {
- return refs_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The refs at the given index.
- */
- public long getRefs(int index) {
- return refs_.getLong(index);
- }
- private int refsMemoizedSerializedSize = -1;
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!hasId()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeInt64(1, id_);
- }
- if (getKeysList().size() > 0) {
- output.writeUInt32NoTag(18);
- output.writeUInt32NoTag(keysMemoizedSerializedSize);
- }
- for (int i = 0; i < keys_.size(); i++) {
- output.writeUInt32NoTag(keys_.getInt(i));
- }
- if (getValsList().size() > 0) {
- output.writeUInt32NoTag(26);
- output.writeUInt32NoTag(valsMemoizedSerializedSize);
- }
- for (int i = 0; i < vals_.size(); i++) {
- output.writeUInt32NoTag(vals_.getInt(i));
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(4, getInfo());
- }
- if (getRefsList().size() > 0) {
- output.writeUInt32NoTag(66);
- output.writeUInt32NoTag(refsMemoizedSerializedSize);
- }
- for (int i = 0; i < refs_.size(); i++) {
- output.writeSInt64NoTag(refs_.getLong(i));
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, id_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < keys_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeUInt32SizeNoTag(keys_.getInt(i));
- }
- size += dataSize;
- if (!getKeysList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- keysMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < vals_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeUInt32SizeNoTag(vals_.getInt(i));
- }
- size += dataSize;
- if (!getValsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- valsMemoizedSerializedSize = dataSize;
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, getInfo());
- }
- {
- int dataSize = 0;
- for (int i = 0; i < refs_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt64SizeNoTag(refs_.getLong(i));
- }
- size += dataSize;
- if (!getRefsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- refsMemoizedSerializedSize = dataSize;
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Way)) {
- return super.equals(obj);
- }
- Way other = (Way) obj;
-
- if (hasId() != other.hasId()) return false;
- if (hasId()) {
- if (getId()
- != other.getId()) return false;
- }
- if (!getKeysList()
- .equals(other.getKeysList())) return false;
- if (!getValsList()
- .equals(other.getValsList())) return false;
- if (hasInfo() != other.hasInfo()) return false;
- if (hasInfo()) {
- if (!getInfo()
- .equals(other.getInfo())) return false;
- }
- if (!getRefsList()
- .equals(other.getRefsList())) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasId()) {
- hash = (37 * hash) + ID_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getId());
- }
- if (getKeysCount() > 0) {
- hash = (37 * hash) + KEYS_FIELD_NUMBER;
- hash = (53 * hash) + getKeysList().hashCode();
- }
- if (getValsCount() > 0) {
- hash = (37 * hash) + VALS_FIELD_NUMBER;
- hash = (53 * hash) + getValsList().hashCode();
- }
- if (hasInfo()) {
- hash = (37 * hash) + INFO_FIELD_NUMBER;
- hash = (53 * hash) + getInfo().hashCode();
- }
- if (getRefsCount() > 0) {
- hash = (37 * hash) + REFS_FIELD_NUMBER;
- hash = (53 * hash) + getRefsList().hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Way parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Way parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Way parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Way parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Way parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Way parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Way parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Way parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Way parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Way parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Way parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Way parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Way prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code OSMPBF.Way}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.Way)
- WayOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_Way_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_Way_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Way.class, Way.Builder.class);
- }
-
- // Construct using Way.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getInfoFieldBuilder();
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- id_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- keys_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000002);
- vals_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000004);
- if (infoBuilder_ == null) {
- info_ = null;
- } else {
- infoBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- refs_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000010);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_Way_descriptor;
- }
-
- @Override
- public Way getDefaultInstanceForType() {
- return Way.getDefaultInstance();
- }
-
- @Override
- public Way build() {
- Way result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public Way buildPartial() {
- Way result = new Way(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.id_ = id_;
- to_bitField0_ |= 0x00000001;
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- keys_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.keys_ = keys_;
- if (((bitField0_ & 0x00000004) != 0)) {
- vals_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.vals_ = vals_;
- if (((from_bitField0_ & 0x00000008) != 0)) {
- if (infoBuilder_ == null) {
- result.info_ = info_;
- } else {
- result.info_ = infoBuilder_.build();
- }
- to_bitField0_ |= 0x00000002;
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- refs_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000010);
- }
- result.refs_ = refs_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof Way) {
- return mergeFrom((Way)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(Way other) {
- if (other == Way.getDefaultInstance()) return this;
- if (other.hasId()) {
- setId(other.getId());
- }
- if (!other.keys_.isEmpty()) {
- if (keys_.isEmpty()) {
- keys_ = other.keys_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureKeysIsMutable();
- keys_.addAll(other.keys_);
- }
- onChanged();
- }
- if (!other.vals_.isEmpty()) {
- if (vals_.isEmpty()) {
- vals_ = other.vals_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureValsIsMutable();
- vals_.addAll(other.vals_);
- }
- onChanged();
- }
- if (other.hasInfo()) {
- mergeInfo(other.getInfo());
- }
- if (!other.refs_.isEmpty()) {
- if (refs_.isEmpty()) {
- refs_ = other.refs_;
- bitField0_ = (bitField0_ & ~0x00000010);
- } else {
- ensureRefsIsMutable();
- refs_.addAll(other.refs_);
- }
- onChanged();
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- if (!hasId()) {
- return false;
- }
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Way parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (Way) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private long id_ ;
- /**
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required int64 id = 1;
- * @return The id.
- */
- public long getId() {
- return id_;
- }
- /**
- * required int64 id = 1;
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(long value) {
- bitField0_ |= 0x00000001;
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * required int64 id = 1;
- * @return This builder for chaining.
- */
- public Builder clearId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- id_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList keys_ = emptyIntList();
- private void ensureKeysIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- keys_ = mutableCopy(keys_);
- bitField0_ |= 0x00000002;
- }
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- public java.util.List
- getKeysList() {
- return ((bitField0_ & 0x00000002) != 0) ?
- java.util.Collections.unmodifiableList(keys_) : keys_;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- public int getKeysCount() {
- return keys_.size();
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- public int getKeys(int index) {
- return keys_.getInt(index);
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index to set the value at.
- * @param value The keys to set.
- * @return This builder for chaining.
- */
- public Builder setKeys(
- int index, int value) {
- ensureKeysIsMutable();
- keys_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param value The keys to add.
- * @return This builder for chaining.
- */
- public Builder addKeys(int value) {
- ensureKeysIsMutable();
- keys_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param values The keys to add.
- * @return This builder for chaining.
- */
- public Builder addAllKeys(
- Iterable extends Integer> values) {
- ensureKeysIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, keys_);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearKeys() {
- keys_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList vals_ = emptyIntList();
- private void ensureValsIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- vals_ = mutableCopy(vals_);
- bitField0_ |= 0x00000004;
- }
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- public java.util.List
- getValsList() {
- return ((bitField0_ & 0x00000004) != 0) ?
- java.util.Collections.unmodifiableList(vals_) : vals_;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- public int getValsCount() {
- return vals_.size();
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- public int getVals(int index) {
- return vals_.getInt(index);
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index to set the value at.
- * @param value The vals to set.
- * @return This builder for chaining.
- */
- public Builder setVals(
- int index, int value) {
- ensureValsIsMutable();
- vals_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param value The vals to add.
- * @return This builder for chaining.
- */
- public Builder addVals(int value) {
- ensureValsIsMutable();
- vals_.addInt(value);
- onChanged();
- return this;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param values The vals to add.
- * @return This builder for chaining.
- */
- public Builder addAllVals(
- Iterable extends Integer> values) {
- ensureValsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, vals_);
- onChanged();
- return this;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearVals() {
- vals_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
-
- private Info info_;
- private com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder> infoBuilder_;
- /**
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- public boolean hasInfo() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- public Info getInfo() {
- if (infoBuilder_ == null) {
- return info_ == null ? Info.getDefaultInstance() : info_;
- } else {
- return infoBuilder_.getMessage();
- }
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Builder setInfo(Info value) {
- if (infoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- info_ = value;
- onChanged();
- } else {
- infoBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Builder setInfo(
- Info.Builder builderForValue) {
- if (infoBuilder_ == null) {
- info_ = builderForValue.build();
- onChanged();
- } else {
- infoBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Builder mergeInfo(Info value) {
- if (infoBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0) &&
- info_ != null &&
- info_ != Info.getDefaultInstance()) {
- info_ =
- Info.newBuilder(info_).mergeFrom(value).buildPartial();
- } else {
- info_ = value;
- }
- onChanged();
- } else {
- infoBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Builder clearInfo() {
- if (infoBuilder_ == null) {
- info_ = null;
- onChanged();
- } else {
- infoBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- return this;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Info.Builder getInfoBuilder() {
- bitField0_ |= 0x00000008;
- onChanged();
- return getInfoFieldBuilder().getBuilder();
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public InfoOrBuilder getInfoOrBuilder() {
- if (infoBuilder_ != null) {
- return infoBuilder_.getMessageOrBuilder();
- } else {
- return info_ == null ?
- Info.getDefaultInstance() : info_;
- }
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder>
- getInfoFieldBuilder() {
- if (infoBuilder_ == null) {
- infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder>(
- getInfo(),
- getParentForChildren(),
- isClean());
- info_ = null;
- }
- return infoBuilder_;
- }
-
- private com.google.protobuf.Internal.LongList refs_ = emptyLongList();
- private void ensureRefsIsMutable() {
- if (!((bitField0_ & 0x00000010) != 0)) {
- refs_ = mutableCopy(refs_);
- bitField0_ |= 0x00000010;
- }
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @return A list containing the refs.
- */
- public java.util.List
- getRefsList() {
- return ((bitField0_ & 0x00000010) != 0) ?
- java.util.Collections.unmodifiableList(refs_) : refs_;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @return The count of refs.
- */
- public int getRefsCount() {
- return refs_.size();
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The refs at the given index.
- */
- public long getRefs(int index) {
- return refs_.getLong(index);
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @param index The index to set the value at.
- * @param value The refs to set.
- * @return This builder for chaining.
- */
- public Builder setRefs(
- int index, long value) {
- ensureRefsIsMutable();
- refs_.setLong(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @param value The refs to add.
- * @return This builder for chaining.
- */
- public Builder addRefs(long value) {
- ensureRefsIsMutable();
- refs_.addLong(value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @param values The refs to add.
- * @return This builder for chaining.
- */
- public Builder addAllRefs(
- Iterable extends Long> values) {
- ensureRefsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, refs_);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA coded
- *
- *
- * repeated sint64 refs = 8 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearRefs() {
- refs_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.Way)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.Way)
- private static final Way DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Way();
- }
-
- public static Way getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser() {
- @Override
- public Way parsePartialFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return new Way(input, extensionRegistry);
- }
- };
-
- public static com.google.protobuf.Parser parser() {
- return PARSER;
- }
-
- @Override
- public com.google.protobuf.Parser getParserForType() {
- return PARSER;
- }
-
- @Override
- public Way getDefaultInstanceForType() {
- return DEFAULT_INSTANCE;
- }
-
- }
-
- public interface RelationOrBuilder extends
- // @@protoc_insertion_point(interface_extends:OSMPBF.Relation)
- com.google.protobuf.MessageOrBuilder {
-
- /**
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- boolean hasId();
- /**
- * required int64 id = 1;
- * @return The id.
- */
- long getId();
-
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- java.util.List getKeysList();
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- int getKeysCount();
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- int getKeys(int index);
-
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- java.util.List getValsList();
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- int getValsCount();
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- int getVals(int index);
-
- /**
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- boolean hasInfo();
- /**
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- Info getInfo();
- /**
- * optional .OSMPBF.Info info = 4;
- */
- InfoOrBuilder getInfoOrBuilder();
-
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @return A list containing the rolesSid.
- */
- java.util.List getRolesSidList();
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @return The count of rolesSid.
- */
- int getRolesSidCount();
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The rolesSid at the given index.
- */
- int getRolesSid(int index);
-
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @return A list containing the memids.
- */
- java.util.List getMemidsList();
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @return The count of memids.
- */
- int getMemidsCount();
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @param index The index of the element to return.
- * @return The memids at the given index.
- */
- long getMemids(int index);
-
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @return A list containing the types.
- */
- java.util.List getTypesList();
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @return The count of types.
- */
- int getTypesCount();
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @param index The index of the element to return.
- * @return The types at the given index.
- */
- Relation.MemberType getTypes(int index);
- }
- /**
- * Protobuf type {@code OSMPBF.Relation}
- */
- public static final class Relation extends
- com.google.protobuf.GeneratedMessageV3 implements
- // @@protoc_insertion_point(message_implements:OSMPBF.Relation)
- RelationOrBuilder {
- private static final long serialVersionUID = 0L;
- // Use Relation.newBuilder() to construct.
- private Relation(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
- super(builder);
- }
- private Relation() {
- keys_ = emptyIntList();
- vals_ = emptyIntList();
- rolesSid_ = emptyIntList();
- memids_ = emptyLongList();
- types_ = java.util.Collections.emptyList();
- }
-
- @Override
- @SuppressWarnings({"unused"})
- protected Object newInstance(
- UnusedPrivateParameter unused) {
- return new Relation();
- }
-
- @Override
- public final com.google.protobuf.UnknownFieldSet
- getUnknownFields() {
- return this.unknownFields;
- }
- private Relation(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- this();
- if (extensionRegistry == null) {
- throw new NullPointerException();
- }
- int mutable_bitField0_ = 0;
- com.google.protobuf.UnknownFieldSet.Builder unknownFields =
- com.google.protobuf.UnknownFieldSet.newBuilder();
- try {
- boolean done = false;
- while (!done) {
- int tag = input.readTag();
- switch (tag) {
- case 0:
- done = true;
- break;
- case 8: {
- bitField0_ |= 0x00000001;
- id_ = input.readInt64();
- break;
- }
- case 16: {
- if (!((mutable_bitField0_ & 0x00000002) != 0)) {
- keys_ = newIntList();
- mutable_bitField0_ |= 0x00000002;
- }
- keys_.addInt(input.readUInt32());
- break;
- }
- case 18: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000002) != 0) && input.getBytesUntilLimit() > 0) {
- keys_ = newIntList();
- mutable_bitField0_ |= 0x00000002;
- }
- while (input.getBytesUntilLimit() > 0) {
- keys_.addInt(input.readUInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 24: {
- if (!((mutable_bitField0_ & 0x00000004) != 0)) {
- vals_ = newIntList();
- mutable_bitField0_ |= 0x00000004;
- }
- vals_.addInt(input.readUInt32());
- break;
- }
- case 26: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000004) != 0) && input.getBytesUntilLimit() > 0) {
- vals_ = newIntList();
- mutable_bitField0_ |= 0x00000004;
- }
- while (input.getBytesUntilLimit() > 0) {
- vals_.addInt(input.readUInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 34: {
- Info.Builder subBuilder = null;
- if (((bitField0_ & 0x00000002) != 0)) {
- subBuilder = info_.toBuilder();
- }
- info_ = input.readMessage(Info.PARSER, extensionRegistry);
- if (subBuilder != null) {
- subBuilder.mergeFrom(info_);
- info_ = subBuilder.buildPartial();
- }
- bitField0_ |= 0x00000002;
- break;
- }
- case 64: {
- if (!((mutable_bitField0_ & 0x00000010) != 0)) {
- rolesSid_ = newIntList();
- mutable_bitField0_ |= 0x00000010;
- }
- rolesSid_.addInt(input.readInt32());
- break;
- }
- case 66: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000010) != 0) && input.getBytesUntilLimit() > 0) {
- rolesSid_ = newIntList();
- mutable_bitField0_ |= 0x00000010;
- }
- while (input.getBytesUntilLimit() > 0) {
- rolesSid_.addInt(input.readInt32());
- }
- input.popLimit(limit);
- break;
- }
- case 72: {
- if (!((mutable_bitField0_ & 0x00000020) != 0)) {
- memids_ = newLongList();
- mutable_bitField0_ |= 0x00000020;
- }
- memids_.addLong(input.readSInt64());
- break;
- }
- case 74: {
- int length = input.readRawVarint32();
- int limit = input.pushLimit(length);
- if (!((mutable_bitField0_ & 0x00000020) != 0) && input.getBytesUntilLimit() > 0) {
- memids_ = newLongList();
- mutable_bitField0_ |= 0x00000020;
- }
- while (input.getBytesUntilLimit() > 0) {
- memids_.addLong(input.readSInt64());
- }
- input.popLimit(limit);
- break;
- }
- case 80: {
- int rawValue = input.readEnum();
- @SuppressWarnings("deprecation")
- Relation.MemberType value = Relation.MemberType.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(10, rawValue);
- } else {
- if (!((mutable_bitField0_ & 0x00000040) != 0)) {
- types_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000040;
- }
- types_.add(rawValue);
- }
- break;
- }
- case 82: {
- int length = input.readRawVarint32();
- int oldLimit = input.pushLimit(length);
- while(input.getBytesUntilLimit() > 0) {
- int rawValue = input.readEnum();
- @SuppressWarnings("deprecation")
- Relation.MemberType value = Relation.MemberType.valueOf(rawValue);
- if (value == null) {
- unknownFields.mergeVarintField(10, rawValue);
- } else {
- if (!((mutable_bitField0_ & 0x00000040) != 0)) {
- types_ = new java.util.ArrayList();
- mutable_bitField0_ |= 0x00000040;
- }
- types_.add(rawValue);
- }
- }
- input.popLimit(oldLimit);
- break;
- }
- default: {
- if (!parseUnknownField(
- input, unknownFields, extensionRegistry, tag)) {
- done = true;
- }
- break;
- }
- }
- }
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- throw e.setUnfinishedMessage(this);
- } catch (java.io.IOException e) {
- throw new com.google.protobuf.InvalidProtocolBufferException(
- e).setUnfinishedMessage(this);
- } finally {
- if (((mutable_bitField0_ & 0x00000002) != 0)) {
- keys_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000004) != 0)) {
- vals_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000010) != 0)) {
- rolesSid_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000020) != 0)) {
- memids_.makeImmutable(); // C
- }
- if (((mutable_bitField0_ & 0x00000040) != 0)) {
- types_ = java.util.Collections.unmodifiableList(types_);
- }
- this.unknownFields = unknownFields.build();
- makeExtensionsImmutable();
- }
- }
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_Relation_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_Relation_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Relation.class, Relation.Builder.class);
- }
-
- /**
- * Protobuf enum {@code OSMPBF.Relation.MemberType}
- */
- public enum MemberType
- implements com.google.protobuf.ProtocolMessageEnum {
- /**
- * NODE = 0;
- */
- NODE(0),
- /**
- * WAY = 1;
- */
- WAY(1),
- /**
- * RELATION = 2;
- */
- RELATION(2),
- ;
-
- /**
- * NODE = 0;
- */
- public static final int NODE_VALUE = 0;
- /**
- * WAY = 1;
- */
- public static final int WAY_VALUE = 1;
- /**
- * RELATION = 2;
- */
- public static final int RELATION_VALUE = 2;
-
-
- public final int getNumber() {
- return value;
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- * @deprecated Use {@link #forNumber(int)} instead.
- */
- @Deprecated
- public static MemberType valueOf(int value) {
- return forNumber(value);
- }
-
- /**
- * @param value The numeric wire value of the corresponding enum entry.
- * @return The enum associated with the given numeric wire value.
- */
- public static MemberType forNumber(int value) {
- switch (value) {
- case 0: return NODE;
- case 1: return WAY;
- case 2: return RELATION;
- default: return null;
- }
- }
-
- public static com.google.protobuf.Internal.EnumLiteMap
- internalGetValueMap() {
- return internalValueMap;
- }
- private static final com.google.protobuf.Internal.EnumLiteMap<
- MemberType> internalValueMap =
- new com.google.protobuf.Internal.EnumLiteMap() {
- public MemberType findValueByNumber(int number) {
- return MemberType.forNumber(number);
- }
- };
-
- public final com.google.protobuf.Descriptors.EnumValueDescriptor
- getValueDescriptor() {
- return getDescriptor().getValues().get(ordinal());
- }
- public final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptorForType() {
- return getDescriptor();
- }
- public static final com.google.protobuf.Descriptors.EnumDescriptor
- getDescriptor() {
- return Relation.getDescriptor().getEnumTypes().get(0);
- }
-
- private static final MemberType[] VALUES = values();
-
- public static MemberType valueOf(
- com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
- if (desc.getType() != getDescriptor()) {
- throw new IllegalArgumentException(
- "EnumValueDescriptor is not for this type.");
- }
- return VALUES[desc.getIndex()];
- }
-
- private final int value;
-
- private MemberType(int value) {
- this.value = value;
- }
-
- // @@protoc_insertion_point(enum_scope:OSMPBF.Relation.MemberType)
- }
-
- private int bitField0_;
- public static final int ID_FIELD_NUMBER = 1;
- private long id_;
- /**
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required int64 id = 1;
- * @return The id.
- */
- public long getId() {
- return id_;
- }
-
- public static final int KEYS_FIELD_NUMBER = 2;
- private com.google.protobuf.Internal.IntList keys_;
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- public java.util.List
- getKeysList() {
- return keys_;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- public int getKeysCount() {
- return keys_.size();
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- public int getKeys(int index) {
- return keys_.getInt(index);
- }
- private int keysMemoizedSerializedSize = -1;
-
- public static final int VALS_FIELD_NUMBER = 3;
- private com.google.protobuf.Internal.IntList vals_;
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- public java.util.List
- getValsList() {
- return vals_;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- public int getValsCount() {
- return vals_.size();
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- public int getVals(int index) {
- return vals_.getInt(index);
- }
- private int valsMemoizedSerializedSize = -1;
-
- public static final int INFO_FIELD_NUMBER = 4;
- private Info info_;
- /**
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- public boolean hasInfo() {
- return ((bitField0_ & 0x00000002) != 0);
- }
- /**
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- public Info getInfo() {
- return info_ == null ? Info.getDefaultInstance() : info_;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public InfoOrBuilder getInfoOrBuilder() {
- return info_ == null ? Info.getDefaultInstance() : info_;
- }
-
- public static final int ROLES_SID_FIELD_NUMBER = 8;
- private com.google.protobuf.Internal.IntList rolesSid_;
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @return A list containing the rolesSid.
- */
- public java.util.List
- getRolesSidList() {
- return rolesSid_;
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @return The count of rolesSid.
- */
- public int getRolesSidCount() {
- return rolesSid_.size();
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The rolesSid at the given index.
- */
- public int getRolesSid(int index) {
- return rolesSid_.getInt(index);
- }
- private int rolesSidMemoizedSerializedSize = -1;
-
- public static final int MEMIDS_FIELD_NUMBER = 9;
- private com.google.protobuf.Internal.LongList memids_;
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @return A list containing the memids.
- */
- public java.util.List
- getMemidsList() {
- return memids_;
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @return The count of memids.
- */
- public int getMemidsCount() {
- return memids_.size();
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @param index The index of the element to return.
- * @return The memids at the given index.
- */
- public long getMemids(int index) {
- return memids_.getLong(index);
- }
- private int memidsMemoizedSerializedSize = -1;
-
- public static final int TYPES_FIELD_NUMBER = 10;
- private java.util.List types_;
- private static final com.google.protobuf.Internal.ListAdapter.Converter<
- Integer, Relation.MemberType> types_converter_ =
- new com.google.protobuf.Internal.ListAdapter.Converter<
- Integer, Relation.MemberType>() {
- public Relation.MemberType convert(Integer from) {
- @SuppressWarnings("deprecation")
- Relation.MemberType result = Relation.MemberType.valueOf(from);
- return result == null ? Relation.MemberType.NODE : result;
- }
- };
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @return A list containing the types.
- */
- public java.util.List getTypesList() {
- return new com.google.protobuf.Internal.ListAdapter<
- Integer, Relation.MemberType>(types_, types_converter_);
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @param value The types to add.
- */
- public int getTypesCount() {
- return types_.size();
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @param index The index of the element to return.
- * @return The types at the given index.
- */
- public Relation.MemberType getTypes(int index) {
- return types_converter_.convert(types_.get(index));
- }
- private int typesMemoizedSerializedSize;
-
- private byte memoizedIsInitialized = -1;
- @Override
- public final boolean isInitialized() {
- byte isInitialized = memoizedIsInitialized;
- if (isInitialized == 1) return true;
- if (isInitialized == 0) return false;
-
- if (!hasId()) {
- memoizedIsInitialized = 0;
- return false;
- }
- memoizedIsInitialized = 1;
- return true;
- }
-
- @Override
- public void writeTo(com.google.protobuf.CodedOutputStream output)
- throws java.io.IOException {
- getSerializedSize();
- if (((bitField0_ & 0x00000001) != 0)) {
- output.writeInt64(1, id_);
- }
- if (getKeysList().size() > 0) {
- output.writeUInt32NoTag(18);
- output.writeUInt32NoTag(keysMemoizedSerializedSize);
- }
- for (int i = 0; i < keys_.size(); i++) {
- output.writeUInt32NoTag(keys_.getInt(i));
- }
- if (getValsList().size() > 0) {
- output.writeUInt32NoTag(26);
- output.writeUInt32NoTag(valsMemoizedSerializedSize);
- }
- for (int i = 0; i < vals_.size(); i++) {
- output.writeUInt32NoTag(vals_.getInt(i));
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- output.writeMessage(4, getInfo());
- }
- if (getRolesSidList().size() > 0) {
- output.writeUInt32NoTag(66);
- output.writeUInt32NoTag(rolesSidMemoizedSerializedSize);
- }
- for (int i = 0; i < rolesSid_.size(); i++) {
- output.writeInt32NoTag(rolesSid_.getInt(i));
- }
- if (getMemidsList().size() > 0) {
- output.writeUInt32NoTag(74);
- output.writeUInt32NoTag(memidsMemoizedSerializedSize);
- }
- for (int i = 0; i < memids_.size(); i++) {
- output.writeSInt64NoTag(memids_.getLong(i));
- }
- if (getTypesList().size() > 0) {
- output.writeUInt32NoTag(82);
- output.writeUInt32NoTag(typesMemoizedSerializedSize);
- }
- for (int i = 0; i < types_.size(); i++) {
- output.writeEnumNoTag(types_.get(i));
- }
- unknownFields.writeTo(output);
- }
-
- @Override
- public int getSerializedSize() {
- int size = memoizedSize;
- if (size != -1) return size;
-
- size = 0;
- if (((bitField0_ & 0x00000001) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeInt64Size(1, id_);
- }
- {
- int dataSize = 0;
- for (int i = 0; i < keys_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeUInt32SizeNoTag(keys_.getInt(i));
- }
- size += dataSize;
- if (!getKeysList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- keysMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < vals_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeUInt32SizeNoTag(vals_.getInt(i));
- }
- size += dataSize;
- if (!getValsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- valsMemoizedSerializedSize = dataSize;
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- size += com.google.protobuf.CodedOutputStream
- .computeMessageSize(4, getInfo());
- }
- {
- int dataSize = 0;
- for (int i = 0; i < rolesSid_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(rolesSid_.getInt(i));
- }
- size += dataSize;
- if (!getRolesSidList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- rolesSidMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < memids_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeSInt64SizeNoTag(memids_.getLong(i));
- }
- size += dataSize;
- if (!getMemidsList().isEmpty()) {
- size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeInt32SizeNoTag(dataSize);
- }
- memidsMemoizedSerializedSize = dataSize;
- }
- {
- int dataSize = 0;
- for (int i = 0; i < types_.size(); i++) {
- dataSize += com.google.protobuf.CodedOutputStream
- .computeEnumSizeNoTag(types_.get(i));
- }
- size += dataSize;
- if (!getTypesList().isEmpty()) { size += 1;
- size += com.google.protobuf.CodedOutputStream
- .computeUInt32SizeNoTag(dataSize);
- }typesMemoizedSerializedSize = dataSize;
- }
- size += unknownFields.getSerializedSize();
- memoizedSize = size;
- return size;
- }
-
- @Override
- public boolean equals(final Object obj) {
- if (obj == this) {
- return true;
- }
- if (!(obj instanceof Relation)) {
- return super.equals(obj);
- }
- Relation other = (Relation) obj;
-
- if (hasId() != other.hasId()) return false;
- if (hasId()) {
- if (getId()
- != other.getId()) return false;
- }
- if (!getKeysList()
- .equals(other.getKeysList())) return false;
- if (!getValsList()
- .equals(other.getValsList())) return false;
- if (hasInfo() != other.hasInfo()) return false;
- if (hasInfo()) {
- if (!getInfo()
- .equals(other.getInfo())) return false;
- }
- if (!getRolesSidList()
- .equals(other.getRolesSidList())) return false;
- if (!getMemidsList()
- .equals(other.getMemidsList())) return false;
- if (!types_.equals(other.types_)) return false;
- if (!unknownFields.equals(other.unknownFields)) return false;
- return true;
- }
-
- @Override
- public int hashCode() {
- if (memoizedHashCode != 0) {
- return memoizedHashCode;
- }
- int hash = 41;
- hash = (19 * hash) + getDescriptor().hashCode();
- if (hasId()) {
- hash = (37 * hash) + ID_FIELD_NUMBER;
- hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
- getId());
- }
- if (getKeysCount() > 0) {
- hash = (37 * hash) + KEYS_FIELD_NUMBER;
- hash = (53 * hash) + getKeysList().hashCode();
- }
- if (getValsCount() > 0) {
- hash = (37 * hash) + VALS_FIELD_NUMBER;
- hash = (53 * hash) + getValsList().hashCode();
- }
- if (hasInfo()) {
- hash = (37 * hash) + INFO_FIELD_NUMBER;
- hash = (53 * hash) + getInfo().hashCode();
- }
- if (getRolesSidCount() > 0) {
- hash = (37 * hash) + ROLES_SID_FIELD_NUMBER;
- hash = (53 * hash) + getRolesSidList().hashCode();
- }
- if (getMemidsCount() > 0) {
- hash = (37 * hash) + MEMIDS_FIELD_NUMBER;
- hash = (53 * hash) + getMemidsList().hashCode();
- }
- if (getTypesCount() > 0) {
- hash = (37 * hash) + TYPES_FIELD_NUMBER;
- hash = (53 * hash) + types_.hashCode();
- }
- hash = (29 * hash) + unknownFields.hashCode();
- memoizedHashCode = hash;
- return hash;
- }
-
- public static Relation parseFrom(
- java.nio.ByteBuffer data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Relation parseFrom(
- java.nio.ByteBuffer data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Relation parseFrom(
- com.google.protobuf.ByteString data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Relation parseFrom(
- com.google.protobuf.ByteString data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Relation parseFrom(byte[] data)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data);
- }
- public static Relation parseFrom(
- byte[] data,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws com.google.protobuf.InvalidProtocolBufferException {
- return PARSER.parseFrom(data, extensionRegistry);
- }
- public static Relation parseFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Relation parseFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
- public static Relation parseDelimitedFrom(java.io.InputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input);
- }
- public static Relation parseDelimitedFrom(
- java.io.InputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseDelimitedWithIOException(PARSER, input, extensionRegistry);
- }
- public static Relation parseFrom(
- com.google.protobuf.CodedInputStream input)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input);
- }
- public static Relation parseFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- return com.google.protobuf.GeneratedMessageV3
- .parseWithIOException(PARSER, input, extensionRegistry);
- }
-
- @Override
- public Builder newBuilderForType() { return newBuilder(); }
- public static Builder newBuilder() {
- return DEFAULT_INSTANCE.toBuilder();
- }
- public static Builder newBuilder(Relation prototype) {
- return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
- }
- @Override
- public Builder toBuilder() {
- return this == DEFAULT_INSTANCE
- ? new Builder() : new Builder().mergeFrom(this);
- }
-
- @Override
- protected Builder newBuilderForType(
- BuilderParent parent) {
- Builder builder = new Builder(parent);
- return builder;
- }
- /**
- * Protobuf type {@code OSMPBF.Relation}
- */
- public static final class Builder extends
- com.google.protobuf.GeneratedMessageV3.Builder implements
- // @@protoc_insertion_point(builder_implements:OSMPBF.Relation)
- RelationOrBuilder {
- public static final com.google.protobuf.Descriptors.Descriptor
- getDescriptor() {
- return internal_static_OSMPBF_Relation_descriptor;
- }
-
- @Override
- protected FieldAccessorTable
- internalGetFieldAccessorTable() {
- return internal_static_OSMPBF_Relation_fieldAccessorTable
- .ensureFieldAccessorsInitialized(
- Relation.class, Relation.Builder.class);
- }
-
- // Construct using Relation.newBuilder()
- private Builder() {
- maybeForceBuilderInitialization();
- }
-
- private Builder(
- BuilderParent parent) {
- super(parent);
- maybeForceBuilderInitialization();
- }
- private void maybeForceBuilderInitialization() {
- if (com.google.protobuf.GeneratedMessageV3
- .alwaysUseFieldBuilders) {
- getInfoFieldBuilder();
- }
- }
- @Override
- public Builder clear() {
- super.clear();
- id_ = 0L;
- bitField0_ = (bitField0_ & ~0x00000001);
- keys_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000002);
- vals_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000004);
- if (infoBuilder_ == null) {
- info_ = null;
- } else {
- infoBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- rolesSid_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000010);
- memids_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000020);
- types_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000040);
- return this;
- }
-
- @Override
- public com.google.protobuf.Descriptors.Descriptor
- getDescriptorForType() {
- return internal_static_OSMPBF_Relation_descriptor;
- }
-
- @Override
- public Relation getDefaultInstanceForType() {
- return Relation.getDefaultInstance();
- }
-
- @Override
- public Relation build() {
- Relation result = buildPartial();
- if (!result.isInitialized()) {
- throw newUninitializedMessageException(result);
- }
- return result;
- }
-
- @Override
- public Relation buildPartial() {
- Relation result = new Relation(this);
- int from_bitField0_ = bitField0_;
- int to_bitField0_ = 0;
- if (((from_bitField0_ & 0x00000001) != 0)) {
- result.id_ = id_;
- to_bitField0_ |= 0x00000001;
- }
- if (((bitField0_ & 0x00000002) != 0)) {
- keys_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000002);
- }
- result.keys_ = keys_;
- if (((bitField0_ & 0x00000004) != 0)) {
- vals_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000004);
- }
- result.vals_ = vals_;
- if (((from_bitField0_ & 0x00000008) != 0)) {
- if (infoBuilder_ == null) {
- result.info_ = info_;
- } else {
- result.info_ = infoBuilder_.build();
- }
- to_bitField0_ |= 0x00000002;
- }
- if (((bitField0_ & 0x00000010) != 0)) {
- rolesSid_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000010);
- }
- result.rolesSid_ = rolesSid_;
- if (((bitField0_ & 0x00000020) != 0)) {
- memids_.makeImmutable();
- bitField0_ = (bitField0_ & ~0x00000020);
- }
- result.memids_ = memids_;
- if (((bitField0_ & 0x00000040) != 0)) {
- types_ = java.util.Collections.unmodifiableList(types_);
- bitField0_ = (bitField0_ & ~0x00000040);
- }
- result.types_ = types_;
- result.bitField0_ = to_bitField0_;
- onBuilt();
- return result;
- }
-
- @Override
- public Builder clone() {
- return super.clone();
- }
- @Override
- public Builder setField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.setField(field, value);
- }
- @Override
- public Builder clearField(
- com.google.protobuf.Descriptors.FieldDescriptor field) {
- return super.clearField(field);
- }
- @Override
- public Builder clearOneof(
- com.google.protobuf.Descriptors.OneofDescriptor oneof) {
- return super.clearOneof(oneof);
- }
- @Override
- public Builder setRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- int index, Object value) {
- return super.setRepeatedField(field, index, value);
- }
- @Override
- public Builder addRepeatedField(
- com.google.protobuf.Descriptors.FieldDescriptor field,
- Object value) {
- return super.addRepeatedField(field, value);
- }
- @Override
- public Builder mergeFrom(com.google.protobuf.Message other) {
- if (other instanceof Relation) {
- return mergeFrom((Relation)other);
- } else {
- super.mergeFrom(other);
- return this;
- }
- }
-
- public Builder mergeFrom(Relation other) {
- if (other == Relation.getDefaultInstance()) return this;
- if (other.hasId()) {
- setId(other.getId());
- }
- if (!other.keys_.isEmpty()) {
- if (keys_.isEmpty()) {
- keys_ = other.keys_;
- bitField0_ = (bitField0_ & ~0x00000002);
- } else {
- ensureKeysIsMutable();
- keys_.addAll(other.keys_);
- }
- onChanged();
- }
- if (!other.vals_.isEmpty()) {
- if (vals_.isEmpty()) {
- vals_ = other.vals_;
- bitField0_ = (bitField0_ & ~0x00000004);
- } else {
- ensureValsIsMutable();
- vals_.addAll(other.vals_);
- }
- onChanged();
- }
- if (other.hasInfo()) {
- mergeInfo(other.getInfo());
- }
- if (!other.rolesSid_.isEmpty()) {
- if (rolesSid_.isEmpty()) {
- rolesSid_ = other.rolesSid_;
- bitField0_ = (bitField0_ & ~0x00000010);
- } else {
- ensureRolesSidIsMutable();
- rolesSid_.addAll(other.rolesSid_);
- }
- onChanged();
- }
- if (!other.memids_.isEmpty()) {
- if (memids_.isEmpty()) {
- memids_ = other.memids_;
- bitField0_ = (bitField0_ & ~0x00000020);
- } else {
- ensureMemidsIsMutable();
- memids_.addAll(other.memids_);
- }
- onChanged();
- }
- if (!other.types_.isEmpty()) {
- if (types_.isEmpty()) {
- types_ = other.types_;
- bitField0_ = (bitField0_ & ~0x00000040);
- } else {
- ensureTypesIsMutable();
- types_.addAll(other.types_);
- }
- onChanged();
- }
- this.mergeUnknownFields(other.unknownFields);
- onChanged();
- return this;
- }
-
- @Override
- public final boolean isInitialized() {
- if (!hasId()) {
- return false;
- }
- return true;
- }
-
- @Override
- public Builder mergeFrom(
- com.google.protobuf.CodedInputStream input,
- com.google.protobuf.ExtensionRegistryLite extensionRegistry)
- throws java.io.IOException {
- Relation parsedMessage = null;
- try {
- parsedMessage = PARSER.parsePartialFrom(input, extensionRegistry);
- } catch (com.google.protobuf.InvalidProtocolBufferException e) {
- parsedMessage = (Relation) e.getUnfinishedMessage();
- throw e.unwrapIOException();
- } finally {
- if (parsedMessage != null) {
- mergeFrom(parsedMessage);
- }
- }
- return this;
- }
- private int bitField0_;
-
- private long id_ ;
- /**
- * required int64 id = 1;
- * @return Whether the id field is set.
- */
- public boolean hasId() {
- return ((bitField0_ & 0x00000001) != 0);
- }
- /**
- * required int64 id = 1;
- * @return The id.
- */
- public long getId() {
- return id_;
- }
- /**
- * required int64 id = 1;
- * @param value The id to set.
- * @return This builder for chaining.
- */
- public Builder setId(long value) {
- bitField0_ |= 0x00000001;
- id_ = value;
- onChanged();
- return this;
- }
- /**
- * required int64 id = 1;
- * @return This builder for chaining.
- */
- public Builder clearId() {
- bitField0_ = (bitField0_ & ~0x00000001);
- id_ = 0L;
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList keys_ = emptyIntList();
- private void ensureKeysIsMutable() {
- if (!((bitField0_ & 0x00000002) != 0)) {
- keys_ = mutableCopy(keys_);
- bitField0_ |= 0x00000002;
- }
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return A list containing the keys.
- */
- public java.util.List
- getKeysList() {
- return ((bitField0_ & 0x00000002) != 0) ?
- java.util.Collections.unmodifiableList(keys_) : keys_;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return The count of keys.
- */
- public int getKeysCount() {
- return keys_.size();
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index of the element to return.
- * @return The keys at the given index.
- */
- public int getKeys(int index) {
- return keys_.getInt(index);
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param index The index to set the value at.
- * @param value The keys to set.
- * @return This builder for chaining.
- */
- public Builder setKeys(
- int index, int value) {
- ensureKeysIsMutable();
- keys_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param value The keys to add.
- * @return This builder for chaining.
- */
- public Builder addKeys(int value) {
- ensureKeysIsMutable();
- keys_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @param values The keys to add.
- * @return This builder for chaining.
- */
- public Builder addAllKeys(
- Iterable extends Integer> values) {
- ensureKeysIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, keys_);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays.
- *
- *
- * repeated uint32 keys = 2 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearKeys() {
- keys_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000002);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.IntList vals_ = emptyIntList();
- private void ensureValsIsMutable() {
- if (!((bitField0_ & 0x00000004) != 0)) {
- vals_ = mutableCopy(vals_);
- bitField0_ |= 0x00000004;
- }
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return A list containing the vals.
- */
- public java.util.List
- getValsList() {
- return ((bitField0_ & 0x00000004) != 0) ?
- java.util.Collections.unmodifiableList(vals_) : vals_;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return The count of vals.
- */
- public int getValsCount() {
- return vals_.size();
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index of the element to return.
- * @return The vals at the given index.
- */
- public int getVals(int index) {
- return vals_.getInt(index);
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param index The index to set the value at.
- * @param value The vals to set.
- * @return This builder for chaining.
- */
- public Builder setVals(
- int index, int value) {
- ensureValsIsMutable();
- vals_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param value The vals to add.
- * @return This builder for chaining.
- */
- public Builder addVals(int value) {
- ensureValsIsMutable();
- vals_.addInt(value);
- onChanged();
- return this;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @param values The vals to add.
- * @return This builder for chaining.
- */
- public Builder addAllVals(
- Iterable extends Integer> values) {
- ensureValsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, vals_);
- onChanged();
- return this;
- }
- /**
- * repeated uint32 vals = 3 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearVals() {
- vals_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000004);
- onChanged();
- return this;
- }
-
- private Info info_;
- private com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder> infoBuilder_;
- /**
- * optional .OSMPBF.Info info = 4;
- * @return Whether the info field is set.
- */
- public boolean hasInfo() {
- return ((bitField0_ & 0x00000008) != 0);
- }
- /**
- * optional .OSMPBF.Info info = 4;
- * @return The info.
- */
- public Info getInfo() {
- if (infoBuilder_ == null) {
- return info_ == null ? Info.getDefaultInstance() : info_;
- } else {
- return infoBuilder_.getMessage();
- }
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Builder setInfo(Info value) {
- if (infoBuilder_ == null) {
- if (value == null) {
- throw new NullPointerException();
- }
- info_ = value;
- onChanged();
- } else {
- infoBuilder_.setMessage(value);
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Builder setInfo(
- Info.Builder builderForValue) {
- if (infoBuilder_ == null) {
- info_ = builderForValue.build();
- onChanged();
- } else {
- infoBuilder_.setMessage(builderForValue.build());
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Builder mergeInfo(Info value) {
- if (infoBuilder_ == null) {
- if (((bitField0_ & 0x00000008) != 0) &&
- info_ != null &&
- info_ != Info.getDefaultInstance()) {
- info_ =
- Info.newBuilder(info_).mergeFrom(value).buildPartial();
- } else {
- info_ = value;
- }
- onChanged();
- } else {
- infoBuilder_.mergeFrom(value);
- }
- bitField0_ |= 0x00000008;
- return this;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Builder clearInfo() {
- if (infoBuilder_ == null) {
- info_ = null;
- onChanged();
- } else {
- infoBuilder_.clear();
- }
- bitField0_ = (bitField0_ & ~0x00000008);
- return this;
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public Info.Builder getInfoBuilder() {
- bitField0_ |= 0x00000008;
- onChanged();
- return getInfoFieldBuilder().getBuilder();
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- public InfoOrBuilder getInfoOrBuilder() {
- if (infoBuilder_ != null) {
- return infoBuilder_.getMessageOrBuilder();
- } else {
- return info_ == null ?
- Info.getDefaultInstance() : info_;
- }
- }
- /**
- * optional .OSMPBF.Info info = 4;
- */
- private com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder>
- getInfoFieldBuilder() {
- if (infoBuilder_ == null) {
- infoBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
- Info, Info.Builder, InfoOrBuilder>(
- getInfo(),
- getParentForChildren(),
- isClean());
- info_ = null;
- }
- return infoBuilder_;
- }
-
- private com.google.protobuf.Internal.IntList rolesSid_ = emptyIntList();
- private void ensureRolesSidIsMutable() {
- if (!((bitField0_ & 0x00000010) != 0)) {
- rolesSid_ = mutableCopy(rolesSid_);
- bitField0_ |= 0x00000010;
- }
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @return A list containing the rolesSid.
- */
- public java.util.List
- getRolesSidList() {
- return ((bitField0_ & 0x00000010) != 0) ?
- java.util.Collections.unmodifiableList(rolesSid_) : rolesSid_;
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @return The count of rolesSid.
- */
- public int getRolesSidCount() {
- return rolesSid_.size();
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @param index The index of the element to return.
- * @return The rolesSid at the given index.
- */
- public int getRolesSid(int index) {
- return rolesSid_.getInt(index);
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @param index The index to set the value at.
- * @param value The rolesSid to set.
- * @return This builder for chaining.
- */
- public Builder setRolesSid(
- int index, int value) {
- ensureRolesSidIsMutable();
- rolesSid_.setInt(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @param value The rolesSid to add.
- * @return This builder for chaining.
- */
- public Builder addRolesSid(int value) {
- ensureRolesSidIsMutable();
- rolesSid_.addInt(value);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @param values The rolesSid to add.
- * @return This builder for chaining.
- */
- public Builder addAllRolesSid(
- Iterable extends Integer> values) {
- ensureRolesSidIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, rolesSid_);
- onChanged();
- return this;
- }
- /**
- *
- * Parallel arrays
- *
- *
- * repeated int32 roles_sid = 8 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearRolesSid() {
- rolesSid_ = emptyIntList();
- bitField0_ = (bitField0_ & ~0x00000010);
- onChanged();
- return this;
- }
-
- private com.google.protobuf.Internal.LongList memids_ = emptyLongList();
- private void ensureMemidsIsMutable() {
- if (!((bitField0_ & 0x00000020) != 0)) {
- memids_ = mutableCopy(memids_);
- bitField0_ |= 0x00000020;
- }
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @return A list containing the memids.
- */
- public java.util.List
- getMemidsList() {
- return ((bitField0_ & 0x00000020) != 0) ?
- java.util.Collections.unmodifiableList(memids_) : memids_;
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @return The count of memids.
- */
- public int getMemidsCount() {
- return memids_.size();
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @param index The index of the element to return.
- * @return The memids at the given index.
- */
- public long getMemids(int index) {
- return memids_.getLong(index);
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @param index The index to set the value at.
- * @param value The memids to set.
- * @return This builder for chaining.
- */
- public Builder setMemids(
- int index, long value) {
- ensureMemidsIsMutable();
- memids_.setLong(index, value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @param value The memids to add.
- * @return This builder for chaining.
- */
- public Builder addMemids(long value) {
- ensureMemidsIsMutable();
- memids_.addLong(value);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @param values The memids to add.
- * @return This builder for chaining.
- */
- public Builder addAllMemids(
- Iterable extends Long> values) {
- ensureMemidsIsMutable();
- com.google.protobuf.AbstractMessageLite.Builder.addAll(
- values, memids_);
- onChanged();
- return this;
- }
- /**
- *
- * DELTA encoded
- *
- *
- * repeated sint64 memids = 9 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearMemids() {
- memids_ = emptyLongList();
- bitField0_ = (bitField0_ & ~0x00000020);
- onChanged();
- return this;
- }
-
- private java.util.List types_ =
- java.util.Collections.emptyList();
- private void ensureTypesIsMutable() {
- if (!((bitField0_ & 0x00000040) != 0)) {
- types_ = new java.util.ArrayList(types_);
- bitField0_ |= 0x00000040;
- }
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @return A list containing the types.
- */
- public java.util.List getTypesList() {
- return new com.google.protobuf.Internal.ListAdapter<
- Integer, Relation.MemberType>(types_, types_converter_);
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @return The count of types.
- */
- public int getTypesCount() {
- return types_.size();
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @param index The index of the element to return.
- * @return The types at the given index.
- */
- public Relation.MemberType getTypes(int index) {
- return types_converter_.convert(types_.get(index));
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @param index The index to set the value at.
- * @param value The types to set.
- * @return This builder for chaining.
- */
- public Builder setTypes(
- int index, Relation.MemberType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTypesIsMutable();
- types_.set(index, value.getNumber());
- onChanged();
- return this;
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @param value The types to add.
- * @return This builder for chaining.
- */
- public Builder addTypes(Relation.MemberType value) {
- if (value == null) {
- throw new NullPointerException();
- }
- ensureTypesIsMutable();
- types_.add(value.getNumber());
- onChanged();
- return this;
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @param values The types to add.
- * @return This builder for chaining.
- */
- public Builder addAllTypes(
- Iterable extends Relation.MemberType> values) {
- ensureTypesIsMutable();
- for (Relation.MemberType value : values) {
- types_.add(value.getNumber());
- }
- onChanged();
- return this;
- }
- /**
- * repeated .OSMPBF.Relation.MemberType types = 10 [packed = true];
- * @return This builder for chaining.
- */
- public Builder clearTypes() {
- types_ = java.util.Collections.emptyList();
- bitField0_ = (bitField0_ & ~0x00000040);
- onChanged();
- return this;
- }
- @Override
- public final Builder setUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.setUnknownFields(unknownFields);
- }
-
- @Override
- public final Builder mergeUnknownFields(
- final com.google.protobuf.UnknownFieldSet unknownFields) {
- return super.mergeUnknownFields(unknownFields);
- }
-
-
- // @@protoc_insertion_point(builder_scope:OSMPBF.Relation)
- }
-
- // @@protoc_insertion_point(class_scope:OSMPBF.Relation)
- private static final Relation DEFAULT_INSTANCE;
- static {
- DEFAULT_INSTANCE = new Relation();
- }
-
- public static Relation getDefaultInstance() {
- return DEFAULT_INSTANCE;
- }
-
- @Deprecated public static final com.google.protobuf.Parser
- PARSER = new com.google.protobuf.AbstractParser