Package crosby.binary

Class Osmformat.Way.Builder

  • All Implemented Interfaces:
    com.google.protobuf.Message.Builder, com.google.protobuf.MessageLite.Builder, com.google.protobuf.MessageLiteOrBuilder, com.google.protobuf.MessageOrBuilder, Osmformat.WayOrBuilder, java.lang.Cloneable
    Enclosing class:
    Osmformat.Way

    public static final class Osmformat.Way.Builder
    extends com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
    implements Osmformat.WayOrBuilder
    Protobuf type OSMPBF.Way
    • Field Detail

      • bitField0_

        private int bitField0_
      • id_

        private long id_
      • keys_

        private com.google.protobuf.Internal.IntList keys_
      • vals_

        private com.google.protobuf.Internal.IntList vals_
      • refs_

        private com.google.protobuf.Internal.LongList refs_
      • lat_

        private com.google.protobuf.Internal.LongList lat_
      • lon_

        private com.google.protobuf.Internal.LongList lon_
    • Constructor Detail

      • Builder

        private Builder()
      • Builder

        private Builder​(com.google.protobuf.GeneratedMessageV3.BuilderParent parent)
    • Method Detail

      • getDescriptor

        public static final com.google.protobuf.Descriptors.Descriptor getDescriptor()
      • internalGetFieldAccessorTable

        protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable()
        Specified by:
        internalGetFieldAccessorTable in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • maybeForceBuilderInitialization

        private void maybeForceBuilderInitialization()
      • clear

        public Osmformat.Way.Builder clear()
        Specified by:
        clear in interface com.google.protobuf.Message.Builder
        Specified by:
        clear in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clear in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • getDescriptorForType

        public com.google.protobuf.Descriptors.Descriptor getDescriptorForType()
        Specified by:
        getDescriptorForType in interface com.google.protobuf.Message.Builder
        Specified by:
        getDescriptorForType in interface com.google.protobuf.MessageOrBuilder
        Overrides:
        getDescriptorForType in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • getDefaultInstanceForType

        public Osmformat.Way getDefaultInstanceForType()
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageLiteOrBuilder
        Specified by:
        getDefaultInstanceForType in interface com.google.protobuf.MessageOrBuilder
      • build

        public Osmformat.Way build()
        Specified by:
        build in interface com.google.protobuf.Message.Builder
        Specified by:
        build in interface com.google.protobuf.MessageLite.Builder
      • buildPartial

        public Osmformat.Way buildPartial()
        Specified by:
        buildPartial in interface com.google.protobuf.Message.Builder
        Specified by:
        buildPartial in interface com.google.protobuf.MessageLite.Builder
      • clone

        public Osmformat.Way.Builder clone()
        Specified by:
        clone in interface com.google.protobuf.Message.Builder
        Specified by:
        clone in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        clone in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • setField

        public Osmformat.Way.Builder setField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                              java.lang.Object value)
        Specified by:
        setField in interface com.google.protobuf.Message.Builder
        Overrides:
        setField in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • clearField

        public Osmformat.Way.Builder clearField​(com.google.protobuf.Descriptors.FieldDescriptor field)
        Specified by:
        clearField in interface com.google.protobuf.Message.Builder
        Overrides:
        clearField in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • clearOneof

        public Osmformat.Way.Builder clearOneof​(com.google.protobuf.Descriptors.OneofDescriptor oneof)
        Specified by:
        clearOneof in interface com.google.protobuf.Message.Builder
        Overrides:
        clearOneof in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • setRepeatedField

        public Osmformat.Way.Builder setRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      int index,
                                                      java.lang.Object value)
        Specified by:
        setRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        setRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • addRepeatedField

        public Osmformat.Way.Builder addRepeatedField​(com.google.protobuf.Descriptors.FieldDescriptor field,
                                                      java.lang.Object value)
        Specified by:
        addRepeatedField in interface com.google.protobuf.Message.Builder
        Overrides:
        addRepeatedField in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • mergeFrom

        public Osmformat.Way.Builder mergeFrom​(com.google.protobuf.Message other)
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Osmformat.Way.Builder>
      • isInitialized

        public final boolean isInitialized()
        Specified by:
        isInitialized in interface com.google.protobuf.MessageLiteOrBuilder
        Overrides:
        isInitialized in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • mergeFrom

        public Osmformat.Way.Builder mergeFrom​(com.google.protobuf.CodedInputStream input,
                                               com.google.protobuf.ExtensionRegistryLite extensionRegistry)
                                        throws java.io.IOException
        Specified by:
        mergeFrom in interface com.google.protobuf.Message.Builder
        Specified by:
        mergeFrom in interface com.google.protobuf.MessageLite.Builder
        Overrides:
        mergeFrom in class com.google.protobuf.AbstractMessage.Builder<Osmformat.Way.Builder>
        Throws:
        java.io.IOException
      • hasId

        public boolean hasId()
        required int64 id = 1;
        Specified by:
        hasId in interface Osmformat.WayOrBuilder
        Returns:
        Whether the id field is set.
      • setId

        public Osmformat.Way.Builder setId​(long value)
        required int64 id = 1;
        Parameters:
        value - The id to set.
        Returns:
        This builder for chaining.
      • clearId

        public Osmformat.Way.Builder clearId()
        required int64 id = 1;
        Returns:
        This builder for chaining.
      • ensureKeysIsMutable

        private void ensureKeysIsMutable()
      • getKeysList

        public java.util.List<java.lang.Integer> getKeysList()
         Parallel arrays.
         
        repeated uint32 keys = 2 [packed = true];
        Specified by:
        getKeysList in interface Osmformat.WayOrBuilder
        Returns:
        A list containing the keys.
      • getKeysCount

        public int getKeysCount()
         Parallel arrays.
         
        repeated uint32 keys = 2 [packed = true];
        Specified by:
        getKeysCount in interface Osmformat.WayOrBuilder
        Returns:
        The count of keys.
      • getKeys

        public int getKeys​(int index)
         Parallel arrays.
         
        repeated uint32 keys = 2 [packed = true];
        Specified by:
        getKeys in interface Osmformat.WayOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The keys at the given index.
      • setKeys

        public Osmformat.Way.Builder setKeys​(int index,
                                             int value)
         Parallel arrays.
         
        repeated uint32 keys = 2 [packed = true];
        Parameters:
        index - The index to set the value at.
        value - The keys to set.
        Returns:
        This builder for chaining.
      • addKeys

        public Osmformat.Way.Builder addKeys​(int value)
         Parallel arrays.
         
        repeated uint32 keys = 2 [packed = true];
        Parameters:
        value - The keys to add.
        Returns:
        This builder for chaining.
      • addAllKeys

        public Osmformat.Way.Builder addAllKeys​(java.lang.Iterable<? extends java.lang.Integer> values)
         Parallel arrays.
         
        repeated uint32 keys = 2 [packed = true];
        Parameters:
        values - The keys to add.
        Returns:
        This builder for chaining.
      • clearKeys

        public Osmformat.Way.Builder clearKeys()
         Parallel arrays.
         
        repeated uint32 keys = 2 [packed = true];
        Returns:
        This builder for chaining.
      • ensureValsIsMutable

        private void ensureValsIsMutable()
      • getValsList

        public java.util.List<java.lang.Integer> getValsList()
        repeated uint32 vals = 3 [packed = true];
        Specified by:
        getValsList in interface Osmformat.WayOrBuilder
        Returns:
        A list containing the vals.
      • getValsCount

        public int getValsCount()
        repeated uint32 vals = 3 [packed = true];
        Specified by:
        getValsCount in interface Osmformat.WayOrBuilder
        Returns:
        The count of vals.
      • getVals

        public int getVals​(int index)
        repeated uint32 vals = 3 [packed = true];
        Specified by:
        getVals in interface Osmformat.WayOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The vals at the given index.
      • setVals

        public Osmformat.Way.Builder setVals​(int index,
                                             int value)
        repeated uint32 vals = 3 [packed = true];
        Parameters:
        index - The index to set the value at.
        value - The vals to set.
        Returns:
        This builder for chaining.
      • addVals

        public Osmformat.Way.Builder addVals​(int value)
        repeated uint32 vals = 3 [packed = true];
        Parameters:
        value - The vals to add.
        Returns:
        This builder for chaining.
      • addAllVals

        public Osmformat.Way.Builder addAllVals​(java.lang.Iterable<? extends java.lang.Integer> values)
        repeated uint32 vals = 3 [packed = true];
        Parameters:
        values - The vals to add.
        Returns:
        This builder for chaining.
      • clearVals

        public Osmformat.Way.Builder clearVals()
        repeated uint32 vals = 3 [packed = true];
        Returns:
        This builder for chaining.
      • hasInfo

        public boolean hasInfo()
        optional .OSMPBF.Info info = 4;
        Specified by:
        hasInfo in interface Osmformat.WayOrBuilder
        Returns:
        Whether the info field is set.
      • ensureRefsIsMutable

        private void ensureRefsIsMutable()
      • getRefsList

        public java.util.List<java.lang.Long> getRefsList()
         DELTA coded
         
        repeated sint64 refs = 8 [packed = true];
        Specified by:
        getRefsList in interface Osmformat.WayOrBuilder
        Returns:
        A list containing the refs.
      • getRefsCount

        public int getRefsCount()
         DELTA coded
         
        repeated sint64 refs = 8 [packed = true];
        Specified by:
        getRefsCount in interface Osmformat.WayOrBuilder
        Returns:
        The count of refs.
      • getRefs

        public long getRefs​(int index)
         DELTA coded
         
        repeated sint64 refs = 8 [packed = true];
        Specified by:
        getRefs in interface Osmformat.WayOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The refs at the given index.
      • setRefs

        public Osmformat.Way.Builder setRefs​(int index,
                                             long value)
         DELTA coded
         
        repeated sint64 refs = 8 [packed = true];
        Parameters:
        index - The index to set the value at.
        value - The refs to set.
        Returns:
        This builder for chaining.
      • addRefs

        public Osmformat.Way.Builder addRefs​(long value)
         DELTA coded
         
        repeated sint64 refs = 8 [packed = true];
        Parameters:
        value - The refs to add.
        Returns:
        This builder for chaining.
      • addAllRefs

        public Osmformat.Way.Builder addAllRefs​(java.lang.Iterable<? extends java.lang.Long> values)
         DELTA coded
         
        repeated sint64 refs = 8 [packed = true];
        Parameters:
        values - The refs to add.
        Returns:
        This builder for chaining.
      • clearRefs

        public Osmformat.Way.Builder clearRefs()
         DELTA coded
         
        repeated sint64 refs = 8 [packed = true];
        Returns:
        This builder for chaining.
      • ensureLatIsMutable

        private void ensureLatIsMutable()
      • getLatList

        public java.util.List<java.lang.Long> getLatList()
         The following two fields are optional. They are only used in a special
         format where node locations are also added to the ways. This makes the
         files larger, but allows creating way geometries directly.
         If this is used, you MUST set the optional_features tag "LocationsOnWays"
         and the number of values in refs, lat, and lon MUST be the same.
         
        repeated sint64 lat = 9 [packed = true];
        Specified by:
        getLatList in interface Osmformat.WayOrBuilder
        Returns:
        A list containing the lat.
      • getLatCount

        public int getLatCount()
         The following two fields are optional. They are only used in a special
         format where node locations are also added to the ways. This makes the
         files larger, but allows creating way geometries directly.
         If this is used, you MUST set the optional_features tag "LocationsOnWays"
         and the number of values in refs, lat, and lon MUST be the same.
         
        repeated sint64 lat = 9 [packed = true];
        Specified by:
        getLatCount in interface Osmformat.WayOrBuilder
        Returns:
        The count of lat.
      • getLat

        public long getLat​(int index)
         The following two fields are optional. They are only used in a special
         format where node locations are also added to the ways. This makes the
         files larger, but allows creating way geometries directly.
         If this is used, you MUST set the optional_features tag "LocationsOnWays"
         and the number of values in refs, lat, and lon MUST be the same.
         
        repeated sint64 lat = 9 [packed = true];
        Specified by:
        getLat in interface Osmformat.WayOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The lat at the given index.
      • setLat

        public Osmformat.Way.Builder setLat​(int index,
                                            long value)
         The following two fields are optional. They are only used in a special
         format where node locations are also added to the ways. This makes the
         files larger, but allows creating way geometries directly.
         If this is used, you MUST set the optional_features tag "LocationsOnWays"
         and the number of values in refs, lat, and lon MUST be the same.
         
        repeated sint64 lat = 9 [packed = true];
        Parameters:
        index - The index to set the value at.
        value - The lat to set.
        Returns:
        This builder for chaining.
      • addLat

        public Osmformat.Way.Builder addLat​(long value)
         The following two fields are optional. They are only used in a special
         format where node locations are also added to the ways. This makes the
         files larger, but allows creating way geometries directly.
         If this is used, you MUST set the optional_features tag "LocationsOnWays"
         and the number of values in refs, lat, and lon MUST be the same.
         
        repeated sint64 lat = 9 [packed = true];
        Parameters:
        value - The lat to add.
        Returns:
        This builder for chaining.
      • addAllLat

        public Osmformat.Way.Builder addAllLat​(java.lang.Iterable<? extends java.lang.Long> values)
         The following two fields are optional. They are only used in a special
         format where node locations are also added to the ways. This makes the
         files larger, but allows creating way geometries directly.
         If this is used, you MUST set the optional_features tag "LocationsOnWays"
         and the number of values in refs, lat, and lon MUST be the same.
         
        repeated sint64 lat = 9 [packed = true];
        Parameters:
        values - The lat to add.
        Returns:
        This builder for chaining.
      • clearLat

        public Osmformat.Way.Builder clearLat()
         The following two fields are optional. They are only used in a special
         format where node locations are also added to the ways. This makes the
         files larger, but allows creating way geometries directly.
         If this is used, you MUST set the optional_features tag "LocationsOnWays"
         and the number of values in refs, lat, and lon MUST be the same.
         
        repeated sint64 lat = 9 [packed = true];
        Returns:
        This builder for chaining.
      • ensureLonIsMutable

        private void ensureLonIsMutable()
      • getLonList

        public java.util.List<java.lang.Long> getLonList()
         DELTA coded, optional
         
        repeated sint64 lon = 10 [packed = true];
        Specified by:
        getLonList in interface Osmformat.WayOrBuilder
        Returns:
        A list containing the lon.
      • getLonCount

        public int getLonCount()
         DELTA coded, optional
         
        repeated sint64 lon = 10 [packed = true];
        Specified by:
        getLonCount in interface Osmformat.WayOrBuilder
        Returns:
        The count of lon.
      • getLon

        public long getLon​(int index)
         DELTA coded, optional
         
        repeated sint64 lon = 10 [packed = true];
        Specified by:
        getLon in interface Osmformat.WayOrBuilder
        Parameters:
        index - The index of the element to return.
        Returns:
        The lon at the given index.
      • setLon

        public Osmformat.Way.Builder setLon​(int index,
                                            long value)
         DELTA coded, optional
         
        repeated sint64 lon = 10 [packed = true];
        Parameters:
        index - The index to set the value at.
        value - The lon to set.
        Returns:
        This builder for chaining.
      • addLon

        public Osmformat.Way.Builder addLon​(long value)
         DELTA coded, optional
         
        repeated sint64 lon = 10 [packed = true];
        Parameters:
        value - The lon to add.
        Returns:
        This builder for chaining.
      • addAllLon

        public Osmformat.Way.Builder addAllLon​(java.lang.Iterable<? extends java.lang.Long> values)
         DELTA coded, optional
         
        repeated sint64 lon = 10 [packed = true];
        Parameters:
        values - The lon to add.
        Returns:
        This builder for chaining.
      • clearLon

        public Osmformat.Way.Builder clearLon()
         DELTA coded, optional
         
        repeated sint64 lon = 10 [packed = true];
        Returns:
        This builder for chaining.
      • setUnknownFields

        public final Osmformat.Way.Builder setUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        setUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        setUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>
      • mergeUnknownFields

        public final Osmformat.Way.Builder mergeUnknownFields​(com.google.protobuf.UnknownFieldSet unknownFields)
        Specified by:
        mergeUnknownFields in interface com.google.protobuf.Message.Builder
        Overrides:
        mergeUnknownFields in class com.google.protobuf.GeneratedMessageV3.Builder<Osmformat.Way.Builder>