diff --git a/DataExtractionOSM/src/gnu/trove/list/TByteList.java b/DataExtractionOSM/src/gnu/trove/list/TByteList.java new file mode 100644 index 0000000000..3959990c27 --- /dev/null +++ b/DataExtractionOSM/src/gnu/trove/list/TByteList.java @@ -0,0 +1,518 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.list; + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +import gnu.trove.function.*; +import gnu.trove.procedure.*; +import gnu.trove.TByteCollection; + +import java.io.Serializable; +import java.util.Random; + + + +/** + * Interface for Trove list implementations. + */ +public interface TByteList extends TByteCollection, Serializable { + + /** + * Returns the value that is used to represent null. The default + * value is generally zero, but can be changed during construction + * of the collection. + * + * @return the value that represents null + */ + @Override + public byte getNoEntryValue(); + + + /** + * Returns the number of values in the list. + * + * @return the number of values in the list. + */ + @Override + public int size(); + + + /** + * Tests whether this list contains any values. + * + * @return true if the list is empty. + */ + @Override + public boolean isEmpty(); + + + /** + * Adds val to the end of the list, growing as needed. + * + * @param val an byte value + * @return true if the list was modified by the add operation + */ + @Override + public boolean add(byte val); + + + /** + * Adds the values in the array vals to the end of the + * list, in order. + * + * @param vals an byte[] value + */ + public void add( byte[] vals ); + + + /** + * Adds a subset of the values in the array vals to the + * end of the list, in order. + * + * @param vals an byte[] value + * @param offset the offset at which to start copying + * @param length the number of values to copy. + */ + public void add( byte[] vals, int offset, int length ); + + + /** + * Inserts value into the list at offset. All + * values including and to the right of offset are shifted + * to the right. + * + * @param offset an int value + * @param value an byte value + */ + public void insert( int offset, byte value ); + + + /** + * Inserts the array of values into the list at + * offset. All values including and to the right of + * offset are shifted to the right. + * + * @param offset an int value + * @param values an byte[] value + */ + public void insert( int offset, byte[] values ); + + + /** + * Inserts a slice of the array of values into the list + * at offset. All values including and to the right of + * offset are shifted to the right. + * + * @param offset an int value + * @param values an byte[] value + * @param valOffset the offset in the values array at which to + * start copying. + * @param len the number of values to copy from the values array + */ + public void insert( int offset, byte[] values, int valOffset, int len ); + + + /** + * Returns the value at the specified offset. + * + * @param offset an int value + * @return an byte value + */ + public byte get( int offset ); + + + /** + * Sets the value at the specified offset. + * + * @param offset an int value + * @param val an byte value + * + * @return The value previously at the given index. + */ + public byte set( int offset, byte val ); + + + /** + * Replace the values in the list starting at offset with + * the contents of the values array. + * + * @param offset the first offset to replace + * @param values the source of the new values + */ + public void set( int offset, byte[] values ); + + + /** + * Replace the values in the list starting at offset with + * length values from the values array, starting + * at valOffset. + * + * @param offset the first offset to replace + * @param values the source of the new values + * @param valOffset the first value to copy from the values array + * @param length the number of values to copy + */ + public void set( int offset, byte[] values, int valOffset, int length ); + + + /** + * Sets the value at the specified offset and returns the + * previously stored value. + * + * @param offset an int value + * @param val an byte value + * @return the value previously stored at offset. + */ + public byte replace( int offset, byte val ); + + + /** + * Flushes the internal state of the list, resetting the capacity + * to the default. + */ + @Override + public void clear(); + + + /** + * Removes value from the list. + * + * @param value an byte value + * @return true if the list was modified by the remove operation. + */ + @Override + public boolean remove( byte value ); + + + /** + * Removes value at a given offset from the list. + * + * @param offset an int value that represents + * the offset to the element to be removed + * @return an byte that is the value removed. + */ + public byte removeAt( int offset ); + + + /** + * Removes length values from the list, starting at + * offset + * + * @param offset an int value + * @param length an int value + */ + public void remove( int offset, int length ); + + + /** + * Transform each value in the list using the specified function. + * + * @param function a TByteFunction value + */ + public void transformValues( TByteFunction function ); + + + /** + * Reverse the order of the elements in the list. + */ + public void reverse(); + + + /** + * Reverse the order of the elements in the range of the list. + * + * @param from the inclusive index at which to start reversing + * @param to the exclusive index at which to stop reversing + */ + public void reverse( int from, int to ); + + + /** + * Shuffle the elements of the list using the specified random + * number generator. + * + * @param rand a Random value + */ + public void shuffle( Random rand ); + + + /** + * Returns a sublist of this list. + * + * @param begin low endpoint (inclusive) of the subList. + * @param end high endpoint (exclusive) of the subList. + * @return sublist of this list from begin, inclusive to end, exclusive. + * @throws IndexOutOfBoundsException - endpoint out of range + * @throws IllegalArgumentException - endpoints out of order (end > begin) + */ + public TByteList subList( int begin, int end ); + + + /** + * Copies the contents of the list into a native array. + * + * @return an byte[] value + */ + @Override + public byte[] toArray(); + + + /** + * Copies a slice of the list into a native array. + * + * @param offset the offset at which to start copying + * @param len the number of values to copy. + * @return an byte[] value + */ + public byte[] toArray( int offset, int len ); + + + /** + * Copies a slice of the list into a native array. + * + *

If the list fits in the specified array with room to spare (i.e., + * the array has more elements than the list), the element in the array + * immediately following the end of the list is set to + * {@link #getNoEntryValue()}. + * (This is useful in determining the length of the list only if + * the caller knows that the list does not contain any "null" elements.) + * + *

NOTE: Trove does not allocate a new array if the array passed in is + * not large enough to hold all of the data elements. It will instead fill + * the array passed in. + * + * @param dest the array to copy into. + * @return the array passed in. + */ + @Override + public byte[] toArray( byte[] dest ); + + + /** + * Copies a slice of the list into a native array. + * + * @param dest the array to copy into. + * @param offset the offset where the first value should be copied + * @param len the number of values to copy. + * @return the array passed in. + */ + public byte[] toArray( byte[] dest, int offset, int len ); + + + /** + * Copies a slice of the list into a native array. + * + * @param dest the array to copy into. + * @param source_pos the offset of the first value to copy + * @param dest_pos the offset where the first value should be copied + * @param len the number of values to copy. + * @return the array passed in. + */ + public byte[] toArray( byte[] dest, int source_pos, int dest_pos, int len ); + + + /** + * Applies the procedure to each value in the list in ascending + * (front to back) order. + * + * @param procedure a TByteProcedure value + * @return true if the procedure did not terminate prematurely. + */ + @Override + public boolean forEach( TByteProcedure procedure ); + + + /** + * Applies the procedure to each value in the list in descending + * (back to front) order. + * + * @param procedure a TByteProcedure value + * @return true if the procedure did not terminate prematurely. + */ + public boolean forEachDescending( TByteProcedure procedure ); + + + /** + * Sort the values in the list (ascending) using the Sun quicksort + * implementation. + * + * @see java.util.Arrays#sort + */ + public void sort(); + + + /** + * Sort a slice of the list (ascending) using the Sun quicksort + * implementation. + * + * @param fromIndex the index at which to start sorting (inclusive) + * @param toIndex the index at which to stop sorting (exclusive) + * @see java.util.Arrays#sort + */ + public void sort( int fromIndex, int toIndex ); + + + /** + * Fills every slot in the list with the specified value. + * + * @param val the value to use when filling + */ + public void fill( byte val ); + + + /** + * Fills a range in the list with the specified value. + * + * @param fromIndex the offset at which to start filling (inclusive) + * @param toIndex the offset at which to stop filling (exclusive) + * @param val the value to use when filling + */ + public void fill( int fromIndex, int toIndex, byte val ); + + + /** + * Performs a binary search for value in the entire list. + * Note that you must @{link #sort sort} the list before + * doing a search. + * + * @param value the value to search for + * @return the absolute offset in the list of the value, or its + * negative insertion point into the sorted list. + */ + public int binarySearch( byte value ); + + + /** + * Performs a binary search for value in the specified + * range. Note that you must @{link #sort sort} the list + * or the range before doing a search. + * + * @param value the value to search for + * @param fromIndex the lower boundary of the range (inclusive) + * @param toIndex the upper boundary of the range (exclusive) + * @return the absolute offset in the list of the value, or its + * negative insertion point into the sorted list. + */ + public int binarySearch( byte value, int fromIndex, int toIndex ); + + + /** + * Searches the list front to back for the index of + * value. + * + * @param value an byte value + * @return the first offset of the value, or -1 if it is not in + * the list. + * @see #binarySearch for faster searches on sorted lists + */ + public int indexOf( byte value ); + + + /** + * Searches the list front to back for the index of + * value, starting at offset. + * + * @param offset the offset at which to start the linear search + * (inclusive) + * @param value an byte value + * @return the first offset of the value, or -1 if it is not in + * the list. + * @see #binarySearch for faster searches on sorted lists + */ + public int indexOf( int offset, byte value ); + + + /** + * Searches the list back to front for the last index of + * value. + * + * @param value an byte value + * @return the last offset of the value, or -1 if it is not in + * the list. + * @see #binarySearch for faster searches on sorted lists + */ + public int lastIndexOf( byte value ); + + + /** + * Searches the list back to front for the last index of + * value, starting at offset. + * + * @param offset the offset at which to start the linear search + * (exclusive) + * @param value an byte value + * @return the last offset of the value, or -1 if it is not in + * the list. + * @see #binarySearch for faster searches on sorted lists + */ + public int lastIndexOf( int offset, byte value ); + + + /** + * Searches the list for value + * + * @param value an byte value + * @return true if value is in the list. + */ + @Override + public boolean contains( byte value ); + + + /** + * Searches the list for values satisfying condition in + * the manner of the *nix grep utility. + * + * @param condition a condition to apply to each element in the list + * @return a list of values which match the condition. + */ + public TByteList grep( TByteProcedure condition ); + + + /** + * Searches the list for values which do not satisfy + * condition. This is akin to *nix grep -v. + * + * @param condition a condition to apply to each element in the list + * @return a list of values which do not match the condition. + */ + public TByteList inverseGrep( TByteProcedure condition ); + + + /** + * Finds the maximum value in the list. + * + * @return the largest value in the list. + * @exception IllegalStateException if the list is empty + */ + public byte max(); + + + /** + * Finds the minimum value in the list. + * + * @return the smallest value in the list. + * @exception IllegalStateException if the list is empty + */ + public byte min(); +} diff --git a/DataExtractionOSM/src/gnu/trove/list/array/TByteArrayList.java b/DataExtractionOSM/src/gnu/trove/list/array/TByteArrayList.java new file mode 100644 index 0000000000..897171e5ca --- /dev/null +++ b/DataExtractionOSM/src/gnu/trove/list/array/TByteArrayList.java @@ -0,0 +1,1079 @@ +/////////////////////////////////////////////////////////////////////////////// +// Copyright (c) 2001, Eric D. Friedman All Rights Reserved. +// Copyright (c) 2009, Rob Eden All Rights Reserved. +// Copyright (c) 2009, Jeff Randall All Rights Reserved. +// +// This library is free software; you can redistribute it and/or +// modify it under the terms of the GNU Lesser General Public +// License as published by the Free Software Foundation; either +// version 2.1 of the License, or (at your option) any later version. +// +// This library is distributed in the hope that it will be useful, +// but WITHOUT ANY WARRANTY; without even the implied warranty of +// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +// GNU General Public License for more details. +// +// You should have received a copy of the GNU Lesser General Public +// License along with this program; if not, write to the Free Software +// Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. +/////////////////////////////////////////////////////////////////////////////// + +package gnu.trove.list.array; + +import gnu.trove.function.TByteFunction; +import gnu.trove.list.TByteList; +import gnu.trove.procedure.TByteProcedure; +import gnu.trove.iterator.TByteIterator; +import gnu.trove.TByteCollection; +import gnu.trove.impl.*; + +import java.io.Externalizable; +import java.io.IOException; +import java.io.ObjectInput; +import java.io.ObjectOutput; +import java.util.*; + + +////////////////////////////////////////////////// +// THIS IS A GENERATED CLASS. DO NOT HAND EDIT! // +////////////////////////////////////////////////// + + +/** + * A resizable, array-backed list of byte primitives. + */ +public class TByteArrayList implements TByteList, Externalizable { + static final long serialVersionUID = 1L; + + /** the data of the list */ + protected byte[] _data; + + /** the index after the last entry in the list */ + protected int _pos; + + /** the default capacity for new lists */ + protected static final int DEFAULT_CAPACITY = Constants.DEFAULT_CAPACITY; + + /** the byte value that represents null */ + protected byte no_entry_value; + + + /** + * Creates a new TByteArrayList instance with the + * default capacity. + */ + @SuppressWarnings({"RedundantCast"}) + public TByteArrayList() { + this( DEFAULT_CAPACITY, ( byte ) 0 ); + } + + + /** + * Creates a new TByteArrayList instance with the + * specified capacity. + * + * @param capacity an int value + */ + @SuppressWarnings({"RedundantCast"}) + public TByteArrayList( int capacity ) { + this( capacity, ( byte ) 0 ); + } + + + /** + * Creates a new TByteArrayList instance with the + * specified capacity. + * + * @param capacity an int value + * @param no_entry_value an byte value that represents null. + */ + public TByteArrayList( int capacity, byte no_entry_value ) { + _data = new byte[ capacity ]; + _pos = 0; + this.no_entry_value = no_entry_value; + } + + /** + * Creates a new TByteArrayList instance that contains + * a copy of the collection passed to us. + * + * @param collection the collection to copy + */ + public TByteArrayList ( TByteCollection collection ) { + this( collection.size() ); + addAll( collection ); + } + + + /** + * Creates a new TByteArrayList instance whose + * capacity is the length of values array and whose + * initial contents are the specified values. + * + * @param values an byte[] value + */ + public TByteArrayList( byte[] values ) { + this( values.length ); + add( values ); + } + + + /** {@inheritDoc} */ + @Override + public byte getNoEntryValue() { + return no_entry_value; + } + + + // sizing + + /** + * Grow the internal array as needed to accommodate the specified number of elements. + * The size of the array bytes on each resize unless capacity requires more than twice + * the current capacity. + */ + public void ensureCapacity( int capacity ) { + if ( capacity > _data.length ) { + int newCap = Math.max( _data.length << 1, capacity ); + byte[] tmp = new byte[ newCap ]; + System.arraycopy( _data, 0, tmp, 0, _data.length ); + _data = tmp; + } + } + + + /** {@inheritDoc} */ + @Override + public int size() { + return _pos; + } + + + /** {@inheritDoc} */ + @Override + public boolean isEmpty() { + return _pos == 0; + } + + + /** + * Sheds any excess capacity above and beyond the current size of the list. + */ + public void trimToSize() { + if ( _data.length > size() ) { + byte[] tmp = new byte[ size() ]; + toArray( tmp, 0, tmp.length ); + _data = tmp; + } + } + + + // modifying + + /** {@inheritDoc} */ + @Override + public boolean add( byte val ) { + ensureCapacity( _pos + 1 ); + _data[ _pos++ ] = val; + return true; + } + + + /** {@inheritDoc} */ + @Override + public void add( byte[] vals ) { + add( vals, 0, vals.length ); + } + + + /** {@inheritDoc} */ + @Override + public void add( byte[] vals, int offset, int length ) { + ensureCapacity( _pos + length ); + System.arraycopy( vals, offset, _data, _pos, length ); + _pos += length; + } + + + /** {@inheritDoc} */ + @Override + public void insert( int offset, byte value ) { + if ( offset == _pos ) { + add( value ); + return; + } + ensureCapacity( _pos + 1 ); + // shift right + System.arraycopy( _data, offset, _data, offset + 1, _pos - offset ); + // insert + _data[ offset ] = value; + _pos++; + } + + + /** {@inheritDoc} */ + @Override + public void insert( int offset, byte[] values ) { + insert( offset, values, 0, values.length ); + } + + + /** {@inheritDoc} */ + @Override + public void insert( int offset, byte[] values, int valOffset, int len ) { + if ( offset == _pos ) { + add( values, valOffset, len ); + return; + } + + ensureCapacity( _pos + len ); + // shift right + System.arraycopy( _data, offset, _data, offset + len, _pos - offset ); + // insert + System.arraycopy( values, valOffset, _data, offset, len ); + _pos += len; + } + + + /** {@inheritDoc} */ + @Override + public byte get( int offset ) { + if ( offset >= _pos ) { + throw new ArrayIndexOutOfBoundsException( offset ); + } + return _data[ offset ]; + } + + + /** + * Returns the value at the specified offset without doing any bounds checking. + */ + public byte getQuick( int offset ) { + return _data[ offset ]; + } + + + /** {@inheritDoc} */ + @Override + public byte set( int offset, byte val ) { + if ( offset >= _pos ) { + throw new ArrayIndexOutOfBoundsException( offset ); + } + + byte prev_val = _data[ offset ]; + _data[ offset ] = val; + return prev_val; + } + + + /** {@inheritDoc} */ + @Override + public byte replace( int offset, byte val ) { + if ( offset >= _pos ) { + throw new ArrayIndexOutOfBoundsException( offset ); + } + byte old = _data[ offset ]; + _data[ offset ] = val; + return old; + } + + + /** {@inheritDoc} */ + @Override + public void set( int offset, byte[] values ) { + set( offset, values, 0, values.length ); + } + + + /** {@inheritDoc} */ + @Override + public void set( int offset, byte[] values, int valOffset, int length ) { + if ( offset < 0 || offset + length > _pos ) { + throw new ArrayIndexOutOfBoundsException( offset ); + } + System.arraycopy( values, valOffset, _data, offset, length ); + } + + + /** + * Sets the value at the specified offset without doing any bounds checking. + */ + public void setQuick( int offset, byte val ) { + _data[ offset ] = val; + } + + + /** {@inheritDoc} */ + @Override + public void clear() { + clear( DEFAULT_CAPACITY ); + } + + + /** + * Flushes the internal state of the list, setting the capacity of the empty list to + * capacity. + */ + public void clear( int capacity ) { + _data = new byte[ capacity ]; + _pos = 0; + } + + + /** + * Sets the size of the list to 0, but does not change its capacity. This method can + * be used as an alternative to the {@link #clear()} method if you want to recycle a + * list without allocating new backing arrays. + */ + public void reset() { + _pos = 0; + Arrays.fill( _data, no_entry_value ); + } + + + /** + * Sets the size of the list to 0, but does not change its capacity. This method can + * be used as an alternative to the {@link #clear()} method if you want to recycle a + * list without allocating new backing arrays. This method differs from + * {@link #reset()} in that it does not clear the old values in the backing array. + * Thus, it is possible for getQuick to return stale data if this method is used and + * the caller is careless about bounds checking. + */ + public void resetQuick() { + _pos = 0; + } + + + /** {@inheritDoc} */ + @Override + public boolean remove( byte value ) { + for ( int index = 0; index < _pos; index++ ) { + if ( value == _data[index] ) { + remove( index, 1 ); + return true; + } + } + return false; + } + + + /** {@inheritDoc} */ + @Override + public byte removeAt( int offset ) { + byte old = get( offset ); + remove( offset, 1 ); + return old; + } + + + /** {@inheritDoc} */ + @Override + public void remove( int offset, int length ) { + if ( offset < 0 || offset >= _pos ) { + throw new ArrayIndexOutOfBoundsException(offset); + } + + if ( offset == 0 ) { + // data at the front + System.arraycopy( _data, length, _data, 0, _pos - length ); + } + else if ( _pos - length == offset ) { + // no copy to make, decrementing pos "deletes" values at + // the end + } + else { + // data in the middle + System.arraycopy( _data, offset + length, _data, offset, + _pos - ( offset + length ) ); + } + _pos -= length; + // no need to clear old values beyond _pos, because this is a + // primitive collection and 0 takes as much room as any other + // value + } + + + /** {@inheritDoc} */ + @Override + public TByteIterator iterator() { + return new TByteArrayIterator( 0 ); + } + + + /** {@inheritDoc} */ + @Override + public boolean containsAll( Collection collection ) { + for ( Object element : collection ) { + if ( element instanceof Byte ) { + byte c = ( ( Byte ) element ).byteValue(); + if ( ! contains( c ) ) { + return false; + } + } else { + return false; + } + + } + return true; + } + + + /** {@inheritDoc} */ + @Override + public boolean containsAll( TByteCollection collection ) { + if ( this == collection ) { + return true; + } + TByteIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + byte element = iter.next(); + if ( ! contains( element ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + @Override + public boolean containsAll( byte[] array ) { + for ( int i = array.length; i-- > 0; ) { + if ( ! contains( array[i] ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + @Override + public boolean addAll( Collection collection ) { + boolean changed = false; + for ( Byte element : collection ) { + byte e = element.byteValue(); + if ( add( e ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + @Override + public boolean addAll( TByteCollection collection ) { + boolean changed = false; + TByteIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + byte element = iter.next(); + if ( add( element ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + @Override + public boolean addAll( byte[] array ) { + boolean changed = false; + for ( byte element : array ) { + if ( add( element ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + @Override + @SuppressWarnings({"SuspiciousMethodCalls"}) + public boolean retainAll( Collection collection ) { + boolean modified = false; + TByteIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( Byte.valueOf ( iter.next() ) ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + @Override + public boolean retainAll( TByteCollection collection ) { + if ( this == collection ) { + return false; + } + boolean modified = false; + TByteIterator iter = iterator(); + while ( iter.hasNext() ) { + if ( ! collection.contains( iter.next() ) ) { + iter.remove(); + modified = true; + } + } + return modified; + } + + + /** {@inheritDoc} */ + @Override + public boolean retainAll( byte[] array ) { + boolean changed = false; + Arrays.sort( array ); + byte[] data = _data; + + for ( int i = data.length; i-- > 0; ) { + if ( Arrays.binarySearch( array, data[i] ) < 0 ) { + remove( i, 1 ); + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + @Override + public boolean removeAll( Collection collection ) { + boolean changed = false; + for ( Object element : collection ) { + if ( element instanceof Byte ) { + byte c = ( ( Byte ) element ).byteValue(); + if ( remove( c ) ) { + changed = true; + } + } + } + return changed; + } + + + /** {@inheritDoc} */ + @Override + public boolean removeAll( TByteCollection collection ) { + if ( collection == this ) { + clear(); + return true; + } + boolean changed = false; + TByteIterator iter = collection.iterator(); + while ( iter.hasNext() ) { + byte element = iter.next(); + if ( remove( element ) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + @Override + public boolean removeAll( byte[] array ) { + boolean changed = false; + for ( int i = array.length; i-- > 0; ) { + if ( remove(array[i]) ) { + changed = true; + } + } + return changed; + } + + + /** {@inheritDoc} */ + @Override + public void transformValues( TByteFunction function ) { + for ( int i = _pos; i-- > 0; ) { + _data[ i ] = function.execute( _data[ i ] ); + } + } + + + /** {@inheritDoc} */ + @Override + public void reverse() { + reverse( 0, _pos ); + } + + + /** {@inheritDoc} */ + @Override + public void reverse( int from, int to ) { + if ( from == to ) { + return; // nothing to do + } + if ( from > to ) { + throw new IllegalArgumentException( "from cannot be greater than to" ); + } + for ( int i = from, j = to - 1; i < j; i++, j-- ) { + swap( i, j ); + } + } + + + /** {@inheritDoc} */ + @Override + public void shuffle( Random rand ) { + for ( int i = _pos; i-- > 1; ) { + swap( i, rand.nextInt( i ) ); + } + } + + + /** + * Swap the values at offsets i and j. + * + * @param i an offset into the data array + * @param j an offset into the data array + */ + private void swap( int i, int j ) { + byte tmp = _data[ i ]; + _data[ i ] = _data[ j ]; + _data[ j ] = tmp; + } + + + // copying + + /** {@inheritDoc} */ + @Override + public TByteList subList( int begin, int end ) { + if ( end < begin ) { + throw new IllegalArgumentException( "end index " + end + + " greater than begin index " + begin ); + } + if ( begin < 0 ) { + throw new IndexOutOfBoundsException( "begin index can not be < 0" ); + } + if ( end > _data.length ) { + throw new IndexOutOfBoundsException( "end index < " + _data.length ); + } + TByteArrayList list = new TByteArrayList( end - begin ); + for ( int i = begin; i < end; i++ ) { + list.add( _data[ i ] ); + } + return list; + } + + + /** {@inheritDoc} */ + @Override + public byte[] toArray() { + return toArray( 0, _pos ); + } + + + /** {@inheritDoc} */ + @Override + public byte[] toArray( int offset, int len ) { + byte[] rv = new byte[ len ]; + toArray( rv, offset, len ); + return rv; + } + + + /** {@inheritDoc} */ + @Override + public byte[] toArray( byte[] dest ) { + int len = dest.length; + if ( dest.length > _pos ) { + len = _pos; + dest[len] = no_entry_value; + } + toArray( dest, 0, len ); + return dest; + } + + + /** {@inheritDoc} */ + @Override + public byte[] toArray( byte[] dest, int offset, int len ) { + if ( len == 0 ) { + return dest; // nothing to copy + } + if ( offset < 0 || offset >= _pos ) { + throw new ArrayIndexOutOfBoundsException( offset ); + } + System.arraycopy( _data, offset, dest, 0, len ); + return dest; + } + + + /** {@inheritDoc} */ + @Override + public byte[] toArray( byte[] dest, int source_pos, int dest_pos, int len ) { + if ( len == 0 ) { + return dest; // nothing to copy + } + if ( source_pos < 0 || source_pos >= _pos ) { + throw new ArrayIndexOutOfBoundsException( source_pos ); + } + System.arraycopy( _data, source_pos, dest, dest_pos, len ); + return dest; + } + + + // comparing + + /** {@inheritDoc} */ + @Override + public boolean equals( Object other ) { + if ( other == this ) { + return true; + } + else if ( other instanceof TByteArrayList ) { + TByteArrayList that = ( TByteArrayList )other; + if ( that.size() != this.size() ) return false; + else { + for ( int i = _pos; i-- > 0; ) { + if ( this._data[ i ] != that._data[ i ] ) { + return false; + } + } + return true; + } + } + else return false; + } + + + /** {@inheritDoc} */ + @Override + public int hashCode() { + int h = 0; + for ( int i = _pos; i-- > 0; ) { + h += HashFunctions.hash( _data[ i ] ); + } + return h; + } + + + // procedures + + /** {@inheritDoc} */ + @Override + public boolean forEach( TByteProcedure procedure ) { + for ( int i = 0; i < _pos; i++ ) { + if ( !procedure.execute( _data[ i ] ) ) { + return false; + } + } + return true; + } + + + /** {@inheritDoc} */ + @Override + public boolean forEachDescending( TByteProcedure procedure ) { + for ( int i = _pos; i-- > 0; ) { + if ( !procedure.execute( _data[ i ] ) ) { + return false; + } + } + return true; + } + + + // sorting + + /** {@inheritDoc} */ + @Override + public void sort() { + Arrays.sort( _data, 0, _pos ); + } + + + /** {@inheritDoc} */ + @Override + public void sort( int fromIndex, int toIndex ) { + Arrays.sort( _data, fromIndex, toIndex ); + } + + + // filling + + /** {@inheritDoc} */ + @Override + public void fill( byte val ) { + Arrays.fill( _data, 0, _pos, val ); + } + + + /** {@inheritDoc} */ + @Override + public void fill( int fromIndex, int toIndex, byte val ) { + if ( toIndex > _pos ) { + ensureCapacity( toIndex ); + _pos = toIndex; + } + Arrays.fill( _data, fromIndex, toIndex, val ); + } + + + // searching + + /** {@inheritDoc} */ + @Override + public int binarySearch( byte value ) { + return binarySearch( value, 0, _pos ); + } + + + /** {@inheritDoc} */ + @Override + public int binarySearch(byte value, int fromIndex, int toIndex) { + if ( fromIndex < 0 ) { + throw new ArrayIndexOutOfBoundsException( fromIndex ); + } + if ( toIndex > _pos ) { + throw new ArrayIndexOutOfBoundsException( toIndex ); + } + + int low = fromIndex; + int high = toIndex - 1; + + while ( low <= high ) { + int mid = ( low + high ) >>> 1; + byte midVal = _data[ mid ]; + + if ( midVal < value ) { + low = mid + 1; + } + else if ( midVal > value ) { + high = mid - 1; + } + else { + return mid; // value found + } + } + return -( low + 1 ); // value not found. + } + + + /** {@inheritDoc} */ + @Override + public int indexOf( byte value ) { + return indexOf( 0, value ); + } + + + /** {@inheritDoc} */ + @Override + public int indexOf( int offset, byte value ) { + for ( int i = offset; i < _pos; i++ ) { + if ( _data[ i ] == value ) { + return i; + } + } + return -1; + } + + + /** {@inheritDoc} */ + @Override + public int lastIndexOf( byte value ) { + return lastIndexOf( _pos, value ); + } + + + /** {@inheritDoc} */ + @Override + public int lastIndexOf( int offset, byte value ) { + for ( int i = offset; i-- > 0; ) { + if ( _data[ i ] == value ) { + return i; + } + } + return -1; + } + + + /** {@inheritDoc} */ + @Override + public boolean contains( byte value ) { + return lastIndexOf( value ) >= 0; + } + + + /** {@inheritDoc} */ + @Override + public TByteList grep( TByteProcedure condition ) { + TByteArrayList list = new TByteArrayList(); + for ( int i = 0; i < _pos; i++ ) { + if ( condition.execute( _data[ i ] ) ) { + list.add( _data[ i ] ); + } + } + return list; + } + + + /** {@inheritDoc} */ + @Override + public TByteList inverseGrep( TByteProcedure condition ) { + TByteArrayList list = new TByteArrayList(); + for ( int i = 0; i < _pos; i++ ) { + if ( !condition.execute( _data[ i ] ) ) { + list.add( _data[ i ] ); + } + } + return list; + } + + + /** {@inheritDoc} */ + @Override + public byte max() { + if ( size() == 0 ) { + throw new IllegalStateException("cannot find maximum of an empty list"); + } + byte max = Byte.MIN_VALUE; + for ( int i = 0; i < _pos; i++ ) { + if ( _data[ i ] > max ) { + max = _data[ i ]; + } + } + return max; + } + + + /** {@inheritDoc} */ + @Override + public byte min() { + if ( size() == 0 ) { + throw new IllegalStateException( "cannot find minimum of an empty list" ); + } + byte min = Byte.MAX_VALUE; + for ( int i = 0; i < _pos; i++ ) { + if ( _data[i] < min ) { + min = _data[i]; + } + } + return min; + } + + + // stringification + + /** {@inheritDoc} */ + @Override + public String toString() { + final StringBuilder buf = new StringBuilder( "{" ); + for ( int i = 0, end = _pos - 1; i < end; i++ ) { + buf.append( _data[ i ] ); + buf.append( ", " ); + } + if ( size() > 0 ) { + buf.append( _data[ _pos - 1 ] ); + } + buf.append( "}" ); + return buf.toString(); + } + + + /** TByteArrayList iterator */ + class TByteArrayIterator implements TByteIterator { + + /** Index of element to be returned by subsequent call to next. */ + private int cursor = 0; + + /** + * Index of element returned by most recent call to next or + * previous. Reset to -1 if this element is deleted by a call + * to remove. + */ + int lastRet = -1; + + + TByteArrayIterator( int index ) { + cursor = index; + } + + + /** {@inheritDoc} */ + @Override + public boolean hasNext() { + return cursor < size(); + } + + + /** {@inheritDoc} */ + @Override + public byte next() { + try { + byte next = get( cursor ); + lastRet = cursor++; + return next; + } catch ( IndexOutOfBoundsException e ) { + throw new NoSuchElementException(); + } + } + + + /** {@inheritDoc} */ + @Override + public void remove() { + if ( lastRet == -1 ) + throw new IllegalStateException(); + + try { + TByteArrayList.this.remove( lastRet, 1); + if ( lastRet < cursor ) + cursor--; + lastRet = -1; + } catch ( IndexOutOfBoundsException e ) { + throw new ConcurrentModificationException(); + } + } + } + + + @Override + public void writeExternal( ObjectOutput out ) throws IOException { + // VERSION + out.writeByte( 0 ); + + // POSITION + out.writeInt( _pos ); + + // NO_ENTRY_VALUE + out.writeByte( no_entry_value ); + + // ENTRIES + int len = _data.length; + out.writeInt( len ); + for( int i = 0; i < len; i++ ) { + out.writeByte( _data[ i ] ); + } + } + + + @Override + public void readExternal( ObjectInput in ) + throws IOException, ClassNotFoundException { + + // VERSION + in.readByte(); + + // POSITION + _pos = in.readInt(); + + // NO_ENTRY_VALUE + no_entry_value = in.readByte(); + + // ENTRIES + int len = in.readInt(); + _data = new byte[ len ]; + for( int i = 0; i < len; i++ ) { + _data[ i ] = in.readByte(); + } + } +} // TByteArrayList diff --git a/DataExtractionOSM/src/net/osmand/binary/OsmandOdb.java b/DataExtractionOSM/src/net/osmand/binary/OsmandOdb.java index b840c4de32..26e4e37f6e 100644 --- a/DataExtractionOSM/src/net/osmand/binary/OsmandOdb.java +++ b/DataExtractionOSM/src/net/osmand/binary/OsmandOdb.java @@ -8,67 +8,11 @@ public final class OsmandOdb { public static void registerAllExtensions( com.google.protobuf.ExtensionRegistry registry) { } - public interface OsmAndStructureOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required uint32 version = 1; - boolean hasVersion(); - int getVersion(); - - // required int64 dateCreated = 18; - boolean hasDateCreated(); - long getDateCreated(); - - // repeated .OsmAndAddressIndex addressIndex = 7; - java.util.List - getAddressIndexList(); - net.osmand.binary.OsmandOdb.OsmAndAddressIndex getAddressIndex(int index); - int getAddressIndexCount(); - java.util.List - getAddressIndexOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndAddressIndexOrBuilder getAddressIndexOrBuilder( - int index); - - // repeated .OsmAndTransportIndex transportIndex = 4; - java.util.List - getTransportIndexList(); - net.osmand.binary.OsmandOdb.OsmAndTransportIndex getTransportIndex(int index); - int getTransportIndexCount(); - java.util.List - getTransportIndexOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndTransportIndexOrBuilder getTransportIndexOrBuilder( - int index); - - // repeated .OsmAndPoiIndex poiIndex = 8; - java.util.List - getPoiIndexList(); - net.osmand.binary.OsmandOdb.OsmAndPoiIndex getPoiIndex(int index); - int getPoiIndexCount(); - java.util.List - getPoiIndexOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndPoiIndexOrBuilder getPoiIndexOrBuilder( - int index); - - // repeated .OsmAndMapIndex mapIndex = 6; - java.util.List - getMapIndexList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex getMapIndex(int index); - int getMapIndexCount(); - java.util.List - getMapIndexOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndexOrBuilder getMapIndexOrBuilder( - int index); - - // required uint32 versionConfirm = 32; - boolean hasVersionConfirm(); - int getVersionConfirm(); - } public static final class OsmAndStructure extends - com.google.protobuf.GeneratedMessage - implements OsmAndStructureOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndStructure.newBuilder() to construct. - private OsmAndStructure(Builder builder) { - super(builder); + private OsmAndStructure() { + initFields(); } private OsmAndStructure(boolean noInit) {} @@ -77,7 +21,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndStructure getDefaultInstanceForType() { + @Override + public OsmAndStructure getDefaultInstanceForType() { return defaultInstance; } @@ -86,253 +31,171 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndStructure_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndStructure_fieldAccessorTable; } - private int bitField0_; // required uint32 version = 1; public static final int VERSION_FIELD_NUMBER = 1; - private int version_; - public boolean hasVersion() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getVersion() { - return version_; - } + private boolean hasVersion; + private int version_ = 0; + public boolean hasVersion() { return hasVersion; } + public int getVersion() { return version_; } // required int64 dateCreated = 18; public static final int DATECREATED_FIELD_NUMBER = 18; - private long dateCreated_; - public boolean hasDateCreated() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public long getDateCreated() { - return dateCreated_; - } + private boolean hasDateCreated; + private long dateCreated_ = 0L; + public boolean hasDateCreated() { return hasDateCreated; } + public long getDateCreated() { return dateCreated_; } // repeated .OsmAndAddressIndex addressIndex = 7; public static final int ADDRESSINDEX_FIELD_NUMBER = 7; - private java.util.List addressIndex_; + private java.util.List addressIndex_ = + java.util.Collections.emptyList(); public java.util.List getAddressIndexList() { return addressIndex_; } - public java.util.List - getAddressIndexOrBuilderList() { - return addressIndex_; - } - public int getAddressIndexCount() { - return addressIndex_.size(); - } + public int getAddressIndexCount() { return addressIndex_.size(); } public net.osmand.binary.OsmandOdb.OsmAndAddressIndex getAddressIndex(int index) { return addressIndex_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndexOrBuilder getAddressIndexOrBuilder( - int index) { - return addressIndex_.get(index); - } // repeated .OsmAndTransportIndex transportIndex = 4; public static final int TRANSPORTINDEX_FIELD_NUMBER = 4; - private java.util.List transportIndex_; + private java.util.List transportIndex_ = + java.util.Collections.emptyList(); public java.util.List getTransportIndexList() { return transportIndex_; } - public java.util.List - getTransportIndexOrBuilderList() { - return transportIndex_; - } - public int getTransportIndexCount() { - return transportIndex_.size(); - } + public int getTransportIndexCount() { return transportIndex_.size(); } public net.osmand.binary.OsmandOdb.OsmAndTransportIndex getTransportIndex(int index) { return transportIndex_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndTransportIndexOrBuilder getTransportIndexOrBuilder( - int index) { - return transportIndex_.get(index); - } // repeated .OsmAndPoiIndex poiIndex = 8; public static final int POIINDEX_FIELD_NUMBER = 8; - private java.util.List poiIndex_; + private java.util.List poiIndex_ = + java.util.Collections.emptyList(); public java.util.List getPoiIndexList() { return poiIndex_; } - public java.util.List - getPoiIndexOrBuilderList() { - return poiIndex_; - } - public int getPoiIndexCount() { - return poiIndex_.size(); - } + public int getPoiIndexCount() { return poiIndex_.size(); } public net.osmand.binary.OsmandOdb.OsmAndPoiIndex getPoiIndex(int index) { return poiIndex_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndPoiIndexOrBuilder getPoiIndexOrBuilder( - int index) { - return poiIndex_.get(index); - } // repeated .OsmAndMapIndex mapIndex = 6; public static final int MAPINDEX_FIELD_NUMBER = 6; - private java.util.List mapIndex_; + private java.util.List mapIndex_ = + java.util.Collections.emptyList(); public java.util.List getMapIndexList() { return mapIndex_; } - public java.util.List - getMapIndexOrBuilderList() { - return mapIndex_; - } - public int getMapIndexCount() { - return mapIndex_.size(); - } + public int getMapIndexCount() { return mapIndex_.size(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex getMapIndex(int index) { return mapIndex_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndexOrBuilder getMapIndexOrBuilder( - int index) { - return mapIndex_.get(index); - } // required uint32 versionConfirm = 32; public static final int VERSIONCONFIRM_FIELD_NUMBER = 32; - private int versionConfirm_; - public boolean hasVersionConfirm() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getVersionConfirm() { - return versionConfirm_; - } + private boolean hasVersionConfirm; + private int versionConfirm_ = 0; + public boolean hasVersionConfirm() { return hasVersionConfirm; } + public int getVersionConfirm() { return versionConfirm_; } private void initFields() { - version_ = 0; - dateCreated_ = 0L; - addressIndex_ = java.util.Collections.emptyList(); - transportIndex_ = java.util.Collections.emptyList(); - poiIndex_ = java.util.Collections.emptyList(); - mapIndex_ = java.util.Collections.emptyList(); - versionConfirm_ = 0; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasVersion()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasVersion) return false; + if (!hasDateCreated) return false; + if (!hasVersionConfirm) return false; + for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex element : getAddressIndexList()) { + if (!element.isInitialized()) return false; } - if (!hasDateCreated()) { - memoizedIsInitialized = 0; - return false; + for (net.osmand.binary.OsmandOdb.OsmAndTransportIndex element : getTransportIndexList()) { + if (!element.isInitialized()) return false; } - if (!hasVersionConfirm()) { - memoizedIsInitialized = 0; - return false; + for (net.osmand.binary.OsmandOdb.OsmAndPoiIndex element : getPoiIndexList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getAddressIndexCount(); i++) { - if (!getAddressIndex(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex element : getMapIndexList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getTransportIndexCount(); i++) { - if (!getTransportIndex(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getPoiIndexCount(); i++) { - if (!getPoiIndex(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getMapIndexCount(); i++) { - if (!getMapIndex(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, version_); + if (hasVersion()) { + output.writeUInt32(1, getVersion()); } - for (int i = 0; i < transportIndex_.size(); i++) { - output.writeMessage(4, transportIndex_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndTransportIndex element : getTransportIndexList()) { + output.writeMessage(4, element); } - for (int i = 0; i < mapIndex_.size(); i++) { - output.writeMessage(6, mapIndex_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex element : getMapIndexList()) { + output.writeMessage(6, element); } - for (int i = 0; i < addressIndex_.size(); i++) { - output.writeMessage(7, addressIndex_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex element : getAddressIndexList()) { + output.writeMessage(7, element); } - for (int i = 0; i < poiIndex_.size(); i++) { - output.writeMessage(8, poiIndex_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndPoiIndex element : getPoiIndexList()) { + output.writeMessage(8, element); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt64(18, dateCreated_); + if (hasDateCreated()) { + output.writeInt64(18, getDateCreated()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(32, versionConfirm_); + if (hasVersionConfirm()) { + output.writeUInt32(32, getVersionConfirm()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasVersion()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, version_); + .computeUInt32Size(1, getVersion()); } - for (int i = 0; i < transportIndex_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndTransportIndex element : getTransportIndexList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, transportIndex_.get(i)); + .computeMessageSize(4, element); } - for (int i = 0; i < mapIndex_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex element : getMapIndexList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, mapIndex_.get(i)); + .computeMessageSize(6, element); } - for (int i = 0; i < addressIndex_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex element : getAddressIndexList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, addressIndex_.get(i)); + .computeMessageSize(7, element); } - for (int i = 0; i < poiIndex_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndPoiIndex element : getPoiIndexList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, poiIndex_.get(i)); + .computeMessageSize(8, element); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasDateCreated()) { size += com.google.protobuf.CodedOutputStream - .computeInt64Size(18, dateCreated_); + .computeInt64Size(18, getDateCreated()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasVersionConfirm()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(32, versionConfirm_); + .computeUInt32Size(32, getVersionConfirm()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndStructure parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -401,176 +264,108 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndStructure prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndStructureOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndStructure_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndStructure_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndStructure result; // Construct using net.osmand.binary.OsmandOdb.OsmAndStructure.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getAddressIndexFieldBuilder(); - getTransportIndexFieldBuilder(); - getPoiIndexFieldBuilder(); - getMapIndexFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndStructure(); + return builder; } - public Builder clear() { - super.clear(); - version_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - dateCreated_ = 0L; - bitField0_ = (bitField0_ & ~0x00000002); - if (addressIndexBuilder_ == null) { - addressIndex_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - addressIndexBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndStructure internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } - if (transportIndexBuilder_ == null) { - transportIndex_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - transportIndexBuilder_.clear(); - } - if (poiIndexBuilder_ == null) { - poiIndex_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - poiIndexBuilder_.clear(); - } - if (mapIndexBuilder_ == null) { - mapIndex_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - mapIndexBuilder_.clear(); - } - versionConfirm_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); + result = new net.osmand.binary.OsmandOdb.OsmAndStructure(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndStructure.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndStructure getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndStructure getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndStructure.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndStructure build() { - net.osmand.binary.OsmandOdb.OsmAndStructure result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndStructure build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndStructure buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndStructure result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndStructure buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndStructure result = new net.osmand.binary.OsmandOdb.OsmAndStructure(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndStructure buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.version_ = version_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.addressIndex_ != java.util.Collections.EMPTY_LIST) { + result.addressIndex_ = + java.util.Collections.unmodifiableList(result.addressIndex_); } - result.dateCreated_ = dateCreated_; - if (addressIndexBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - addressIndex_ = java.util.Collections.unmodifiableList(addressIndex_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.addressIndex_ = addressIndex_; - } else { - result.addressIndex_ = addressIndexBuilder_.build(); + if (result.transportIndex_ != java.util.Collections.EMPTY_LIST) { + result.transportIndex_ = + java.util.Collections.unmodifiableList(result.transportIndex_); } - if (transportIndexBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - transportIndex_ = java.util.Collections.unmodifiableList(transportIndex_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.transportIndex_ = transportIndex_; - } else { - result.transportIndex_ = transportIndexBuilder_.build(); + if (result.poiIndex_ != java.util.Collections.EMPTY_LIST) { + result.poiIndex_ = + java.util.Collections.unmodifiableList(result.poiIndex_); } - if (poiIndexBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { - poiIndex_ = java.util.Collections.unmodifiableList(poiIndex_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.poiIndex_ = poiIndex_; - } else { - result.poiIndex_ = poiIndexBuilder_.build(); + if (result.mapIndex_ != java.util.Collections.EMPTY_LIST) { + result.mapIndex_ = + java.util.Collections.unmodifiableList(result.mapIndex_); } - if (mapIndexBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - mapIndex_ = java.util.Collections.unmodifiableList(mapIndex_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.mapIndex_ = mapIndex_; - } else { - result.mapIndex_ = mapIndexBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000004; - } - result.versionConfirm_ = versionConfirm_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndStructure returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndStructure) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndStructure)other); } else { @@ -587,109 +382,29 @@ public final class OsmandOdb { if (other.hasDateCreated()) { setDateCreated(other.getDateCreated()); } - if (addressIndexBuilder_ == null) { - if (!other.addressIndex_.isEmpty()) { - if (addressIndex_.isEmpty()) { - addressIndex_ = other.addressIndex_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureAddressIndexIsMutable(); - addressIndex_.addAll(other.addressIndex_); - } - onChanged(); - } - } else { - if (!other.addressIndex_.isEmpty()) { - if (addressIndexBuilder_.isEmpty()) { - addressIndexBuilder_.dispose(); - addressIndexBuilder_ = null; - addressIndex_ = other.addressIndex_; - bitField0_ = (bitField0_ & ~0x00000004); - addressIndexBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getAddressIndexFieldBuilder() : null; - } else { - addressIndexBuilder_.addAllMessages(other.addressIndex_); - } + if (!other.addressIndex_.isEmpty()) { + if (result.addressIndex_.isEmpty()) { + result.addressIndex_ = new java.util.ArrayList(); } + result.addressIndex_.addAll(other.addressIndex_); } - if (transportIndexBuilder_ == null) { - if (!other.transportIndex_.isEmpty()) { - if (transportIndex_.isEmpty()) { - transportIndex_ = other.transportIndex_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureTransportIndexIsMutable(); - transportIndex_.addAll(other.transportIndex_); - } - onChanged(); - } - } else { - if (!other.transportIndex_.isEmpty()) { - if (transportIndexBuilder_.isEmpty()) { - transportIndexBuilder_.dispose(); - transportIndexBuilder_ = null; - transportIndex_ = other.transportIndex_; - bitField0_ = (bitField0_ & ~0x00000008); - transportIndexBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getTransportIndexFieldBuilder() : null; - } else { - transportIndexBuilder_.addAllMessages(other.transportIndex_); - } + if (!other.transportIndex_.isEmpty()) { + if (result.transportIndex_.isEmpty()) { + result.transportIndex_ = new java.util.ArrayList(); } + result.transportIndex_.addAll(other.transportIndex_); } - if (poiIndexBuilder_ == null) { - if (!other.poiIndex_.isEmpty()) { - if (poiIndex_.isEmpty()) { - poiIndex_ = other.poiIndex_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensurePoiIndexIsMutable(); - poiIndex_.addAll(other.poiIndex_); - } - onChanged(); - } - } else { - if (!other.poiIndex_.isEmpty()) { - if (poiIndexBuilder_.isEmpty()) { - poiIndexBuilder_.dispose(); - poiIndexBuilder_ = null; - poiIndex_ = other.poiIndex_; - bitField0_ = (bitField0_ & ~0x00000010); - poiIndexBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getPoiIndexFieldBuilder() : null; - } else { - poiIndexBuilder_.addAllMessages(other.poiIndex_); - } + if (!other.poiIndex_.isEmpty()) { + if (result.poiIndex_.isEmpty()) { + result.poiIndex_ = new java.util.ArrayList(); } + result.poiIndex_.addAll(other.poiIndex_); } - if (mapIndexBuilder_ == null) { - if (!other.mapIndex_.isEmpty()) { - if (mapIndex_.isEmpty()) { - mapIndex_ = other.mapIndex_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureMapIndexIsMutable(); - mapIndex_.addAll(other.mapIndex_); - } - onChanged(); - } - } else { - if (!other.mapIndex_.isEmpty()) { - if (mapIndexBuilder_.isEmpty()) { - mapIndexBuilder_.dispose(); - mapIndexBuilder_ = null; - mapIndex_ = other.mapIndex_; - bitField0_ = (bitField0_ & ~0x00000020); - mapIndexBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getMapIndexFieldBuilder() : null; - } else { - mapIndexBuilder_.addAllMessages(other.mapIndex_); - } + if (!other.mapIndex_.isEmpty()) { + if (result.mapIndex_.isEmpty()) { + result.mapIndex_ = new java.util.ArrayList(); } + result.mapIndex_.addAll(other.mapIndex_); } if (other.hasVersionConfirm()) { setVersionConfirm(other.getVersionConfirm()); @@ -698,47 +413,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasVersion()) { - - return false; - } - if (!hasDateCreated()) { - - return false; - } - if (!hasVersionConfirm()) { - - return false; - } - for (int i = 0; i < getAddressIndexCount(); i++) { - if (!getAddressIndex(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getTransportIndexCount(); i++) { - if (!getTransportIndex(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getPoiIndexCount(); i++) { - if (!getPoiIndex(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getMapIndexCount(); i++) { - if (!getMapIndex(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -750,20 +426,17 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - version_ = input.readUInt32(); + setVersion(input.readUInt32()); break; } case 34: { @@ -791,825 +464,273 @@ public final class OsmandOdb { break; } case 144: { - bitField0_ |= 0x00000002; - dateCreated_ = input.readInt64(); + setDateCreated(input.readInt64()); break; } case 256: { - bitField0_ |= 0x00000040; - versionConfirm_ = input.readUInt32(); + setVersionConfirm(input.readUInt32()); break; } } } } - private int bitField0_; // required uint32 version = 1; - private int version_ ; public boolean hasVersion() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasVersion(); } public int getVersion() { - return version_; + return result.getVersion(); } public Builder setVersion(int value) { - bitField0_ |= 0x00000001; - version_ = value; - onChanged(); + result.hasVersion = true; + result.version_ = value; return this; } public Builder clearVersion() { - bitField0_ = (bitField0_ & ~0x00000001); - version_ = 0; - onChanged(); + result.hasVersion = false; + result.version_ = 0; return this; } // required int64 dateCreated = 18; - private long dateCreated_ ; public boolean hasDateCreated() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasDateCreated(); } public long getDateCreated() { - return dateCreated_; + return result.getDateCreated(); } public Builder setDateCreated(long value) { - bitField0_ |= 0x00000002; - dateCreated_ = value; - onChanged(); + result.hasDateCreated = true; + result.dateCreated_ = value; return this; } public Builder clearDateCreated() { - bitField0_ = (bitField0_ & ~0x00000002); - dateCreated_ = 0L; - onChanged(); + result.hasDateCreated = false; + result.dateCreated_ = 0L; return this; } // repeated .OsmAndAddressIndex addressIndex = 7; - private java.util.List addressIndex_ = - java.util.Collections.emptyList(); - private void ensureAddressIndexIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - addressIndex_ = new java.util.ArrayList(addressIndex_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressIndex, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressIndexOrBuilder> addressIndexBuilder_; - public java.util.List getAddressIndexList() { - if (addressIndexBuilder_ == null) { - return java.util.Collections.unmodifiableList(addressIndex_); - } else { - return addressIndexBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.addressIndex_); } public int getAddressIndexCount() { - if (addressIndexBuilder_ == null) { - return addressIndex_.size(); - } else { - return addressIndexBuilder_.getCount(); - } + return result.getAddressIndexCount(); } public net.osmand.binary.OsmandOdb.OsmAndAddressIndex getAddressIndex(int index) { - if (addressIndexBuilder_ == null) { - return addressIndex_.get(index); - } else { - return addressIndexBuilder_.getMessage(index); - } + return result.getAddressIndex(index); } - public Builder setAddressIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex value) { - if (addressIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAddressIndexIsMutable(); - addressIndex_.set(index, value); - onChanged(); - } else { - addressIndexBuilder_.setMessage(index, value); + public Builder setAddressIndex(int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.addressIndex_.set(index, value); return this; } - public Builder setAddressIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder builderForValue) { - if (addressIndexBuilder_ == null) { - ensureAddressIndexIsMutable(); - addressIndex_.set(index, builderForValue.build()); - onChanged(); - } else { - addressIndexBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setAddressIndex(int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder builderForValue) { + result.addressIndex_.set(index, builderForValue.build()); return this; } public Builder addAddressIndex(net.osmand.binary.OsmandOdb.OsmAndAddressIndex value) { - if (addressIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAddressIndexIsMutable(); - addressIndex_.add(value); - onChanged(); - } else { - addressIndexBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.addressIndex_.isEmpty()) { + result.addressIndex_ = new java.util.ArrayList(); + } + result.addressIndex_.add(value); return this; } - public Builder addAddressIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex value) { - if (addressIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAddressIndexIsMutable(); - addressIndex_.add(index, value); - onChanged(); - } else { - addressIndexBuilder_.addMessage(index, value); - } - return this; - } - public Builder addAddressIndex( - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder builderForValue) { - if (addressIndexBuilder_ == null) { - ensureAddressIndexIsMutable(); - addressIndex_.add(builderForValue.build()); - onChanged(); - } else { - addressIndexBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addAddressIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder builderForValue) { - if (addressIndexBuilder_ == null) { - ensureAddressIndexIsMutable(); - addressIndex_.add(index, builderForValue.build()); - onChanged(); - } else { - addressIndexBuilder_.addMessage(index, builderForValue.build()); + public Builder addAddressIndex(net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder builderForValue) { + if (result.addressIndex_.isEmpty()) { + result.addressIndex_ = new java.util.ArrayList(); } + result.addressIndex_.add(builderForValue.build()); return this; } public Builder addAllAddressIndex( java.lang.Iterable values) { - if (addressIndexBuilder_ == null) { - ensureAddressIndexIsMutable(); - super.addAll(values, addressIndex_); - onChanged(); - } else { - addressIndexBuilder_.addAllMessages(values); + if (result.addressIndex_.isEmpty()) { + result.addressIndex_ = new java.util.ArrayList(); } + super.addAll(values, result.addressIndex_); return this; } public Builder clearAddressIndex() { - if (addressIndexBuilder_ == null) { - addressIndex_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - addressIndexBuilder_.clear(); - } + result.addressIndex_ = java.util.Collections.emptyList(); return this; } - public Builder removeAddressIndex(int index) { - if (addressIndexBuilder_ == null) { - ensureAddressIndexIsMutable(); - addressIndex_.remove(index); - onChanged(); - } else { - addressIndexBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder getAddressIndexBuilder( - int index) { - return getAddressIndexFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndexOrBuilder getAddressIndexOrBuilder( - int index) { - if (addressIndexBuilder_ == null) { - return addressIndex_.get(index); } else { - return addressIndexBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getAddressIndexOrBuilderList() { - if (addressIndexBuilder_ != null) { - return addressIndexBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(addressIndex_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder addAddressIndexBuilder() { - return getAddressIndexFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder addAddressIndexBuilder( - int index) { - return getAddressIndexFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.getDefaultInstance()); - } - public java.util.List - getAddressIndexBuilderList() { - return getAddressIndexFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressIndex, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressIndexOrBuilder> - getAddressIndexFieldBuilder() { - if (addressIndexBuilder_ == null) { - addressIndexBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressIndex, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressIndexOrBuilder>( - addressIndex_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - addressIndex_ = null; - } - return addressIndexBuilder_; - } // repeated .OsmAndTransportIndex transportIndex = 4; - private java.util.List transportIndex_ = - java.util.Collections.emptyList(); - private void ensureTransportIndexIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - transportIndex_ = new java.util.ArrayList(transportIndex_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTransportIndex, net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndTransportIndexOrBuilder> transportIndexBuilder_; - public java.util.List getTransportIndexList() { - if (transportIndexBuilder_ == null) { - return java.util.Collections.unmodifiableList(transportIndex_); - } else { - return transportIndexBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.transportIndex_); } public int getTransportIndexCount() { - if (transportIndexBuilder_ == null) { - return transportIndex_.size(); - } else { - return transportIndexBuilder_.getCount(); - } + return result.getTransportIndexCount(); } public net.osmand.binary.OsmandOdb.OsmAndTransportIndex getTransportIndex(int index) { - if (transportIndexBuilder_ == null) { - return transportIndex_.get(index); - } else { - return transportIndexBuilder_.getMessage(index); - } + return result.getTransportIndex(index); } - public Builder setTransportIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex value) { - if (transportIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransportIndexIsMutable(); - transportIndex_.set(index, value); - onChanged(); - } else { - transportIndexBuilder_.setMessage(index, value); + public Builder setTransportIndex(int index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.transportIndex_.set(index, value); return this; } - public Builder setTransportIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder builderForValue) { - if (transportIndexBuilder_ == null) { - ensureTransportIndexIsMutable(); - transportIndex_.set(index, builderForValue.build()); - onChanged(); - } else { - transportIndexBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setTransportIndex(int index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder builderForValue) { + result.transportIndex_.set(index, builderForValue.build()); return this; } public Builder addTransportIndex(net.osmand.binary.OsmandOdb.OsmAndTransportIndex value) { - if (transportIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransportIndexIsMutable(); - transportIndex_.add(value); - onChanged(); - } else { - transportIndexBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.transportIndex_.isEmpty()) { + result.transportIndex_ = new java.util.ArrayList(); + } + result.transportIndex_.add(value); return this; } - public Builder addTransportIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex value) { - if (transportIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureTransportIndexIsMutable(); - transportIndex_.add(index, value); - onChanged(); - } else { - transportIndexBuilder_.addMessage(index, value); - } - return this; - } - public Builder addTransportIndex( - net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder builderForValue) { - if (transportIndexBuilder_ == null) { - ensureTransportIndexIsMutable(); - transportIndex_.add(builderForValue.build()); - onChanged(); - } else { - transportIndexBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addTransportIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder builderForValue) { - if (transportIndexBuilder_ == null) { - ensureTransportIndexIsMutable(); - transportIndex_.add(index, builderForValue.build()); - onChanged(); - } else { - transportIndexBuilder_.addMessage(index, builderForValue.build()); + public Builder addTransportIndex(net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder builderForValue) { + if (result.transportIndex_.isEmpty()) { + result.transportIndex_ = new java.util.ArrayList(); } + result.transportIndex_.add(builderForValue.build()); return this; } public Builder addAllTransportIndex( java.lang.Iterable values) { - if (transportIndexBuilder_ == null) { - ensureTransportIndexIsMutable(); - super.addAll(values, transportIndex_); - onChanged(); - } else { - transportIndexBuilder_.addAllMessages(values); + if (result.transportIndex_.isEmpty()) { + result.transportIndex_ = new java.util.ArrayList(); } + super.addAll(values, result.transportIndex_); return this; } public Builder clearTransportIndex() { - if (transportIndexBuilder_ == null) { - transportIndex_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - transportIndexBuilder_.clear(); - } + result.transportIndex_ = java.util.Collections.emptyList(); return this; } - public Builder removeTransportIndex(int index) { - if (transportIndexBuilder_ == null) { - ensureTransportIndexIsMutable(); - transportIndex_.remove(index); - onChanged(); - } else { - transportIndexBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder getTransportIndexBuilder( - int index) { - return getTransportIndexFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndTransportIndexOrBuilder getTransportIndexOrBuilder( - int index) { - if (transportIndexBuilder_ == null) { - return transportIndex_.get(index); } else { - return transportIndexBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getTransportIndexOrBuilderList() { - if (transportIndexBuilder_ != null) { - return transportIndexBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(transportIndex_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder addTransportIndexBuilder() { - return getTransportIndexFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndTransportIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder addTransportIndexBuilder( - int index) { - return getTransportIndexFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndTransportIndex.getDefaultInstance()); - } - public java.util.List - getTransportIndexBuilderList() { - return getTransportIndexFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTransportIndex, net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndTransportIndexOrBuilder> - getTransportIndexFieldBuilder() { - if (transportIndexBuilder_ == null) { - transportIndexBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTransportIndex, net.osmand.binary.OsmandOdb.OsmAndTransportIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndTransportIndexOrBuilder>( - transportIndex_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - transportIndex_ = null; - } - return transportIndexBuilder_; - } // repeated .OsmAndPoiIndex poiIndex = 8; - private java.util.List poiIndex_ = - java.util.Collections.emptyList(); - private void ensurePoiIndexIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - poiIndex_ = new java.util.ArrayList(poiIndex_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiIndex, net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiIndexOrBuilder> poiIndexBuilder_; - public java.util.List getPoiIndexList() { - if (poiIndexBuilder_ == null) { - return java.util.Collections.unmodifiableList(poiIndex_); - } else { - return poiIndexBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.poiIndex_); } public int getPoiIndexCount() { - if (poiIndexBuilder_ == null) { - return poiIndex_.size(); - } else { - return poiIndexBuilder_.getCount(); - } + return result.getPoiIndexCount(); } public net.osmand.binary.OsmandOdb.OsmAndPoiIndex getPoiIndex(int index) { - if (poiIndexBuilder_ == null) { - return poiIndex_.get(index); - } else { - return poiIndexBuilder_.getMessage(index); - } + return result.getPoiIndex(index); } - public Builder setPoiIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex value) { - if (poiIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiIndexIsMutable(); - poiIndex_.set(index, value); - onChanged(); - } else { - poiIndexBuilder_.setMessage(index, value); + public Builder setPoiIndex(int index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.poiIndex_.set(index, value); return this; } - public Builder setPoiIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder builderForValue) { - if (poiIndexBuilder_ == null) { - ensurePoiIndexIsMutable(); - poiIndex_.set(index, builderForValue.build()); - onChanged(); - } else { - poiIndexBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setPoiIndex(int index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder builderForValue) { + result.poiIndex_.set(index, builderForValue.build()); return this; } public Builder addPoiIndex(net.osmand.binary.OsmandOdb.OsmAndPoiIndex value) { - if (poiIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiIndexIsMutable(); - poiIndex_.add(value); - onChanged(); - } else { - poiIndexBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.poiIndex_.isEmpty()) { + result.poiIndex_ = new java.util.ArrayList(); + } + result.poiIndex_.add(value); return this; } - public Builder addPoiIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex value) { - if (poiIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiIndexIsMutable(); - poiIndex_.add(index, value); - onChanged(); - } else { - poiIndexBuilder_.addMessage(index, value); - } - return this; - } - public Builder addPoiIndex( - net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder builderForValue) { - if (poiIndexBuilder_ == null) { - ensurePoiIndexIsMutable(); - poiIndex_.add(builderForValue.build()); - onChanged(); - } else { - poiIndexBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addPoiIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder builderForValue) { - if (poiIndexBuilder_ == null) { - ensurePoiIndexIsMutable(); - poiIndex_.add(index, builderForValue.build()); - onChanged(); - } else { - poiIndexBuilder_.addMessage(index, builderForValue.build()); + public Builder addPoiIndex(net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder builderForValue) { + if (result.poiIndex_.isEmpty()) { + result.poiIndex_ = new java.util.ArrayList(); } + result.poiIndex_.add(builderForValue.build()); return this; } public Builder addAllPoiIndex( java.lang.Iterable values) { - if (poiIndexBuilder_ == null) { - ensurePoiIndexIsMutable(); - super.addAll(values, poiIndex_); - onChanged(); - } else { - poiIndexBuilder_.addAllMessages(values); + if (result.poiIndex_.isEmpty()) { + result.poiIndex_ = new java.util.ArrayList(); } + super.addAll(values, result.poiIndex_); return this; } public Builder clearPoiIndex() { - if (poiIndexBuilder_ == null) { - poiIndex_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - poiIndexBuilder_.clear(); - } + result.poiIndex_ = java.util.Collections.emptyList(); return this; } - public Builder removePoiIndex(int index) { - if (poiIndexBuilder_ == null) { - ensurePoiIndexIsMutable(); - poiIndex_.remove(index); - onChanged(); - } else { - poiIndexBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder getPoiIndexBuilder( - int index) { - return getPoiIndexFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiIndexOrBuilder getPoiIndexOrBuilder( - int index) { - if (poiIndexBuilder_ == null) { - return poiIndex_.get(index); } else { - return poiIndexBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getPoiIndexOrBuilderList() { - if (poiIndexBuilder_ != null) { - return poiIndexBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(poiIndex_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder addPoiIndexBuilder() { - return getPoiIndexFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndPoiIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder addPoiIndexBuilder( - int index) { - return getPoiIndexFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndPoiIndex.getDefaultInstance()); - } - public java.util.List - getPoiIndexBuilderList() { - return getPoiIndexFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiIndex, net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiIndexOrBuilder> - getPoiIndexFieldBuilder() { - if (poiIndexBuilder_ == null) { - poiIndexBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiIndex, net.osmand.binary.OsmandOdb.OsmAndPoiIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiIndexOrBuilder>( - poiIndex_, - ((bitField0_ & 0x00000010) == 0x00000010), - getParentForChildren(), - isClean()); - poiIndex_ = null; - } - return poiIndexBuilder_; - } // repeated .OsmAndMapIndex mapIndex = 6; - private java.util.List mapIndex_ = - java.util.Collections.emptyList(); - private void ensureMapIndexIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - mapIndex_ = new java.util.ArrayList(mapIndex_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex, net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndexOrBuilder> mapIndexBuilder_; - public java.util.List getMapIndexList() { - if (mapIndexBuilder_ == null) { - return java.util.Collections.unmodifiableList(mapIndex_); - } else { - return mapIndexBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.mapIndex_); } public int getMapIndexCount() { - if (mapIndexBuilder_ == null) { - return mapIndex_.size(); - } else { - return mapIndexBuilder_.getCount(); - } + return result.getMapIndexCount(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex getMapIndex(int index) { - if (mapIndexBuilder_ == null) { - return mapIndex_.get(index); - } else { - return mapIndexBuilder_.getMessage(index); - } + return result.getMapIndex(index); } - public Builder setMapIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex value) { - if (mapIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMapIndexIsMutable(); - mapIndex_.set(index, value); - onChanged(); - } else { - mapIndexBuilder_.setMessage(index, value); + public Builder setMapIndex(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.mapIndex_.set(index, value); return this; } - public Builder setMapIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder builderForValue) { - if (mapIndexBuilder_ == null) { - ensureMapIndexIsMutable(); - mapIndex_.set(index, builderForValue.build()); - onChanged(); - } else { - mapIndexBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setMapIndex(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder builderForValue) { + result.mapIndex_.set(index, builderForValue.build()); return this; } public Builder addMapIndex(net.osmand.binary.OsmandOdb.OsmAndMapIndex value) { - if (mapIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMapIndexIsMutable(); - mapIndex_.add(value); - onChanged(); - } else { - mapIndexBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.mapIndex_.isEmpty()) { + result.mapIndex_ = new java.util.ArrayList(); + } + result.mapIndex_.add(value); return this; } - public Builder addMapIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex value) { - if (mapIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureMapIndexIsMutable(); - mapIndex_.add(index, value); - onChanged(); - } else { - mapIndexBuilder_.addMessage(index, value); - } - return this; - } - public Builder addMapIndex( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder builderForValue) { - if (mapIndexBuilder_ == null) { - ensureMapIndexIsMutable(); - mapIndex_.add(builderForValue.build()); - onChanged(); - } else { - mapIndexBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addMapIndex( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder builderForValue) { - if (mapIndexBuilder_ == null) { - ensureMapIndexIsMutable(); - mapIndex_.add(index, builderForValue.build()); - onChanged(); - } else { - mapIndexBuilder_.addMessage(index, builderForValue.build()); + public Builder addMapIndex(net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder builderForValue) { + if (result.mapIndex_.isEmpty()) { + result.mapIndex_ = new java.util.ArrayList(); } + result.mapIndex_.add(builderForValue.build()); return this; } public Builder addAllMapIndex( java.lang.Iterable values) { - if (mapIndexBuilder_ == null) { - ensureMapIndexIsMutable(); - super.addAll(values, mapIndex_); - onChanged(); - } else { - mapIndexBuilder_.addAllMessages(values); + if (result.mapIndex_.isEmpty()) { + result.mapIndex_ = new java.util.ArrayList(); } + super.addAll(values, result.mapIndex_); return this; } public Builder clearMapIndex() { - if (mapIndexBuilder_ == null) { - mapIndex_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - mapIndexBuilder_.clear(); - } + result.mapIndex_ = java.util.Collections.emptyList(); return this; } - public Builder removeMapIndex(int index) { - if (mapIndexBuilder_ == null) { - ensureMapIndexIsMutable(); - mapIndex_.remove(index); - onChanged(); - } else { - mapIndexBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder getMapIndexBuilder( - int index) { - return getMapIndexFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndexOrBuilder getMapIndexOrBuilder( - int index) { - if (mapIndexBuilder_ == null) { - return mapIndex_.get(index); } else { - return mapIndexBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getMapIndexOrBuilderList() { - if (mapIndexBuilder_ != null) { - return mapIndexBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(mapIndex_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder addMapIndexBuilder() { - return getMapIndexFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder addMapIndexBuilder( - int index) { - return getMapIndexFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.getDefaultInstance()); - } - public java.util.List - getMapIndexBuilderList() { - return getMapIndexFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex, net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndexOrBuilder> - getMapIndexFieldBuilder() { - if (mapIndexBuilder_ == null) { - mapIndexBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex, net.osmand.binary.OsmandOdb.OsmAndMapIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndexOrBuilder>( - mapIndex_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - mapIndex_ = null; - } - return mapIndexBuilder_; - } // required uint32 versionConfirm = 32; - private int versionConfirm_ ; public boolean hasVersionConfirm() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return result.hasVersionConfirm(); } public int getVersionConfirm() { - return versionConfirm_; + return result.getVersionConfirm(); } public Builder setVersionConfirm(int value) { - bitField0_ |= 0x00000040; - versionConfirm_ = value; - onChanged(); + result.hasVersionConfirm = true; + result.versionConfirm_ = value; return this; } public Builder clearVersionConfirm() { - bitField0_ = (bitField0_ & ~0x00000040); - versionConfirm_ = 0; - onChanged(); + result.hasVersionConfirm = false; + result.versionConfirm_ = 0; return this; } @@ -1618,37 +739,18 @@ public final class OsmandOdb { static { defaultInstance = new OsmAndStructure(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndStructure) } - public interface OsmAndTileBoxOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required uint32 left = 1; - boolean hasLeft(); - int getLeft(); - - // required uint32 right = 2; - boolean hasRight(); - int getRight(); - - // required uint32 top = 3; - boolean hasTop(); - int getTop(); - - // required uint32 bottom = 4; - boolean hasBottom(); - int getBottom(); - } public static final class OsmAndTileBox extends - com.google.protobuf.GeneratedMessage - implements OsmAndTileBoxOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndTileBox.newBuilder() to construct. - private OsmAndTileBox(Builder builder) { - super(builder); + private OsmAndTileBox() { + initFields(); } private OsmAndTileBox(boolean noInit) {} @@ -1657,7 +759,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndTileBox getDefaultInstanceForType() { + @Override + public OsmAndTileBox getDefaultInstanceForType() { return defaultInstance; } @@ -1666,135 +769,98 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndTileBox_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndTileBox_fieldAccessorTable; } - private int bitField0_; // required uint32 left = 1; public static final int LEFT_FIELD_NUMBER = 1; - private int left_; - public boolean hasLeft() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getLeft() { - return left_; - } + private boolean hasLeft; + private int left_ = 0; + public boolean hasLeft() { return hasLeft; } + public int getLeft() { return left_; } // required uint32 right = 2; public static final int RIGHT_FIELD_NUMBER = 2; - private int right_; - public boolean hasRight() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getRight() { - return right_; - } + private boolean hasRight; + private int right_ = 0; + public boolean hasRight() { return hasRight; } + public int getRight() { return right_; } // required uint32 top = 3; public static final int TOP_FIELD_NUMBER = 3; - private int top_; - public boolean hasTop() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getTop() { - return top_; - } + private boolean hasTop; + private int top_ = 0; + public boolean hasTop() { return hasTop; } + public int getTop() { return top_; } // required uint32 bottom = 4; public static final int BOTTOM_FIELD_NUMBER = 4; - private int bottom_; - public boolean hasBottom() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getBottom() { - return bottom_; - } + private boolean hasBottom; + private int bottom_ = 0; + public boolean hasBottom() { return hasBottom; } + public int getBottom() { return bottom_; } private void initFields() { - left_ = 0; - right_ = 0; - top_ = 0; - bottom_ = 0; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - 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; + @Override + public final boolean isInitialized() { + if (!hasLeft) return false; + if (!hasRight) return false; + if (!hasTop) return false; + if (!hasBottom) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, left_); + if (hasLeft()) { + output.writeUInt32(1, getLeft()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, right_); + if (hasRight()) { + output.writeUInt32(2, getRight()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(3, top_); + if (hasTop()) { + output.writeUInt32(3, getTop()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt32(4, bottom_); + if (hasBottom()) { + output.writeUInt32(4, getBottom()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasLeft()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, left_); + .computeUInt32Size(1, getLeft()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasRight()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, right_); + .computeUInt32Size(2, getRight()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasTop()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, top_); + .computeUInt32Size(3, getTop()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasBottom()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, bottom_); + .computeUInt32Size(4, getBottom()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndTileBox parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -1863,118 +929,92 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndTileBox prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndTileBox_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndTileBox_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndTileBox result; // Construct using net.osmand.binary.OsmandOdb.OsmAndTileBox.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndTileBox(); + return builder; } - public Builder clear() { - super.clear(); - left_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - right_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - top_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - bottom_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndTileBox internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.OsmAndTileBox(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndTileBox.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndTileBox getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndTileBox getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndTileBox build() { - net.osmand.binary.OsmandOdb.OsmAndTileBox result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndTileBox build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndTileBox buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndTileBox result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndTileBox buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndTileBox result = new net.osmand.binary.OsmandOdb.OsmAndTileBox(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndTileBox buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.left_ = left_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.right_ = right_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.top_ = top_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.bottom_ = bottom_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndTileBox returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndTileBox) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndTileBox)other); } else { @@ -2001,27 +1041,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasLeft()) { - - return false; - } - if (!hasRight()) { - - return false; - } - if (!hasTop()) { - - return false; - } - if (!hasBottom()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2033,124 +1054,105 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - left_ = input.readUInt32(); + setLeft(input.readUInt32()); break; } case 16: { - bitField0_ |= 0x00000002; - right_ = input.readUInt32(); + setRight(input.readUInt32()); break; } case 24: { - bitField0_ |= 0x00000004; - top_ = input.readUInt32(); + setTop(input.readUInt32()); break; } case 32: { - bitField0_ |= 0x00000008; - bottom_ = input.readUInt32(); + setBottom(input.readUInt32()); break; } } } } - private int bitField0_; // required uint32 left = 1; - private int left_ ; public boolean hasLeft() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasLeft(); } public int getLeft() { - return left_; + return result.getLeft(); } public Builder setLeft(int value) { - bitField0_ |= 0x00000001; - left_ = value; - onChanged(); + result.hasLeft = true; + result.left_ = value; return this; } public Builder clearLeft() { - bitField0_ = (bitField0_ & ~0x00000001); - left_ = 0; - onChanged(); + result.hasLeft = false; + result.left_ = 0; return this; } // required uint32 right = 2; - private int right_ ; public boolean hasRight() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasRight(); } public int getRight() { - return right_; + return result.getRight(); } public Builder setRight(int value) { - bitField0_ |= 0x00000002; - right_ = value; - onChanged(); + result.hasRight = true; + result.right_ = value; return this; } public Builder clearRight() { - bitField0_ = (bitField0_ & ~0x00000002); - right_ = 0; - onChanged(); + result.hasRight = false; + result.right_ = 0; return this; } // required uint32 top = 3; - private int top_ ; public boolean hasTop() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasTop(); } public int getTop() { - return top_; + return result.getTop(); } public Builder setTop(int value) { - bitField0_ |= 0x00000004; - top_ = value; - onChanged(); + result.hasTop = true; + result.top_ = value; return this; } public Builder clearTop() { - bitField0_ = (bitField0_ & ~0x00000004); - top_ = 0; - onChanged(); + result.hasTop = false; + result.top_ = 0; return this; } // required uint32 bottom = 4; - private int bottom_ ; public boolean hasBottom() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasBottom(); } public int getBottom() { - return bottom_; + return result.getBottom(); } public Builder setBottom(int value) { - bitField0_ |= 0x00000008; - bottom_ = value; - onChanged(); + result.hasBottom = true; + result.bottom_ = value; return this; } public Builder clearBottom() { - bitField0_ = (bitField0_ & ~0x00000008); - bottom_ = 0; - onChanged(); + result.hasBottom = false; + result.bottom_ = 0; return this; } @@ -2159,26 +1161,18 @@ public final class OsmandOdb { static { defaultInstance = new OsmAndTileBox(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndTileBox) } - public interface StringTableOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated string s = 1; - java.util.List getSList(); - int getSCount(); - String getS(int index); - } public static final class StringTable extends - com.google.protobuf.GeneratedMessage - implements StringTableOrBuilder { + com.google.protobuf.GeneratedMessage { // Use StringTable.newBuilder() to construct. - private StringTable(Builder builder) { - super(builder); + private StringTable() { + initFields(); } private StringTable(boolean noInit) {} @@ -2187,7 +1181,8 @@ public final class OsmandOdb { return defaultInstance; } - public StringTable getDefaultInstanceForType() { + @Override + public StringTable getDefaultInstanceForType() { return defaultInstance; } @@ -2196,57 +1191,53 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_StringTable_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_StringTable_fieldAccessorTable; } // repeated string s = 1; public static final int S_FIELD_NUMBER = 1; - private com.google.protobuf.LazyStringList s_; - public java.util.List - getSList() { + private java.util.List s_ = + java.util.Collections.emptyList(); + public java.util.List getSList() { return s_; } - public int getSCount() { - return s_.size(); - } - public String getS(int index) { + public int getSCount() { return s_.size(); } + public java.lang.String getS(int index) { return s_.get(index); } private void initFields() { - s_ = com.google.protobuf.LazyStringArrayList.EMPTY; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < s_.size(); i++) { - output.writeBytes(1, s_.getByteString(i)); + for (java.lang.String element : getSList()) { + output.writeString(1, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; - for (int i = 0; i < s_.size(); i++) { + for (java.lang.String element : getSList()) { dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(s_.getByteString(i)); + .computeStringSizeNoTag(element); } size += dataSize; size += 1 * getSList().size(); @@ -2256,13 +1247,6 @@ public final class OsmandOdb { return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.StringTable parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2331,100 +1315,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.StringTable prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.StringTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_StringTable_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_StringTable_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.StringTable result; // Construct using net.osmand.binary.OsmandOdb.StringTable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.StringTable(); + return builder; } - public Builder clear() { - super.clear(); - s_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); + @Override + protected net.osmand.binary.OsmandOdb.StringTable internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.StringTable(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.StringTable.getDescriptor(); } - public net.osmand.binary.OsmandOdb.StringTable getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.StringTable getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.StringTable build() { - net.osmand.binary.OsmandOdb.StringTable result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.StringTable build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.StringTable buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.StringTable result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.StringTable buildPartial() { - net.osmand.binary.OsmandOdb.StringTable result = new net.osmand.binary.OsmandOdb.StringTable(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - s_ = new com.google.protobuf.UnmodifiableLazyStringList( - s_); - bitField0_ = (bitField0_ & ~0x00000001); + @Override + public net.osmand.binary.OsmandOdb.StringTable buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.s_ = s_; - onBuilt(); - return result; + if (result.s_ != java.util.Collections.EMPTY_LIST) { + result.s_ = + java.util.Collections.unmodifiableList(result.s_); + } + net.osmand.binary.OsmandOdb.StringTable returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.StringTable) { return mergeFrom((net.osmand.binary.OsmandOdb.StringTable)other); } else { @@ -2436,24 +1416,17 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.StringTable other) { if (other == net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance()) return this; if (!other.s_.isEmpty()) { - if (s_.isEmpty()) { - s_ = other.s_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureSIsMutable(); - s_.addAll(other.s_); + if (result.s_.isEmpty()) { + result.s_ = new java.util.ArrayList(); } - onChanged(); + result.s_.addAll(other.s_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -2465,128 +1438,81 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - ensureSIsMutable(); - s_.add(input.readBytes()); + addS(input.readString()); break; } } } } - private int bitField0_; // repeated string s = 1; - private com.google.protobuf.LazyStringList s_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureSIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - s_ = new com.google.protobuf.LazyStringArrayList(s_); - bitField0_ |= 0x00000001; - } - } - public java.util.List - getSList() { - return java.util.Collections.unmodifiableList(s_); + public java.util.List getSList() { + return java.util.Collections.unmodifiableList(result.s_); } public int getSCount() { - return s_.size(); + return result.getSCount(); } - public String getS(int index) { - return s_.get(index); + public java.lang.String getS(int index) { + return result.getS(index); } - public Builder setS( - int index, String value) { + public Builder setS(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureSIsMutable(); - s_.set(index, value); - onChanged(); + result.s_.set(index, value); return this; } - public Builder addS(String value) { + public Builder addS(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureSIsMutable(); - s_.add(value); - onChanged(); + if (result.s_.isEmpty()) { + result.s_ = new java.util.ArrayList(); + } + result.s_.add(value); return this; } public Builder addAllS( - java.lang.Iterable values) { - ensureSIsMutable(); - super.addAll(values, s_); - onChanged(); + java.lang.Iterable values) { + if (result.s_.isEmpty()) { + result.s_ = new java.util.ArrayList(); + } + super.addAll(values, result.s_); return this; } public Builder clearS() { - s_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + result.s_ = java.util.Collections.emptyList(); return this; } - void addS(com.google.protobuf.ByteString value) { - ensureSIsMutable(); - s_.add(value); - onChanged(); - } // @@protoc_insertion_point(builder_scope:StringTable) } static { defaultInstance = new StringTable(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:StringTable) } - public interface IndexedStringTableOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string prefix = 1; - boolean hasPrefix(); - String getPrefix(); - - // repeated string key = 3; - java.util.List getKeyList(); - int getKeyCount(); - String getKey(int index); - - // repeated uint32 val = 4; - java.util.List getValList(); - int getValCount(); - int getVal(int index); - - // repeated .IndexedStringTable subtables = 5; - java.util.List - getSubtablesList(); - net.osmand.binary.OsmandOdb.IndexedStringTable getSubtables(int index); - int getSubtablesCount(); - java.util.List - getSubtablesOrBuilderList(); - net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getSubtablesOrBuilder( - int index); - } public static final class IndexedStringTable extends - com.google.protobuf.GeneratedMessage - implements IndexedStringTableOrBuilder { + com.google.protobuf.GeneratedMessage { // Use IndexedStringTable.newBuilder() to construct. - private IndexedStringTable(Builder builder) { - super(builder); + private IndexedStringTable() { + initFields(); } private IndexedStringTable(boolean noInit) {} @@ -2595,7 +1521,8 @@ public final class OsmandOdb { return defaultInstance; } - public IndexedStringTable getDefaultInstanceForType() { + @Override + public IndexedStringTable getDefaultInstanceForType() { return defaultInstance; } @@ -2604,170 +1531,119 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_IndexedStringTable_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_IndexedStringTable_fieldAccessorTable; } - private int bitField0_; // optional string prefix = 1; public static final int PREFIX_FIELD_NUMBER = 1; - private java.lang.Object prefix_; - public boolean hasPrefix() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getPrefix() { - java.lang.Object ref = prefix_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - prefix_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getPrefixBytes() { - java.lang.Object ref = prefix_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - prefix_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasPrefix; + private java.lang.String prefix_ = ""; + public boolean hasPrefix() { return hasPrefix; } + public java.lang.String getPrefix() { return prefix_; } // repeated string key = 3; public static final int KEY_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList key_; - public java.util.List - getKeyList() { + private java.util.List key_ = + java.util.Collections.emptyList(); + public java.util.List getKeyList() { return key_; } - public int getKeyCount() { - return key_.size(); - } - public String getKey(int index) { + public int getKeyCount() { return key_.size(); } + public java.lang.String getKey(int index) { return key_.get(index); } // repeated uint32 val = 4; public static final int VAL_FIELD_NUMBER = 4; - private java.util.List val_; - public java.util.List - getValList() { + private java.util.List val_ = + java.util.Collections.emptyList(); + public java.util.List getValList() { return val_; } - public int getValCount() { - return val_.size(); - } + public int getValCount() { return val_.size(); } public int getVal(int index) { return val_.get(index); } // repeated .IndexedStringTable subtables = 5; public static final int SUBTABLES_FIELD_NUMBER = 5; - private java.util.List subtables_; + private java.util.List subtables_ = + java.util.Collections.emptyList(); public java.util.List getSubtablesList() { return subtables_; } - public java.util.List - getSubtablesOrBuilderList() { - return subtables_; - } - public int getSubtablesCount() { - return subtables_.size(); - } + public int getSubtablesCount() { return subtables_.size(); } public net.osmand.binary.OsmandOdb.IndexedStringTable getSubtables(int index) { return subtables_.get(index); } - public net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getSubtablesOrBuilder( - int index) { - return subtables_.get(index); - } private void initFields() { - prefix_ = ""; - key_ = com.google.protobuf.LazyStringArrayList.EMPTY; - val_ = java.util.Collections.emptyList();; - subtables_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getPrefixBytes()); + if (hasPrefix()) { + output.writeString(1, getPrefix()); } - for (int i = 0; i < key_.size(); i++) { - output.writeBytes(3, key_.getByteString(i)); + for (java.lang.String element : getKeyList()) { + output.writeString(3, element); } - for (int i = 0; i < val_.size(); i++) { - output.writeUInt32(4, val_.get(i)); + for (int element : getValList()) { + output.writeUInt32(4, element); } - for (int i = 0; i < subtables_.size(); i++) { - output.writeMessage(5, subtables_.get(i)); + for (net.osmand.binary.OsmandOdb.IndexedStringTable element : getSubtablesList()) { + output.writeMessage(5, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasPrefix()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getPrefixBytes()); + .computeStringSize(1, getPrefix()); } { int dataSize = 0; - for (int i = 0; i < key_.size(); i++) { + for (java.lang.String element : getKeyList()) { dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(key_.getByteString(i)); + .computeStringSizeNoTag(element); } size += dataSize; size += 1 * getKeyList().size(); } { int dataSize = 0; - for (int i = 0; i < val_.size(); i++) { + for (int element : getValList()) { dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(val_.get(i)); + .computeUInt32SizeNoTag(element); } size += dataSize; size += 1 * getValList().size(); } - for (int i = 0; i < subtables_.size(); i++) { + for (net.osmand.binary.OsmandOdb.IndexedStringTable element : getSubtablesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, subtables_.get(i)); + .computeMessageSize(5, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.IndexedStringTable parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -2836,131 +1712,104 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.IndexedStringTable prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_IndexedStringTable_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_IndexedStringTable_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.IndexedStringTable result; // Construct using net.osmand.binary.OsmandOdb.IndexedStringTable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getSubtablesFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.IndexedStringTable(); + return builder; } - public Builder clear() { - super.clear(); - prefix_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - key_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - val_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000004); - if (subtablesBuilder_ == null) { - subtables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - subtablesBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.IndexedStringTable internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.IndexedStringTable(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.IndexedStringTable.getDescriptor(); } - public net.osmand.binary.OsmandOdb.IndexedStringTable getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.IndexedStringTable getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.IndexedStringTable build() { - net.osmand.binary.OsmandOdb.IndexedStringTable result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.IndexedStringTable build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.IndexedStringTable buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.IndexedStringTable result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.IndexedStringTable buildPartial() { - net.osmand.binary.OsmandOdb.IndexedStringTable result = new net.osmand.binary.OsmandOdb.IndexedStringTable(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.IndexedStringTable buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.prefix_ = prefix_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - key_ = new com.google.protobuf.UnmodifiableLazyStringList( - key_); - bitField0_ = (bitField0_ & ~0x00000002); + if (result.key_ != java.util.Collections.EMPTY_LIST) { + result.key_ = + java.util.Collections.unmodifiableList(result.key_); } - result.key_ = key_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - val_ = java.util.Collections.unmodifiableList(val_); - bitField0_ = (bitField0_ & ~0x00000004); + if (result.val_ != java.util.Collections.EMPTY_LIST) { + result.val_ = + java.util.Collections.unmodifiableList(result.val_); } - result.val_ = val_; - if (subtablesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - subtables_ = java.util.Collections.unmodifiableList(subtables_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.subtables_ = subtables_; - } else { - result.subtables_ = subtablesBuilder_.build(); + if (result.subtables_ != java.util.Collections.EMPTY_LIST) { + result.subtables_ = + java.util.Collections.unmodifiableList(result.subtables_); } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.IndexedStringTable returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.IndexedStringTable) { return mergeFrom((net.osmand.binary.OsmandOdb.IndexedStringTable)other); } else { @@ -2975,60 +1824,29 @@ public final class OsmandOdb { setPrefix(other.getPrefix()); } if (!other.key_.isEmpty()) { - if (key_.isEmpty()) { - key_ = other.key_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureKeyIsMutable(); - key_.addAll(other.key_); + if (result.key_.isEmpty()) { + result.key_ = new java.util.ArrayList(); } - onChanged(); + result.key_.addAll(other.key_); } if (!other.val_.isEmpty()) { - if (val_.isEmpty()) { - val_ = other.val_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureValIsMutable(); - val_.addAll(other.val_); + if (result.val_.isEmpty()) { + result.val_ = new java.util.ArrayList(); } - onChanged(); + result.val_.addAll(other.val_); } - if (subtablesBuilder_ == null) { - if (!other.subtables_.isEmpty()) { - if (subtables_.isEmpty()) { - subtables_ = other.subtables_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureSubtablesIsMutable(); - subtables_.addAll(other.subtables_); - } - onChanged(); - } - } else { - if (!other.subtables_.isEmpty()) { - if (subtablesBuilder_.isEmpty()) { - subtablesBuilder_.dispose(); - subtablesBuilder_ = null; - subtables_ = other.subtables_; - bitField0_ = (bitField0_ & ~0x00000008); - subtablesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSubtablesFieldBuilder() : null; - } else { - subtablesBuilder_.addAllMessages(other.subtables_); - } + if (!other.subtables_.isEmpty()) { + if (result.subtables_.isEmpty()) { + result.subtables_ = new java.util.ArrayList(); } + result.subtables_.addAll(other.subtables_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3040,30 +1858,25 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - prefix_ = input.readBytes(); + setPrefix(input.readString()); break; } case 26: { - ensureKeyIsMutable(); - key_.add(input.readBytes()); + addKey(input.readString()); break; } case 32: { - ensureValIsMutable(); - val_.add(input.readUInt32()); + addVal(input.readUInt32()); break; } case 34: { @@ -3085,385 +1898,170 @@ public final class OsmandOdb { } } - private int bitField0_; // optional string prefix = 1; - private java.lang.Object prefix_ = ""; public boolean hasPrefix() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasPrefix(); } - public String getPrefix() { - java.lang.Object ref = prefix_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - prefix_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getPrefix() { + return result.getPrefix(); } - public Builder setPrefix(String value) { + public Builder setPrefix(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - prefix_ = value; - onChanged(); + result.hasPrefix = true; + result.prefix_ = value; return this; } public Builder clearPrefix() { - bitField0_ = (bitField0_ & ~0x00000001); - prefix_ = getDefaultInstance().getPrefix(); - onChanged(); + result.hasPrefix = false; + result.prefix_ = getDefaultInstance().getPrefix(); return this; } - void setPrefix(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - prefix_ = value; - onChanged(); - } // repeated string key = 3; - private com.google.protobuf.LazyStringList key_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureKeyIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - key_ = new com.google.protobuf.LazyStringArrayList(key_); - bitField0_ |= 0x00000002; - } - } - public java.util.List - getKeyList() { - return java.util.Collections.unmodifiableList(key_); + public java.util.List getKeyList() { + return java.util.Collections.unmodifiableList(result.key_); } public int getKeyCount() { - return key_.size(); + return result.getKeyCount(); } - public String getKey(int index) { - return key_.get(index); + public java.lang.String getKey(int index) { + return result.getKey(index); } - public Builder setKey( - int index, String value) { + public Builder setKey(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureKeyIsMutable(); - key_.set(index, value); - onChanged(); + result.key_.set(index, value); return this; } - public Builder addKey(String value) { + public Builder addKey(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureKeyIsMutable(); - key_.add(value); - onChanged(); + if (result.key_.isEmpty()) { + result.key_ = new java.util.ArrayList(); + } + result.key_.add(value); return this; } public Builder addAllKey( - java.lang.Iterable values) { - ensureKeyIsMutable(); - super.addAll(values, key_); - onChanged(); + java.lang.Iterable values) { + if (result.key_.isEmpty()) { + result.key_ = new java.util.ArrayList(); + } + super.addAll(values, result.key_); return this; } public Builder clearKey() { - key_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + result.key_ = java.util.Collections.emptyList(); return this; } - void addKey(com.google.protobuf.ByteString value) { - ensureKeyIsMutable(); - key_.add(value); - onChanged(); - } // repeated uint32 val = 4; - private java.util.List val_ = java.util.Collections.emptyList();; - private void ensureValIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - val_ = new java.util.ArrayList(val_); - bitField0_ |= 0x00000004; - } - } - public java.util.List - getValList() { - return java.util.Collections.unmodifiableList(val_); + public java.util.List getValList() { + return java.util.Collections.unmodifiableList(result.val_); } public int getValCount() { - return val_.size(); + return result.getValCount(); } public int getVal(int index) { - return val_.get(index); + return result.getVal(index); } - public Builder setVal( - int index, int value) { - ensureValIsMutable(); - val_.set(index, value); - onChanged(); + public Builder setVal(int index, int value) { + result.val_.set(index, value); return this; } public Builder addVal(int value) { - ensureValIsMutable(); - val_.add(value); - onChanged(); + if (result.val_.isEmpty()) { + result.val_ = new java.util.ArrayList(); + } + result.val_.add(value); return this; } public Builder addAllVal( java.lang.Iterable values) { - ensureValIsMutable(); - super.addAll(values, val_); - onChanged(); + if (result.val_.isEmpty()) { + result.val_ = new java.util.ArrayList(); + } + super.addAll(values, result.val_); return this; } public Builder clearVal() { - val_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); + result.val_ = java.util.Collections.emptyList(); return this; } // repeated .IndexedStringTable subtables = 5; - private java.util.List subtables_ = - java.util.Collections.emptyList(); - private void ensureSubtablesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - subtables_ = new java.util.ArrayList(subtables_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder> subtablesBuilder_; - public java.util.List getSubtablesList() { - if (subtablesBuilder_ == null) { - return java.util.Collections.unmodifiableList(subtables_); - } else { - return subtablesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.subtables_); } public int getSubtablesCount() { - if (subtablesBuilder_ == null) { - return subtables_.size(); - } else { - return subtablesBuilder_.getCount(); - } + return result.getSubtablesCount(); } public net.osmand.binary.OsmandOdb.IndexedStringTable getSubtables(int index) { - if (subtablesBuilder_ == null) { - return subtables_.get(index); - } else { - return subtablesBuilder_.getMessage(index); - } + return result.getSubtables(index); } - public Builder setSubtables( - int index, net.osmand.binary.OsmandOdb.IndexedStringTable value) { - if (subtablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubtablesIsMutable(); - subtables_.set(index, value); - onChanged(); - } else { - subtablesBuilder_.setMessage(index, value); + public Builder setSubtables(int index, net.osmand.binary.OsmandOdb.IndexedStringTable value) { + if (value == null) { + throw new NullPointerException(); } + result.subtables_.set(index, value); return this; } - public Builder setSubtables( - int index, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { - if (subtablesBuilder_ == null) { - ensureSubtablesIsMutable(); - subtables_.set(index, builderForValue.build()); - onChanged(); - } else { - subtablesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setSubtables(int index, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { + result.subtables_.set(index, builderForValue.build()); return this; } public Builder addSubtables(net.osmand.binary.OsmandOdb.IndexedStringTable value) { - if (subtablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubtablesIsMutable(); - subtables_.add(value); - onChanged(); - } else { - subtablesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.subtables_.isEmpty()) { + result.subtables_ = new java.util.ArrayList(); + } + result.subtables_.add(value); return this; } - public Builder addSubtables( - int index, net.osmand.binary.OsmandOdb.IndexedStringTable value) { - if (subtablesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubtablesIsMutable(); - subtables_.add(index, value); - onChanged(); - } else { - subtablesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addSubtables( - net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { - if (subtablesBuilder_ == null) { - ensureSubtablesIsMutable(); - subtables_.add(builderForValue.build()); - onChanged(); - } else { - subtablesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addSubtables( - int index, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { - if (subtablesBuilder_ == null) { - ensureSubtablesIsMutable(); - subtables_.add(index, builderForValue.build()); - onChanged(); - } else { - subtablesBuilder_.addMessage(index, builderForValue.build()); + public Builder addSubtables(net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { + if (result.subtables_.isEmpty()) { + result.subtables_ = new java.util.ArrayList(); } + result.subtables_.add(builderForValue.build()); return this; } public Builder addAllSubtables( java.lang.Iterable values) { - if (subtablesBuilder_ == null) { - ensureSubtablesIsMutable(); - super.addAll(values, subtables_); - onChanged(); - } else { - subtablesBuilder_.addAllMessages(values); + if (result.subtables_.isEmpty()) { + result.subtables_ = new java.util.ArrayList(); } + super.addAll(values, result.subtables_); return this; } public Builder clearSubtables() { - if (subtablesBuilder_ == null) { - subtables_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - subtablesBuilder_.clear(); - } + result.subtables_ = java.util.Collections.emptyList(); return this; } - public Builder removeSubtables(int index) { - if (subtablesBuilder_ == null) { - ensureSubtablesIsMutable(); - subtables_.remove(index); - onChanged(); - } else { - subtablesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.IndexedStringTable.Builder getSubtablesBuilder( - int index) { - return getSubtablesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getSubtablesOrBuilder( - int index) { - if (subtablesBuilder_ == null) { - return subtables_.get(index); } else { - return subtablesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getSubtablesOrBuilderList() { - if (subtablesBuilder_ != null) { - return subtablesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subtables_); - } - } - public net.osmand.binary.OsmandOdb.IndexedStringTable.Builder addSubtablesBuilder() { - return getSubtablesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.IndexedStringTable.Builder addSubtablesBuilder( - int index) { - return getSubtablesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance()); - } - public java.util.List - getSubtablesBuilderList() { - return getSubtablesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder> - getSubtablesFieldBuilder() { - if (subtablesBuilder_ == null) { - subtablesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder>( - subtables_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - subtables_ = null; - } - return subtablesBuilder_; - } // @@protoc_insertion_point(builder_scope:IndexedStringTable) } static { defaultInstance = new IndexedStringTable(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:IndexedStringTable) } - public interface OsmAndMapIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string name = 2; - boolean hasName(); - String getName(); - - // repeated .OsmAndMapIndex.MapEncodingRule rules = 4; - java.util.List - getRulesList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule getRules(int index); - int getRulesCount(); - java.util.List - getRulesOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRuleOrBuilder getRulesOrBuilder( - int index); - - // repeated .OsmAndMapIndex.MapRootLevel levels = 5; - java.util.List - getLevelsList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel getLevels(int index); - int getLevelsCount(); - java.util.List - getLevelsOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevelOrBuilder getLevelsOrBuilder( - int index); - - // repeated .OsmAndMapIndex.MapDataBlocks blocks = 7; - java.util.List - getBlocksList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks getBlocks(int index); - int getBlocksCount(); - java.util.List - getBlocksOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocksOrBuilder getBlocksOrBuilder( - int index); - } public static final class OsmAndMapIndex extends - com.google.protobuf.GeneratedMessage - implements OsmAndMapIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndMapIndex.newBuilder() to construct. - private OsmAndMapIndex(Builder builder) { - super(builder); + private OsmAndMapIndex() { + initFields(); } private OsmAndMapIndex(boolean noInit) {} @@ -3472,7 +2070,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndMapIndex getDefaultInstanceForType() { + @Override + public OsmAndMapIndex getDefaultInstanceForType() { return defaultInstance; } @@ -3481,40 +2080,17 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_fieldAccessorTable; } - public interface MapEncodingRuleOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string tag = 3; - boolean hasTag(); - String getTag(); - - // optional string value = 5; - boolean hasValue(); - String getValue(); - - // optional uint32 id = 7; - boolean hasId(); - int getId(); - - // optional uint32 minZoom = 9; - boolean hasMinZoom(); - int getMinZoom(); - - // optional uint32 type = 10; - boolean hasType(); - int getType(); - } public static final class MapEncodingRule extends - com.google.protobuf.GeneratedMessage - implements MapEncodingRuleOrBuilder { + com.google.protobuf.GeneratedMessage { // Use MapEncodingRule.newBuilder() to construct. - private MapEncodingRule(Builder builder) { - super(builder); + private MapEncodingRule() { + initFields(); } private MapEncodingRule(boolean noInit) {} @@ -3523,7 +2099,8 @@ public final class OsmandOdb { return defaultInstance; } - public MapEncodingRule getDefaultInstanceForType() { + @Override + public MapEncodingRule getDefaultInstanceForType() { return defaultInstance; } @@ -3532,185 +2109,109 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapEncodingRule_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapEncodingRule_fieldAccessorTable; } - private int bitField0_; // required string tag = 3; public static final int TAG_FIELD_NUMBER = 3; - private java.lang.Object tag_; - public boolean hasTag() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getTag() { - java.lang.Object ref = tag_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - tag_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getTagBytes() { - java.lang.Object ref = tag_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - tag_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasTag; + private java.lang.String tag_ = ""; + public boolean hasTag() { return hasTag; } + public java.lang.String getTag() { return tag_; } // optional string value = 5; public static final int VALUE_FIELD_NUMBER = 5; - private java.lang.Object value_; - public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getValue() { - java.lang.Object ref = value_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - value_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getValueBytes() { - java.lang.Object ref = value_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - value_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasValue; + private java.lang.String value_ = ""; + public boolean hasValue() { return hasValue; } + public java.lang.String getValue() { return value_; } // optional uint32 id = 7; public static final int ID_FIELD_NUMBER = 7; - private int id_; - public boolean hasId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getId() { - return id_; - } + private boolean hasId; + private int id_ = 0; + public boolean hasId() { return hasId; } + public int getId() { return id_; } // optional uint32 minZoom = 9; public static final int MINZOOM_FIELD_NUMBER = 9; - private int minZoom_; - public boolean hasMinZoom() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getMinZoom() { - return minZoom_; - } + private boolean hasMinZoom; + private int minZoom_ = 0; + public boolean hasMinZoom() { return hasMinZoom; } + public int getMinZoom() { return minZoom_; } // optional uint32 type = 10; public static final int TYPE_FIELD_NUMBER = 10; - private int type_; - public boolean hasType() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getType() { - return type_; - } + private boolean hasType; + private int type_ = 0; + public boolean hasType() { return hasType; } + public int getType() { return type_; } private void initFields() { - tag_ = ""; - value_ = ""; - id_ = 0; - minZoom_ = 0; - type_ = 0; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasTag()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasTag) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(3, getTagBytes()); + if (hasTag()) { + output.writeString(3, getTag()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(5, getValueBytes()); + if (hasValue()) { + output.writeString(5, getValue()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(7, id_); + if (hasId()) { + output.writeUInt32(7, getId()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt32(9, minZoom_); + if (hasMinZoom()) { + output.writeUInt32(9, getMinZoom()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(10, type_); + if (hasType()) { + output.writeUInt32(10, getType()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasTag()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getTagBytes()); + .computeStringSize(3, getTag()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasValue()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getValueBytes()); + .computeStringSize(5, getValue()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, id_); + .computeUInt32Size(7, getId()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasMinZoom()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(9, minZoom_); + .computeUInt32Size(9, getMinZoom()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasType()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(10, type_); + .computeUInt32Size(10, getType()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -3779,124 +2280,92 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRuleOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapEncodingRule_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapEncodingRule_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule result; // Construct using net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule(); + return builder; } - public Builder clear() { - super.clear(); - tag_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - value_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - id_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - minZoom_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - type_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule build() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.tag_ = tag_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.value_ = value_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.id_ = id_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.minZoom_ = minZoom_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.type_ = type_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule)other); } else { @@ -3926,15 +2395,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasTag()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -3946,180 +2408,133 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 26: { - bitField0_ |= 0x00000001; - tag_ = input.readBytes(); + setTag(input.readString()); break; } case 42: { - bitField0_ |= 0x00000002; - value_ = input.readBytes(); + setValue(input.readString()); break; } case 56: { - bitField0_ |= 0x00000004; - id_ = input.readUInt32(); + setId(input.readUInt32()); break; } case 72: { - bitField0_ |= 0x00000008; - minZoom_ = input.readUInt32(); + setMinZoom(input.readUInt32()); break; } case 80: { - bitField0_ |= 0x00000010; - type_ = input.readUInt32(); + setType(input.readUInt32()); break; } } } } - private int bitField0_; // required string tag = 3; - private java.lang.Object tag_ = ""; public boolean hasTag() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasTag(); } - public String getTag() { - java.lang.Object ref = tag_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - tag_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getTag() { + return result.getTag(); } - public Builder setTag(String value) { + public Builder setTag(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - tag_ = value; - onChanged(); + result.hasTag = true; + result.tag_ = value; return this; } public Builder clearTag() { - bitField0_ = (bitField0_ & ~0x00000001); - tag_ = getDefaultInstance().getTag(); - onChanged(); + result.hasTag = false; + result.tag_ = getDefaultInstance().getTag(); return this; } - void setTag(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - tag_ = value; - onChanged(); - } // optional string value = 5; - private java.lang.Object value_ = ""; public boolean hasValue() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasValue(); } - public String getValue() { - java.lang.Object ref = value_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - value_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getValue() { + return result.getValue(); } - public Builder setValue(String value) { + public Builder setValue(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); + result.hasValue = true; + result.value_ = value; return this; } public Builder clearValue() { - bitField0_ = (bitField0_ & ~0x00000002); - value_ = getDefaultInstance().getValue(); - onChanged(); + result.hasValue = false; + result.value_ = getDefaultInstance().getValue(); return this; } - void setValue(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - value_ = value; - onChanged(); - } // optional uint32 id = 7; - private int id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasId(); } public int getId() { - return id_; + return result.getId(); } public Builder setId(int value) { - bitField0_ |= 0x00000004; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000004); - id_ = 0; - onChanged(); + result.hasId = false; + result.id_ = 0; return this; } // optional uint32 minZoom = 9; - private int minZoom_ ; public boolean hasMinZoom() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasMinZoom(); } public int getMinZoom() { - return minZoom_; + return result.getMinZoom(); } public Builder setMinZoom(int value) { - bitField0_ |= 0x00000008; - minZoom_ = value; - onChanged(); + result.hasMinZoom = true; + result.minZoom_ = value; return this; } public Builder clearMinZoom() { - bitField0_ = (bitField0_ & ~0x00000008); - minZoom_ = 0; - onChanged(); + result.hasMinZoom = false; + result.minZoom_ = 0; return this; } // optional uint32 type = 10; - private int type_ ; public boolean hasType() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasType(); } public int getType() { - return type_; + return result.getType(); } public Builder setType(int value) { - bitField0_ |= 0x00000010; - type_ = value; - onChanged(); + result.hasType = true; + result.type_ = value; return this; } public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000010); - type_ = 0; - onChanged(); + result.hasType = false; + result.type_ = 0; return this; } @@ -4128,55 +2543,18 @@ public final class OsmandOdb { static { defaultInstance = new MapEncodingRule(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndMapIndex.MapEncodingRule) } - public interface MapRootLevelOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required int32 maxZoom = 1; - boolean hasMaxZoom(); - int getMaxZoom(); - - // required int32 minZoom = 2; - boolean hasMinZoom(); - int getMinZoom(); - - // required int32 left = 3; - boolean hasLeft(); - int getLeft(); - - // required int32 right = 4; - boolean hasRight(); - int getRight(); - - // required int32 top = 5; - boolean hasTop(); - int getTop(); - - // required int32 bottom = 6; - boolean hasBottom(); - int getBottom(); - - // repeated .OsmAndMapIndex.MapDataBox boxes = 7; - java.util.List - getBoxesList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox getBoxes(int index); - int getBoxesCount(); - java.util.List - getBoxesOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder getBoxesOrBuilder( - int index); - } public static final class MapRootLevel extends - com.google.protobuf.GeneratedMessage - implements MapRootLevelOrBuilder { + com.google.protobuf.GeneratedMessage { // Use MapRootLevel.newBuilder() to construct. - private MapRootLevel(Builder builder) { - super(builder); + private MapRootLevel() { + initFields(); } private MapRootLevel(boolean noInit) {} @@ -4185,7 +2563,8 @@ public final class OsmandOdb { return defaultInstance; } - public MapRootLevel getDefaultInstanceForType() { + @Override + public MapRootLevel getDefaultInstanceForType() { return defaultInstance; } @@ -4194,214 +2573,150 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapRootLevel_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapRootLevel_fieldAccessorTable; } - private int bitField0_; // required int32 maxZoom = 1; public static final int MAXZOOM_FIELD_NUMBER = 1; - private int maxZoom_; - public boolean hasMaxZoom() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getMaxZoom() { - return maxZoom_; - } + private boolean hasMaxZoom; + private int maxZoom_ = 0; + public boolean hasMaxZoom() { return hasMaxZoom; } + public int getMaxZoom() { return maxZoom_; } // required int32 minZoom = 2; public static final int MINZOOM_FIELD_NUMBER = 2; - private int minZoom_; - public boolean hasMinZoom() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getMinZoom() { - return minZoom_; - } + private boolean hasMinZoom; + private int minZoom_ = 0; + public boolean hasMinZoom() { return hasMinZoom; } + public int getMinZoom() { return minZoom_; } // required int32 left = 3; public static final int LEFT_FIELD_NUMBER = 3; - private int left_; - public boolean hasLeft() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getLeft() { - return left_; - } + private boolean hasLeft; + private int left_ = 0; + public boolean hasLeft() { return hasLeft; } + public int getLeft() { return left_; } // required int32 right = 4; public static final int RIGHT_FIELD_NUMBER = 4; - private int right_; - public boolean hasRight() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getRight() { - return right_; - } + private boolean hasRight; + private int right_ = 0; + public boolean hasRight() { return hasRight; } + public int getRight() { return right_; } // required int32 top = 5; public static final int TOP_FIELD_NUMBER = 5; - private int top_; - public boolean hasTop() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getTop() { - return top_; - } + private boolean hasTop; + private int top_ = 0; + public boolean hasTop() { return hasTop; } + public int getTop() { return top_; } // required int32 bottom = 6; public static final int BOTTOM_FIELD_NUMBER = 6; - private int bottom_; - public boolean hasBottom() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public int getBottom() { - return bottom_; - } + private boolean hasBottom; + private int bottom_ = 0; + public boolean hasBottom() { return hasBottom; } + public int getBottom() { return bottom_; } // repeated .OsmAndMapIndex.MapDataBox boxes = 7; public static final int BOXES_FIELD_NUMBER = 7; - private java.util.List boxes_; + private java.util.List boxes_ = + java.util.Collections.emptyList(); public java.util.List getBoxesList() { return boxes_; } - public java.util.List - getBoxesOrBuilderList() { - return boxes_; - } - public int getBoxesCount() { - return boxes_.size(); - } + public int getBoxesCount() { return boxes_.size(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox getBoxes(int index) { return boxes_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder getBoxesOrBuilder( - int index) { - return boxes_.get(index); - } private void initFields() { - maxZoom_ = 0; - minZoom_ = 0; - left_ = 0; - right_ = 0; - top_ = 0; - bottom_ = 0; - boxes_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasMaxZoom()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasMaxZoom) return false; + if (!hasMinZoom) return false; + if (!hasLeft) return false; + if (!hasRight) return false; + if (!hasTop) return false; + if (!hasBottom) return false; + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox element : getBoxesList()) { + if (!element.isInitialized()) return false; } - if (!hasMinZoom()) { - memoizedIsInitialized = 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; - } - for (int i = 0; i < getBoxesCount(); i++) { - if (!getBoxes(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeInt32(1, maxZoom_); + if (hasMaxZoom()) { + output.writeInt32(1, getMaxZoom()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeInt32(2, minZoom_); + if (hasMinZoom()) { + output.writeInt32(2, getMinZoom()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeInt32(3, left_); + if (hasLeft()) { + output.writeInt32(3, getLeft()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeInt32(4, right_); + if (hasRight()) { + output.writeInt32(4, getRight()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeInt32(5, top_); + if (hasTop()) { + output.writeInt32(5, getTop()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeInt32(6, bottom_); + if (hasBottom()) { + output.writeInt32(6, getBottom()); } - for (int i = 0; i < boxes_.size(); i++) { - output.writeMessage(7, boxes_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox element : getBoxesList()) { + output.writeMessage(7, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasMaxZoom()) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(1, maxZoom_); + .computeInt32Size(1, getMaxZoom()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasMinZoom()) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(2, minZoom_); + .computeInt32Size(2, getMinZoom()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasLeft()) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(3, left_); + .computeInt32Size(3, getLeft()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasRight()) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(4, right_); + .computeInt32Size(4, getRight()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasTop()) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(5, top_); + .computeInt32Size(5, getTop()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (hasBottom()) { size += com.google.protobuf.CodedOutputStream - .computeInt32Size(6, bottom_); + .computeInt32Size(6, getBottom()); } - for (int i = 0; i < boxes_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox element : getBoxesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, boxes_.get(i)); + .computeMessageSize(7, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -4470,146 +2785,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevelOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapRootLevel_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapRootLevel_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel result; // Construct using net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBoxesFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel(); + return builder; } - public Builder clear() { - super.clear(); - maxZoom_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - minZoom_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - left_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - right_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - top_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - bottom_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - if (boxesBuilder_ == null) { - boxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - boxesBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel build() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.maxZoom_ = maxZoom_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.boxes_ != java.util.Collections.EMPTY_LIST) { + result.boxes_ = + java.util.Collections.unmodifiableList(result.boxes_); } - result.minZoom_ = minZoom_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.left_ = left_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.right_ = right_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.top_ = top_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.bottom_ = bottom_; - if (boxesBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { - boxes_ = java.util.Collections.unmodifiableList(boxes_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.boxes_ = boxes_; - } else { - result.boxes_ = boxesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel)other); } else { @@ -4638,71 +2903,18 @@ public final class OsmandOdb { if (other.hasBottom()) { setBottom(other.getBottom()); } - if (boxesBuilder_ == null) { - if (!other.boxes_.isEmpty()) { - if (boxes_.isEmpty()) { - boxes_ = other.boxes_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureBoxesIsMutable(); - boxes_.addAll(other.boxes_); - } - onChanged(); - } - } else { - if (!other.boxes_.isEmpty()) { - if (boxesBuilder_.isEmpty()) { - boxesBuilder_.dispose(); - boxesBuilder_ = null; - boxes_ = other.boxes_; - bitField0_ = (bitField0_ & ~0x00000040); - boxesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBoxesFieldBuilder() : null; - } else { - boxesBuilder_.addAllMessages(other.boxes_); - } + if (!other.boxes_.isEmpty()) { + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + result.boxes_.addAll(other.boxes_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasMaxZoom()) { - - return false; - } - if (!hasMinZoom()) { - - return false; - } - if (!hasLeft()) { - - return false; - } - if (!hasRight()) { - - return false; - } - if (!hasTop()) { - - return false; - } - if (!hasBottom()) { - - return false; - } - for (int i = 0; i < getBoxesCount(); i++) { - if (!getBoxes(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -4714,45 +2926,37 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - maxZoom_ = input.readInt32(); + setMaxZoom(input.readInt32()); break; } case 16: { - bitField0_ |= 0x00000002; - minZoom_ = input.readInt32(); + setMinZoom(input.readInt32()); break; } case 24: { - bitField0_ |= 0x00000004; - left_ = input.readInt32(); + setLeft(input.readInt32()); break; } case 32: { - bitField0_ |= 0x00000008; - right_ = input.readInt32(); + setRight(input.readInt32()); break; } case 40: { - bitField0_ |= 0x00000010; - top_ = input.readInt32(); + setTop(input.readInt32()); break; } case 48: { - bitField0_ |= 0x00000020; - bottom_ = input.readInt32(); + setBottom(input.readInt32()); break; } case 58: { @@ -4765,370 +2969,183 @@ public final class OsmandOdb { } } - private int bitField0_; // required int32 maxZoom = 1; - private int maxZoom_ ; public boolean hasMaxZoom() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasMaxZoom(); } public int getMaxZoom() { - return maxZoom_; + return result.getMaxZoom(); } public Builder setMaxZoom(int value) { - bitField0_ |= 0x00000001; - maxZoom_ = value; - onChanged(); + result.hasMaxZoom = true; + result.maxZoom_ = value; return this; } public Builder clearMaxZoom() { - bitField0_ = (bitField0_ & ~0x00000001); - maxZoom_ = 0; - onChanged(); + result.hasMaxZoom = false; + result.maxZoom_ = 0; return this; } // required int32 minZoom = 2; - private int minZoom_ ; public boolean hasMinZoom() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasMinZoom(); } public int getMinZoom() { - return minZoom_; + return result.getMinZoom(); } public Builder setMinZoom(int value) { - bitField0_ |= 0x00000002; - minZoom_ = value; - onChanged(); + result.hasMinZoom = true; + result.minZoom_ = value; return this; } public Builder clearMinZoom() { - bitField0_ = (bitField0_ & ~0x00000002); - minZoom_ = 0; - onChanged(); + result.hasMinZoom = false; + result.minZoom_ = 0; return this; } // required int32 left = 3; - private int left_ ; public boolean hasLeft() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasLeft(); } public int getLeft() { - return left_; + return result.getLeft(); } public Builder setLeft(int value) { - bitField0_ |= 0x00000004; - left_ = value; - onChanged(); + result.hasLeft = true; + result.left_ = value; return this; } public Builder clearLeft() { - bitField0_ = (bitField0_ & ~0x00000004); - left_ = 0; - onChanged(); + result.hasLeft = false; + result.left_ = 0; return this; } // required int32 right = 4; - private int right_ ; public boolean hasRight() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasRight(); } public int getRight() { - return right_; + return result.getRight(); } public Builder setRight(int value) { - bitField0_ |= 0x00000008; - right_ = value; - onChanged(); + result.hasRight = true; + result.right_ = value; return this; } public Builder clearRight() { - bitField0_ = (bitField0_ & ~0x00000008); - right_ = 0; - onChanged(); + result.hasRight = false; + result.right_ = 0; return this; } // required int32 top = 5; - private int top_ ; public boolean hasTop() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasTop(); } public int getTop() { - return top_; + return result.getTop(); } public Builder setTop(int value) { - bitField0_ |= 0x00000010; - top_ = value; - onChanged(); + result.hasTop = true; + result.top_ = value; return this; } public Builder clearTop() { - bitField0_ = (bitField0_ & ~0x00000010); - top_ = 0; - onChanged(); + result.hasTop = false; + result.top_ = 0; return this; } // required int32 bottom = 6; - private int bottom_ ; public boolean hasBottom() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return result.hasBottom(); } public int getBottom() { - return bottom_; + return result.getBottom(); } public Builder setBottom(int value) { - bitField0_ |= 0x00000020; - bottom_ = value; - onChanged(); + result.hasBottom = true; + result.bottom_ = value; return this; } public Builder clearBottom() { - bitField0_ = (bitField0_ & ~0x00000020); - bottom_ = 0; - onChanged(); + result.hasBottom = false; + result.bottom_ = 0; return this; } // repeated .OsmAndMapIndex.MapDataBox boxes = 7; - private java.util.List boxes_ = - java.util.Collections.emptyList(); - private void ensureBoxesIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - boxes_ = new java.util.ArrayList(boxes_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder> boxesBuilder_; - public java.util.List getBoxesList() { - if (boxesBuilder_ == null) { - return java.util.Collections.unmodifiableList(boxes_); - } else { - return boxesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.boxes_); } public int getBoxesCount() { - if (boxesBuilder_ == null) { - return boxes_.size(); - } else { - return boxesBuilder_.getCount(); - } + return result.getBoxesCount(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox getBoxes(int index) { - if (boxesBuilder_ == null) { - return boxes_.get(index); - } else { - return boxesBuilder_.getMessage(index); - } + return result.getBoxes(index); } - public Builder setBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.set(index, value); - onChanged(); - } else { - boxesBuilder_.setMessage(index, value); + public Builder setBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox value) { + if (value == null) { + throw new NullPointerException(); } + result.boxes_.set(index, value); return this; } - public Builder setBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.set(index, builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { + result.boxes_.set(index, builderForValue.build()); return this; } public Builder addBoxes(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.add(value); - onChanged(); - } else { - boxesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); + } + result.boxes_.add(value); return this; } - public Builder addBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.add(index, value); - onChanged(); - } else { - boxesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBoxes( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.add(builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.add(index, builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.addMessage(index, builderForValue.build()); + public Builder addBoxes(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + result.boxes_.add(builderForValue.build()); return this; } public Builder addAllBoxes( java.lang.Iterable values) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - super.addAll(values, boxes_); - onChanged(); - } else { - boxesBuilder_.addAllMessages(values); + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + super.addAll(values, result.boxes_); return this; } public Builder clearBoxes() { - if (boxesBuilder_ == null) { - boxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - boxesBuilder_.clear(); - } + result.boxes_ = java.util.Collections.emptyList(); return this; } - public Builder removeBoxes(int index) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.remove(index); - onChanged(); - } else { - boxesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder getBoxesBuilder( - int index) { - return getBoxesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder getBoxesOrBuilder( - int index) { - if (boxesBuilder_ == null) { - return boxes_.get(index); } else { - return boxesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBoxesOrBuilderList() { - if (boxesBuilder_ != null) { - return boxesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boxes_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder addBoxesBuilder() { - return getBoxesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder addBoxesBuilder( - int index) { - return getBoxesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.getDefaultInstance()); - } - public java.util.List - getBoxesBuilderList() { - return getBoxesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder> - getBoxesFieldBuilder() { - if (boxesBuilder_ == null) { - boxesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder>( - boxes_, - ((bitField0_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - boxes_ = null; - } - return boxesBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndMapIndex.MapRootLevel) } static { defaultInstance = new MapRootLevel(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndMapIndex.MapRootLevel) } - public interface MapDataBoxOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required sint32 left = 1; - boolean hasLeft(); - int getLeft(); - - // required sint32 right = 2; - boolean hasRight(); - int getRight(); - - // required sint32 top = 3; - boolean hasTop(); - int getTop(); - - // required sint32 bottom = 4; - boolean hasBottom(); - int getBottom(); - - // optional uint32 shiftToMapData = 5; - boolean hasShiftToMapData(); - int getShiftToMapData(); - - // repeated .OsmAndMapIndex.MapDataBox boxes = 7; - java.util.List - getBoxesList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox getBoxes(int index); - int getBoxesCount(); - java.util.List - getBoxesOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder getBoxesOrBuilder( - int index); - } public static final class MapDataBox extends - com.google.protobuf.GeneratedMessage - implements MapDataBoxOrBuilder { + com.google.protobuf.GeneratedMessage { // Use MapDataBox.newBuilder() to construct. - private MapDataBox(Builder builder) { - super(builder); + private MapDataBox() { + initFields(); } private MapDataBox(boolean noInit) {} @@ -5137,7 +3154,8 @@ public final class OsmandOdb { return defaultInstance; } - public MapDataBox getDefaultInstanceForType() { + @Override + public MapDataBox getDefaultInstanceForType() { return defaultInstance; } @@ -5146,188 +3164,148 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapDataBox_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapDataBox_fieldAccessorTable; } - private int bitField0_; // required sint32 left = 1; public static final int LEFT_FIELD_NUMBER = 1; - private int left_; - public boolean hasLeft() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getLeft() { - return left_; - } + private boolean hasLeft; + private int left_ = 0; + public boolean hasLeft() { return hasLeft; } + public int getLeft() { return left_; } // required sint32 right = 2; public static final int RIGHT_FIELD_NUMBER = 2; - private int right_; - public boolean hasRight() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getRight() { - return right_; - } + private boolean hasRight; + private int right_ = 0; + public boolean hasRight() { return hasRight; } + public int getRight() { return right_; } // required sint32 top = 3; public static final int TOP_FIELD_NUMBER = 3; - private int top_; - public boolean hasTop() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getTop() { - return top_; - } + private boolean hasTop; + private int top_ = 0; + public boolean hasTop() { return hasTop; } + public int getTop() { return top_; } // required sint32 bottom = 4; public static final int BOTTOM_FIELD_NUMBER = 4; - private int bottom_; - public boolean hasBottom() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getBottom() { - return bottom_; - } + private boolean hasBottom; + private int bottom_ = 0; + public boolean hasBottom() { return hasBottom; } + public int getBottom() { return bottom_; } - // optional uint32 shiftToMapData = 5; + // optional fixed32 shiftToMapData = 5; public static final int SHIFTTOMAPDATA_FIELD_NUMBER = 5; - private int shiftToMapData_; - public boolean hasShiftToMapData() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getShiftToMapData() { - return shiftToMapData_; - } + private boolean hasShiftToMapData; + private int shiftToMapData_ = 0; + public boolean hasShiftToMapData() { return hasShiftToMapData; } + public int getShiftToMapData() { return shiftToMapData_; } + + // optional bool ocean = 6; + public static final int OCEAN_FIELD_NUMBER = 6; + private boolean hasOcean; + private boolean ocean_ = false; + public boolean hasOcean() { return hasOcean; } + public boolean getOcean() { return ocean_; } // repeated .OsmAndMapIndex.MapDataBox boxes = 7; public static final int BOXES_FIELD_NUMBER = 7; - private java.util.List boxes_; + private java.util.List boxes_ = + java.util.Collections.emptyList(); public java.util.List getBoxesList() { return boxes_; } - public java.util.List - getBoxesOrBuilderList() { - return boxes_; - } - public int getBoxesCount() { - return boxes_.size(); - } + public int getBoxesCount() { return boxes_.size(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox getBoxes(int index) { return boxes_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder getBoxesOrBuilder( - int index) { - return boxes_.get(index); - } private void initFields() { - left_ = 0; - right_ = 0; - top_ = 0; - bottom_ = 0; - shiftToMapData_ = 0; - boxes_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasLeft()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasLeft) return false; + if (!hasRight) return false; + if (!hasTop) return false; + if (!hasBottom) return false; + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox element : getBoxesList()) { + if (!element.isInitialized()) return false; } - if (!hasRight()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTop()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasBottom()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getBoxesCount(); i++) { - if (!getBoxes(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeSInt32(1, left_); + if (hasLeft()) { + output.writeSInt32(1, getLeft()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeSInt32(2, right_); + if (hasRight()) { + output.writeSInt32(2, getRight()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeSInt32(3, top_); + if (hasTop()) { + output.writeSInt32(3, getTop()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeSInt32(4, bottom_); + if (hasBottom()) { + output.writeSInt32(4, getBottom()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(5, shiftToMapData_); + if (hasShiftToMapData()) { + output.writeFixed32(5, getShiftToMapData()); } - for (int i = 0; i < boxes_.size(); i++) { - output.writeMessage(7, boxes_.get(i)); + if (hasOcean()) { + output.writeBool(6, getOcean()); + } + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox element : getBoxesList()) { + output.writeMessage(7, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasLeft()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, left_); + .computeSInt32Size(1, getLeft()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasRight()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(2, right_); + .computeSInt32Size(2, getRight()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasTop()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(3, top_); + .computeSInt32Size(3, getTop()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasBottom()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(4, bottom_); + .computeSInt32Size(4, getBottom()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasShiftToMapData()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, shiftToMapData_); + .computeFixed32Size(5, getShiftToMapData()); } - for (int i = 0; i < boxes_.size(); i++) { + if (hasOcean()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, boxes_.get(i)); + .computeBoolSize(6, getOcean()); + } + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox element : getBoxesList()) { + size += com.google.protobuf.CodedOutputStream + .computeMessageSize(7, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -5396,140 +3374,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapDataBox_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapDataBox_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox result; // Construct using net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBoxesFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox(); + return builder; } - public Builder clear() { - super.clear(); - left_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - right_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - top_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - bottom_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - shiftToMapData_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - if (boxesBuilder_ == null) { - boxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - boxesBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox build() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.left_ = left_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.boxes_ != java.util.Collections.EMPTY_LIST) { + result.boxes_ = + java.util.Collections.unmodifiableList(result.boxes_); } - result.right_ = right_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.top_ = top_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.bottom_ = bottom_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.shiftToMapData_ = shiftToMapData_; - if (boxesBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - boxes_ = java.util.Collections.unmodifiableList(boxes_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.boxes_ = boxes_; - } else { - result.boxes_ = boxesBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox)other); } else { @@ -5555,63 +3489,21 @@ public final class OsmandOdb { if (other.hasShiftToMapData()) { setShiftToMapData(other.getShiftToMapData()); } - if (boxesBuilder_ == null) { - if (!other.boxes_.isEmpty()) { - if (boxes_.isEmpty()) { - boxes_ = other.boxes_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBoxesIsMutable(); - boxes_.addAll(other.boxes_); - } - onChanged(); - } - } else { - if (!other.boxes_.isEmpty()) { - if (boxesBuilder_.isEmpty()) { - boxesBuilder_.dispose(); - boxesBuilder_ = null; - boxes_ = other.boxes_; - bitField0_ = (bitField0_ & ~0x00000020); - boxesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBoxesFieldBuilder() : null; - } else { - boxesBuilder_.addAllMessages(other.boxes_); - } + if (other.hasOcean()) { + setOcean(other.getOcean()); + } + if (!other.boxes_.isEmpty()) { + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + result.boxes_.addAll(other.boxes_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasLeft()) { - - return false; - } - if (!hasRight()) { - - return false; - } - if (!hasTop()) { - - return false; - } - if (!hasBottom()) { - - return false; - } - for (int i = 0; i < getBoxesCount(); i++) { - if (!getBoxes(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -5623,40 +3515,37 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - left_ = input.readSInt32(); + setLeft(input.readSInt32()); break; } case 16: { - bitField0_ |= 0x00000002; - right_ = input.readSInt32(); + setRight(input.readSInt32()); break; } case 24: { - bitField0_ |= 0x00000004; - top_ = input.readSInt32(); + setTop(input.readSInt32()); break; } case 32: { - bitField0_ |= 0x00000008; - bottom_ = input.readSInt32(); + setBottom(input.readSInt32()); break; } - case 40: { - bitField0_ |= 0x00000010; - shiftToMapData_ = input.readUInt32(); + case 45: { + setShiftToMapData(input.readFixed32()); + break; + } + case 48: { + setOcean(input.readBool()); break; } case 58: { @@ -5669,329 +3558,183 @@ public final class OsmandOdb { } } - private int bitField0_; // required sint32 left = 1; - private int left_ ; public boolean hasLeft() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasLeft(); } public int getLeft() { - return left_; + return result.getLeft(); } public Builder setLeft(int value) { - bitField0_ |= 0x00000001; - left_ = value; - onChanged(); + result.hasLeft = true; + result.left_ = value; return this; } public Builder clearLeft() { - bitField0_ = (bitField0_ & ~0x00000001); - left_ = 0; - onChanged(); + result.hasLeft = false; + result.left_ = 0; return this; } // required sint32 right = 2; - private int right_ ; public boolean hasRight() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasRight(); } public int getRight() { - return right_; + return result.getRight(); } public Builder setRight(int value) { - bitField0_ |= 0x00000002; - right_ = value; - onChanged(); + result.hasRight = true; + result.right_ = value; return this; } public Builder clearRight() { - bitField0_ = (bitField0_ & ~0x00000002); - right_ = 0; - onChanged(); + result.hasRight = false; + result.right_ = 0; return this; } // required sint32 top = 3; - private int top_ ; public boolean hasTop() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasTop(); } public int getTop() { - return top_; + return result.getTop(); } public Builder setTop(int value) { - bitField0_ |= 0x00000004; - top_ = value; - onChanged(); + result.hasTop = true; + result.top_ = value; return this; } public Builder clearTop() { - bitField0_ = (bitField0_ & ~0x00000004); - top_ = 0; - onChanged(); + result.hasTop = false; + result.top_ = 0; return this; } // required sint32 bottom = 4; - private int bottom_ ; public boolean hasBottom() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasBottom(); } public int getBottom() { - return bottom_; + return result.getBottom(); } public Builder setBottom(int value) { - bitField0_ |= 0x00000008; - bottom_ = value; - onChanged(); + result.hasBottom = true; + result.bottom_ = value; return this; } public Builder clearBottom() { - bitField0_ = (bitField0_ & ~0x00000008); - bottom_ = 0; - onChanged(); + result.hasBottom = false; + result.bottom_ = 0; return this; } - // optional uint32 shiftToMapData = 5; - private int shiftToMapData_ ; + // optional fixed32 shiftToMapData = 5; public boolean hasShiftToMapData() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasShiftToMapData(); } public int getShiftToMapData() { - return shiftToMapData_; + return result.getShiftToMapData(); } public Builder setShiftToMapData(int value) { - bitField0_ |= 0x00000010; - shiftToMapData_ = value; - onChanged(); + result.hasShiftToMapData = true; + result.shiftToMapData_ = value; return this; } public Builder clearShiftToMapData() { - bitField0_ = (bitField0_ & ~0x00000010); - shiftToMapData_ = 0; - onChanged(); + result.hasShiftToMapData = false; + result.shiftToMapData_ = 0; + return this; + } + + // optional bool ocean = 6; + public boolean hasOcean() { + return result.hasOcean(); + } + public boolean getOcean() { + return result.getOcean(); + } + public Builder setOcean(boolean value) { + result.hasOcean = true; + result.ocean_ = value; + return this; + } + public Builder clearOcean() { + result.hasOcean = false; + result.ocean_ = false; return this; } // repeated .OsmAndMapIndex.MapDataBox boxes = 7; - private java.util.List boxes_ = - java.util.Collections.emptyList(); - private void ensureBoxesIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - boxes_ = new java.util.ArrayList(boxes_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder> boxesBuilder_; - public java.util.List getBoxesList() { - if (boxesBuilder_ == null) { - return java.util.Collections.unmodifiableList(boxes_); - } else { - return boxesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.boxes_); } public int getBoxesCount() { - if (boxesBuilder_ == null) { - return boxes_.size(); - } else { - return boxesBuilder_.getCount(); - } + return result.getBoxesCount(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox getBoxes(int index) { - if (boxesBuilder_ == null) { - return boxes_.get(index); - } else { - return boxesBuilder_.getMessage(index); - } + return result.getBoxes(index); } - public Builder setBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.set(index, value); - onChanged(); - } else { - boxesBuilder_.setMessage(index, value); + public Builder setBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox value) { + if (value == null) { + throw new NullPointerException(); } + result.boxes_.set(index, value); return this; } - public Builder setBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.set(index, builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { + result.boxes_.set(index, builderForValue.build()); return this; } public Builder addBoxes(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.add(value); - onChanged(); - } else { - boxesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); + } + result.boxes_.add(value); return this; } - public Builder addBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.add(index, value); - onChanged(); - } else { - boxesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBoxes( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.add(builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.add(index, builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.addMessage(index, builderForValue.build()); + public Builder addBoxes(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder builderForValue) { + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + result.boxes_.add(builderForValue.build()); return this; } public Builder addAllBoxes( java.lang.Iterable values) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - super.addAll(values, boxes_); - onChanged(); - } else { - boxesBuilder_.addAllMessages(values); + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + super.addAll(values, result.boxes_); return this; } public Builder clearBoxes() { - if (boxesBuilder_ == null) { - boxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - boxesBuilder_.clear(); - } + result.boxes_ = java.util.Collections.emptyList(); return this; } - public Builder removeBoxes(int index) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.remove(index); - onChanged(); - } else { - boxesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder getBoxesBuilder( - int index) { - return getBoxesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder getBoxesOrBuilder( - int index) { - if (boxesBuilder_ == null) { - return boxes_.get(index); } else { - return boxesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBoxesOrBuilderList() { - if (boxesBuilder_ != null) { - return boxesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boxes_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder addBoxesBuilder() { - return getBoxesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder addBoxesBuilder( - int index) { - return getBoxesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.getDefaultInstance()); - } - public java.util.List - getBoxesBuilderList() { - return getBoxesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder> - getBoxesFieldBuilder() { - if (boxesBuilder_ == null) { - boxesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBoxOrBuilder>( - boxes_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - boxes_ = null; - } - return boxesBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndMapIndex.MapDataBox) } static { defaultInstance = new MapDataBox(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndMapIndex.MapDataBox) } - public interface MapDataBlocksOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .MapDataBlock block = 6; - java.util.List - getBlockList(); - net.osmand.binary.OsmandOdb.MapDataBlock getBlock(int index); - int getBlockCount(); - java.util.List - getBlockOrBuilderList(); - net.osmand.binary.OsmandOdb.MapDataBlockOrBuilder getBlockOrBuilder( - int index); - } public static final class MapDataBlocks extends - com.google.protobuf.GeneratedMessage - implements MapDataBlocksOrBuilder { + com.google.protobuf.GeneratedMessage { // Use MapDataBlocks.newBuilder() to construct. - private MapDataBlocks(Builder builder) { - super(builder); + private MapDataBlocks() { + initFields(); } private MapDataBlocks(boolean noInit) {} @@ -6000,7 +3743,8 @@ public final class OsmandOdb { return defaultInstance; } - public MapDataBlocks getDefaultInstanceForType() { + @Override + public MapDataBlocks getDefaultInstanceForType() { return defaultInstance; } @@ -6009,81 +3753,60 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapDataBlocks_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapDataBlocks_fieldAccessorTable; } // repeated .MapDataBlock block = 6; public static final int BLOCK_FIELD_NUMBER = 6; - private java.util.List block_; + private java.util.List block_ = + java.util.Collections.emptyList(); public java.util.List getBlockList() { return block_; } - public java.util.List - getBlockOrBuilderList() { - return block_; - } - public int getBlockCount() { - return block_.size(); - } + public int getBlockCount() { return block_.size(); } public net.osmand.binary.OsmandOdb.MapDataBlock getBlock(int index) { return block_.get(index); } - public net.osmand.binary.OsmandOdb.MapDataBlockOrBuilder getBlockOrBuilder( - int index) { - return block_.get(index); - } private void initFields() { - block_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - for (int i = 0; i < getBlockCount(); i++) { - if (!getBlock(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + for (net.osmand.binary.OsmandOdb.MapDataBlock element : getBlockList()) { + if (!element.isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < block_.size(); i++) { - output.writeMessage(6, block_.get(i)); + for (net.osmand.binary.OsmandOdb.MapDataBlock element : getBlockList()) { + output.writeMessage(6, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - for (int i = 0; i < block_.size(); i++) { + for (net.osmand.binary.OsmandOdb.MapDataBlock element : getBlockList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, block_.get(i)); + .computeMessageSize(6, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -6152,108 +3875,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocksOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapDataBlocks_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_MapDataBlocks_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks result; // Construct using net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBlockFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks(); + return builder; } - public Builder clear() { - super.clear(); - if (blockBuilder_ == null) { - block_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blockBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks build() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks(this); - int from_bitField0_ = bitField0_; - if (blockBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - block_ = java.util.Collections.unmodifiableList(block_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.block_ = block_; - } else { - result.block_ = blockBuilder_.build(); + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - onBuilt(); - return result; + if (result.block_ != java.util.Collections.EMPTY_LIST) { + result.block_ = + java.util.Collections.unmodifiableList(result.block_); + } + net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks)other); } else { @@ -6264,47 +3975,18 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks other) { if (other == net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.getDefaultInstance()) return this; - if (blockBuilder_ == null) { - if (!other.block_.isEmpty()) { - if (block_.isEmpty()) { - block_ = other.block_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlockIsMutable(); - block_.addAll(other.block_); - } - onChanged(); - } - } else { - if (!other.block_.isEmpty()) { - if (blockBuilder_.isEmpty()) { - blockBuilder_.dispose(); - blockBuilder_ = null; - block_ = other.block_; - bitField0_ = (bitField0_ & ~0x00000001); - blockBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBlockFieldBuilder() : null; - } else { - blockBuilder_.addAllMessages(other.block_); - } + if (!other.block_.isEmpty()) { + if (result.block_.isEmpty()) { + result.block_ = new java.util.ArrayList(); } + result.block_.addAll(other.block_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - for (int i = 0; i < getBlockCount(); i++) { - if (!getBlock(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -6316,13 +3998,11 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; @@ -6337,390 +4017,177 @@ public final class OsmandOdb { } } - private int bitField0_; // repeated .MapDataBlock block = 6; - private java.util.List block_ = - java.util.Collections.emptyList(); - private void ensureBlockIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - block_ = new java.util.ArrayList(block_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.MapDataBlock, net.osmand.binary.OsmandOdb.MapDataBlock.Builder, net.osmand.binary.OsmandOdb.MapDataBlockOrBuilder> blockBuilder_; - public java.util.List getBlockList() { - if (blockBuilder_ == null) { - return java.util.Collections.unmodifiableList(block_); - } else { - return blockBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.block_); } public int getBlockCount() { - if (blockBuilder_ == null) { - return block_.size(); - } else { - return blockBuilder_.getCount(); - } + return result.getBlockCount(); } public net.osmand.binary.OsmandOdb.MapDataBlock getBlock(int index) { - if (blockBuilder_ == null) { - return block_.get(index); - } else { - return blockBuilder_.getMessage(index); - } + return result.getBlock(index); } - public Builder setBlock( - int index, net.osmand.binary.OsmandOdb.MapDataBlock value) { - if (blockBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlockIsMutable(); - block_.set(index, value); - onChanged(); - } else { - blockBuilder_.setMessage(index, value); + public Builder setBlock(int index, net.osmand.binary.OsmandOdb.MapDataBlock value) { + if (value == null) { + throw new NullPointerException(); } + result.block_.set(index, value); return this; } - public Builder setBlock( - int index, net.osmand.binary.OsmandOdb.MapDataBlock.Builder builderForValue) { - if (blockBuilder_ == null) { - ensureBlockIsMutable(); - block_.set(index, builderForValue.build()); - onChanged(); - } else { - blockBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBlock(int index, net.osmand.binary.OsmandOdb.MapDataBlock.Builder builderForValue) { + result.block_.set(index, builderForValue.build()); return this; } public Builder addBlock(net.osmand.binary.OsmandOdb.MapDataBlock value) { - if (blockBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlockIsMutable(); - block_.add(value); - onChanged(); - } else { - blockBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.block_.isEmpty()) { + result.block_ = new java.util.ArrayList(); + } + result.block_.add(value); return this; } - public Builder addBlock( - int index, net.osmand.binary.OsmandOdb.MapDataBlock value) { - if (blockBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlockIsMutable(); - block_.add(index, value); - onChanged(); - } else { - blockBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBlock( - net.osmand.binary.OsmandOdb.MapDataBlock.Builder builderForValue) { - if (blockBuilder_ == null) { - ensureBlockIsMutable(); - block_.add(builderForValue.build()); - onChanged(); - } else { - blockBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBlock( - int index, net.osmand.binary.OsmandOdb.MapDataBlock.Builder builderForValue) { - if (blockBuilder_ == null) { - ensureBlockIsMutable(); - block_.add(index, builderForValue.build()); - onChanged(); - } else { - blockBuilder_.addMessage(index, builderForValue.build()); + public Builder addBlock(net.osmand.binary.OsmandOdb.MapDataBlock.Builder builderForValue) { + if (result.block_.isEmpty()) { + result.block_ = new java.util.ArrayList(); } + result.block_.add(builderForValue.build()); return this; } public Builder addAllBlock( java.lang.Iterable values) { - if (blockBuilder_ == null) { - ensureBlockIsMutable(); - super.addAll(values, block_); - onChanged(); - } else { - blockBuilder_.addAllMessages(values); + if (result.block_.isEmpty()) { + result.block_ = new java.util.ArrayList(); } + super.addAll(values, result.block_); return this; } public Builder clearBlock() { - if (blockBuilder_ == null) { - block_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blockBuilder_.clear(); - } + result.block_ = java.util.Collections.emptyList(); return this; } - public Builder removeBlock(int index) { - if (blockBuilder_ == null) { - ensureBlockIsMutable(); - block_.remove(index); - onChanged(); - } else { - blockBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.MapDataBlock.Builder getBlockBuilder( - int index) { - return getBlockFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.MapDataBlockOrBuilder getBlockOrBuilder( - int index) { - if (blockBuilder_ == null) { - return block_.get(index); } else { - return blockBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBlockOrBuilderList() { - if (blockBuilder_ != null) { - return blockBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(block_); - } - } - public net.osmand.binary.OsmandOdb.MapDataBlock.Builder addBlockBuilder() { - return getBlockFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.MapDataBlock.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.MapDataBlock.Builder addBlockBuilder( - int index) { - return getBlockFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.MapDataBlock.getDefaultInstance()); - } - public java.util.List - getBlockBuilderList() { - return getBlockFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.MapDataBlock, net.osmand.binary.OsmandOdb.MapDataBlock.Builder, net.osmand.binary.OsmandOdb.MapDataBlockOrBuilder> - getBlockFieldBuilder() { - if (blockBuilder_ == null) { - blockBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.MapDataBlock, net.osmand.binary.OsmandOdb.MapDataBlock.Builder, net.osmand.binary.OsmandOdb.MapDataBlockOrBuilder>( - block_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - block_ = null; - } - return blockBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndMapIndex.MapDataBlocks) } static { defaultInstance = new MapDataBlocks(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndMapIndex.MapDataBlocks) } - private int bitField0_; // required string name = 2; public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // repeated .OsmAndMapIndex.MapEncodingRule rules = 4; public static final int RULES_FIELD_NUMBER = 4; - private java.util.List rules_; + private java.util.List rules_ = + java.util.Collections.emptyList(); public java.util.List getRulesList() { return rules_; } - public java.util.List - getRulesOrBuilderList() { - return rules_; - } - public int getRulesCount() { - return rules_.size(); - } + public int getRulesCount() { return rules_.size(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule getRules(int index) { return rules_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRuleOrBuilder getRulesOrBuilder( - int index) { - return rules_.get(index); - } // repeated .OsmAndMapIndex.MapRootLevel levels = 5; public static final int LEVELS_FIELD_NUMBER = 5; - private java.util.List levels_; + private java.util.List levels_ = + java.util.Collections.emptyList(); public java.util.List getLevelsList() { return levels_; } - public java.util.List - getLevelsOrBuilderList() { - return levels_; - } - public int getLevelsCount() { - return levels_.size(); - } + public int getLevelsCount() { return levels_.size(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel getLevels(int index) { return levels_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevelOrBuilder getLevelsOrBuilder( - int index) { - return levels_.get(index); - } // repeated .OsmAndMapIndex.MapDataBlocks blocks = 7; public static final int BLOCKS_FIELD_NUMBER = 7; - private java.util.List blocks_; + private java.util.List blocks_ = + java.util.Collections.emptyList(); public java.util.List getBlocksList() { return blocks_; } - public java.util.List - getBlocksOrBuilderList() { - return blocks_; - } - public int getBlocksCount() { - return blocks_.size(); - } + public int getBlocksCount() { return blocks_.size(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks getBlocks(int index) { return blocks_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocksOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); - } private void initFields() { - name_ = ""; - rules_ = java.util.Collections.emptyList(); - levels_ = java.util.Collections.emptyList(); - blocks_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasName()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasName) return false; + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule element : getRulesList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getRulesCount(); i++) { - if (!getRules(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel element : getLevelsList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getLevelsCount(); i++) { - if (!getLevels(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks element : getBlocksList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getBlocksCount(); i++) { - if (!getBlocks(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(2, getNameBytes()); + if (hasName()) { + output.writeString(2, getName()); } - for (int i = 0; i < rules_.size(); i++) { - output.writeMessage(4, rules_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule element : getRulesList()) { + output.writeMessage(4, element); } - for (int i = 0; i < levels_.size(); i++) { - output.writeMessage(5, levels_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel element : getLevelsList()) { + output.writeMessage(5, element); } - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(7, blocks_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks element : getBlocksList()) { + output.writeMessage(7, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameBytes()); + .computeStringSize(2, getName()); } - for (int i = 0; i < rules_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule element : getRulesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, rules_.get(i)); + .computeMessageSize(4, element); } - for (int i = 0; i < levels_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel element : getLevelsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, levels_.get(i)); + .computeMessageSize(5, element); } - for (int i = 0; i < blocks_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks element : getBlocksList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, blocks_.get(i)); + .computeMessageSize(7, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndMapIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -6789,148 +4256,104 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndMapIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndMapIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndMapIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndMapIndex result; // Construct using net.osmand.binary.OsmandOdb.OsmAndMapIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRulesFieldBuilder(); - getLevelsFieldBuilder(); - getBlocksFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex(); + return builder; } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - rulesBuilder_.clear(); - } - if (levelsBuilder_ == null) { - levels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - levelsBuilder_.clear(); - } - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - blocksBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndMapIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndMapIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex build() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndMapIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndMapIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndMapIndex result = new net.osmand.binary.OsmandOdb.OsmAndMapIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndMapIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.name_ = name_; - if (rulesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - rules_ = java.util.Collections.unmodifiableList(rules_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.rules_ = rules_; - } else { - result.rules_ = rulesBuilder_.build(); + if (result.rules_ != java.util.Collections.EMPTY_LIST) { + result.rules_ = + java.util.Collections.unmodifiableList(result.rules_); } - if (levelsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - levels_ = java.util.Collections.unmodifiableList(levels_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.levels_ = levels_; - } else { - result.levels_ = levelsBuilder_.build(); + if (result.levels_ != java.util.Collections.EMPTY_LIST) { + result.levels_ = + java.util.Collections.unmodifiableList(result.levels_); } - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); + if (result.blocks_ != java.util.Collections.EMPTY_LIST) { + result.blocks_ = + java.util.Collections.unmodifiableList(result.blocks_); } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndMapIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndMapIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndMapIndex)other); } else { @@ -6944,115 +4367,30 @@ public final class OsmandOdb { if (other.hasName()) { setName(other.getName()); } - if (rulesBuilder_ == null) { - if (!other.rules_.isEmpty()) { - if (rules_.isEmpty()) { - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureRulesIsMutable(); - rules_.addAll(other.rules_); - } - onChanged(); - } - } else { - if (!other.rules_.isEmpty()) { - if (rulesBuilder_.isEmpty()) { - rulesBuilder_.dispose(); - rulesBuilder_ = null; - rules_ = other.rules_; - bitField0_ = (bitField0_ & ~0x00000002); - rulesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRulesFieldBuilder() : null; - } else { - rulesBuilder_.addAllMessages(other.rules_); - } + if (!other.rules_.isEmpty()) { + if (result.rules_.isEmpty()) { + result.rules_ = new java.util.ArrayList(); } + result.rules_.addAll(other.rules_); } - if (levelsBuilder_ == null) { - if (!other.levels_.isEmpty()) { - if (levels_.isEmpty()) { - levels_ = other.levels_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureLevelsIsMutable(); - levels_.addAll(other.levels_); - } - onChanged(); - } - } else { - if (!other.levels_.isEmpty()) { - if (levelsBuilder_.isEmpty()) { - levelsBuilder_.dispose(); - levelsBuilder_ = null; - levels_ = other.levels_; - bitField0_ = (bitField0_ & ~0x00000004); - levelsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLevelsFieldBuilder() : null; - } else { - levelsBuilder_.addAllMessages(other.levels_); - } + if (!other.levels_.isEmpty()) { + if (result.levels_.isEmpty()) { + result.levels_ = new java.util.ArrayList(); } + result.levels_.addAll(other.levels_); } - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000008); - blocksBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBlocksFieldBuilder() : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } + if (!other.blocks_.isEmpty()) { + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + result.blocks_.addAll(other.blocks_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasName()) { - - return false; - } - for (int i = 0; i < getRulesCount(); i++) { - if (!getRules(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getLevelsCount(); i++) { - if (!getLevels(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getBlocksCount(); i++) { - if (!getBlocks(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -7064,20 +4402,17 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 18: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + setName(input.readString()); break; } case 34: { @@ -7102,641 +4437,198 @@ public final class OsmandOdb { } } - private int bitField0_; // required string name = 2; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - } // repeated .OsmAndMapIndex.MapEncodingRule rules = 4; - private java.util.List rules_ = - java.util.Collections.emptyList(); - private void ensureRulesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - rules_ = new java.util.ArrayList(rules_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRuleOrBuilder> rulesBuilder_; - public java.util.List getRulesList() { - if (rulesBuilder_ == null) { - return java.util.Collections.unmodifiableList(rules_); - } else { - return rulesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.rules_); } public int getRulesCount() { - if (rulesBuilder_ == null) { - return rules_.size(); - } else { - return rulesBuilder_.getCount(); - } + return result.getRulesCount(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule getRules(int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); - } else { - return rulesBuilder_.getMessage(index); - } + return result.getRules(index); } - public Builder setRules( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.set(index, value); - onChanged(); - } else { - rulesBuilder_.setMessage(index, value); + public Builder setRules(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule value) { + if (value == null) { + throw new NullPointerException(); } + result.rules_.set(index, value); return this; } - public Builder setRules( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.set(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setRules(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder builderForValue) { + result.rules_.set(index, builderForValue.build()); return this; } public Builder addRules(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(value); - onChanged(); - } else { - rulesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.rules_.isEmpty()) { + result.rules_ = new java.util.ArrayList(); + } + result.rules_.add(value); return this; } - public Builder addRules( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule value) { - if (rulesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRulesIsMutable(); - rules_.add(index, value); - onChanged(); - } else { - rulesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addRules( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addRules( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder builderForValue) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.add(index, builderForValue.build()); - onChanged(); - } else { - rulesBuilder_.addMessage(index, builderForValue.build()); + public Builder addRules(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder builderForValue) { + if (result.rules_.isEmpty()) { + result.rules_ = new java.util.ArrayList(); } + result.rules_.add(builderForValue.build()); return this; } public Builder addAllRules( java.lang.Iterable values) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - super.addAll(values, rules_); - onChanged(); - } else { - rulesBuilder_.addAllMessages(values); + if (result.rules_.isEmpty()) { + result.rules_ = new java.util.ArrayList(); } + super.addAll(values, result.rules_); return this; } public Builder clearRules() { - if (rulesBuilder_ == null) { - rules_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - rulesBuilder_.clear(); - } + result.rules_ = java.util.Collections.emptyList(); return this; } - public Builder removeRules(int index) { - if (rulesBuilder_ == null) { - ensureRulesIsMutable(); - rules_.remove(index); - onChanged(); - } else { - rulesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder getRulesBuilder( - int index) { - return getRulesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRuleOrBuilder getRulesOrBuilder( - int index) { - if (rulesBuilder_ == null) { - return rules_.get(index); } else { - return rulesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getRulesOrBuilderList() { - if (rulesBuilder_ != null) { - return rulesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(rules_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder addRulesBuilder() { - return getRulesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder addRulesBuilder( - int index) { - return getRulesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.getDefaultInstance()); - } - public java.util.List - getRulesBuilderList() { - return getRulesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRuleOrBuilder> - getRulesFieldBuilder() { - if (rulesBuilder_ == null) { - rulesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRuleOrBuilder>( - rules_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - rules_ = null; - } - return rulesBuilder_; - } // repeated .OsmAndMapIndex.MapRootLevel levels = 5; - private java.util.List levels_ = - java.util.Collections.emptyList(); - private void ensureLevelsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - levels_ = new java.util.ArrayList(levels_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevelOrBuilder> levelsBuilder_; - public java.util.List getLevelsList() { - if (levelsBuilder_ == null) { - return java.util.Collections.unmodifiableList(levels_); - } else { - return levelsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.levels_); } public int getLevelsCount() { - if (levelsBuilder_ == null) { - return levels_.size(); - } else { - return levelsBuilder_.getCount(); - } + return result.getLevelsCount(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel getLevels(int index) { - if (levelsBuilder_ == null) { - return levels_.get(index); - } else { - return levelsBuilder_.getMessage(index); - } + return result.getLevels(index); } - public Builder setLevels( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel value) { - if (levelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLevelsIsMutable(); - levels_.set(index, value); - onChanged(); - } else { - levelsBuilder_.setMessage(index, value); + public Builder setLevels(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel value) { + if (value == null) { + throw new NullPointerException(); } + result.levels_.set(index, value); return this; } - public Builder setLevels( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder builderForValue) { - if (levelsBuilder_ == null) { - ensureLevelsIsMutable(); - levels_.set(index, builderForValue.build()); - onChanged(); - } else { - levelsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setLevels(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder builderForValue) { + result.levels_.set(index, builderForValue.build()); return this; } public Builder addLevels(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel value) { - if (levelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLevelsIsMutable(); - levels_.add(value); - onChanged(); - } else { - levelsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.levels_.isEmpty()) { + result.levels_ = new java.util.ArrayList(); + } + result.levels_.add(value); return this; } - public Builder addLevels( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel value) { - if (levelsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLevelsIsMutable(); - levels_.add(index, value); - onChanged(); - } else { - levelsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addLevels( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder builderForValue) { - if (levelsBuilder_ == null) { - ensureLevelsIsMutable(); - levels_.add(builderForValue.build()); - onChanged(); - } else { - levelsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addLevels( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder builderForValue) { - if (levelsBuilder_ == null) { - ensureLevelsIsMutable(); - levels_.add(index, builderForValue.build()); - onChanged(); - } else { - levelsBuilder_.addMessage(index, builderForValue.build()); + public Builder addLevels(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder builderForValue) { + if (result.levels_.isEmpty()) { + result.levels_ = new java.util.ArrayList(); } + result.levels_.add(builderForValue.build()); return this; } public Builder addAllLevels( java.lang.Iterable values) { - if (levelsBuilder_ == null) { - ensureLevelsIsMutable(); - super.addAll(values, levels_); - onChanged(); - } else { - levelsBuilder_.addAllMessages(values); + if (result.levels_.isEmpty()) { + result.levels_ = new java.util.ArrayList(); } + super.addAll(values, result.levels_); return this; } public Builder clearLevels() { - if (levelsBuilder_ == null) { - levels_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - levelsBuilder_.clear(); - } + result.levels_ = java.util.Collections.emptyList(); return this; } - public Builder removeLevels(int index) { - if (levelsBuilder_ == null) { - ensureLevelsIsMutable(); - levels_.remove(index); - onChanged(); - } else { - levelsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder getLevelsBuilder( - int index) { - return getLevelsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevelOrBuilder getLevelsOrBuilder( - int index) { - if (levelsBuilder_ == null) { - return levels_.get(index); } else { - return levelsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getLevelsOrBuilderList() { - if (levelsBuilder_ != null) { - return levelsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(levels_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder addLevelsBuilder() { - return getLevelsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder addLevelsBuilder( - int index) { - return getLevelsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.getDefaultInstance()); - } - public java.util.List - getLevelsBuilderList() { - return getLevelsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevelOrBuilder> - getLevelsFieldBuilder() { - if (levelsBuilder_ == null) { - levelsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevel.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapRootLevelOrBuilder>( - levels_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - levels_ = null; - } - return levelsBuilder_; - } // repeated .OsmAndMapIndex.MapDataBlocks blocks = 7; - private java.util.List blocks_ = - java.util.Collections.emptyList(); - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - blocks_ = new java.util.ArrayList(blocks_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocksOrBuilder> blocksBuilder_; - public java.util.List getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.blocks_); } public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } + return result.getBlocksCount(); } public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); - } + return result.getBlocks(index); } - public Builder setBlocks( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); + public Builder setBlocks(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks value) { + if (value == null) { + throw new NullPointerException(); } + result.blocks_.set(index, value); return this; } - public Builder setBlocks( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBlocks(int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder builderForValue) { + result.blocks_.set(index, builderForValue.build()); return this; } public Builder addBlocks(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); + } + result.blocks_.add(value); return this; } - public Builder addBlocks( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBlocks( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBlocks( - int index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); + public Builder addBlocks(net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder builderForValue) { + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + result.blocks_.add(builderForValue.build()); return this; } public Builder addAllBlocks( java.lang.Iterable values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - super.addAll(values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + super.addAll(values, result.blocks_); return this; } public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - blocksBuilder_.clear(); - } + result.blocks_ = java.util.Collections.emptyList(); return this; } - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocksOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); } else { - return blocksBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder addBlocksBuilder() { - return getBlocksFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.getDefaultInstance()); - } - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocksOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocks.Builder, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBlocksOrBuilder>( - blocks_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - blocks_ = null; - } - return blocksBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndMapIndex) } static { defaultInstance = new OsmAndMapIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndMapIndex) } - public interface MapDataBlockOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional uint64 baseId = 10; - boolean hasBaseId(); - long getBaseId(); - - // repeated .MapData dataObjects = 12; - java.util.List - getDataObjectsList(); - net.osmand.binary.OsmandOdb.MapData getDataObjects(int index); - int getDataObjectsCount(); - java.util.List - getDataObjectsOrBuilderList(); - net.osmand.binary.OsmandOdb.MapDataOrBuilder getDataObjectsOrBuilder( - int index); - - // optional .StringTable stringTable = 15; - boolean hasStringTable(); - net.osmand.binary.OsmandOdb.StringTable getStringTable(); - net.osmand.binary.OsmandOdb.StringTableOrBuilder getStringTableOrBuilder(); - } public static final class MapDataBlock extends - com.google.protobuf.GeneratedMessage - implements MapDataBlockOrBuilder { + com.google.protobuf.GeneratedMessage { // Use MapDataBlock.newBuilder() to construct. - private MapDataBlock(Builder builder) { - super(builder); + private MapDataBlock() { + initFields(); } private MapDataBlock(boolean noInit) {} @@ -7745,7 +4637,8 @@ public final class OsmandOdb { return defaultInstance; } - public MapDataBlock getDefaultInstanceForType() { + @Override + public MapDataBlock getDefaultInstanceForType() { return defaultInstance; } @@ -7754,121 +4647,89 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_MapDataBlock_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_MapDataBlock_fieldAccessorTable; } - private int bitField0_; // optional uint64 baseId = 10; public static final int BASEID_FIELD_NUMBER = 10; - private long baseId_; - public boolean hasBaseId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public long getBaseId() { - return baseId_; - } + private boolean hasBaseId; + private long baseId_ = 0L; + public boolean hasBaseId() { return hasBaseId; } + public long getBaseId() { return baseId_; } // repeated .MapData dataObjects = 12; public static final int DATAOBJECTS_FIELD_NUMBER = 12; - private java.util.List dataObjects_; + private java.util.List dataObjects_ = + java.util.Collections.emptyList(); public java.util.List getDataObjectsList() { return dataObjects_; } - public java.util.List - getDataObjectsOrBuilderList() { - return dataObjects_; - } - public int getDataObjectsCount() { - return dataObjects_.size(); - } + public int getDataObjectsCount() { return dataObjects_.size(); } public net.osmand.binary.OsmandOdb.MapData getDataObjects(int index) { return dataObjects_.get(index); } - public net.osmand.binary.OsmandOdb.MapDataOrBuilder getDataObjectsOrBuilder( - int index) { - return dataObjects_.get(index); - } // optional .StringTable stringTable = 15; public static final int STRINGTABLE_FIELD_NUMBER = 15; + private boolean hasStringTable; private net.osmand.binary.OsmandOdb.StringTable stringTable_; - public boolean hasStringTable() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public net.osmand.binary.OsmandOdb.StringTable getStringTable() { - return stringTable_; - } - public net.osmand.binary.OsmandOdb.StringTableOrBuilder getStringTableOrBuilder() { - return stringTable_; - } + public boolean hasStringTable() { return hasStringTable; } + public net.osmand.binary.OsmandOdb.StringTable getStringTable() { return stringTable_; } private void initFields() { - baseId_ = 0L; - dataObjects_ = java.util.Collections.emptyList(); stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - for (int i = 0; i < getDataObjectsCount(); i++) { - if (!getDataObjects(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + for (net.osmand.binary.OsmandOdb.MapData element : getDataObjectsList()) { + if (!element.isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt64(10, baseId_); + if (hasBaseId()) { + output.writeUInt64(10, getBaseId()); } - for (int i = 0; i < dataObjects_.size(); i++) { - output.writeMessage(12, dataObjects_.get(i)); + for (net.osmand.binary.OsmandOdb.MapData element : getDataObjectsList()) { + output.writeMessage(12, element); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(15, stringTable_); + if (hasStringTable()) { + output.writeMessage(15, getStringTable()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasBaseId()) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(10, baseId_); + .computeUInt64Size(10, getBaseId()); } - for (int i = 0; i < dataObjects_.size(); i++) { + for (net.osmand.binary.OsmandOdb.MapData element : getDataObjectsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, dataObjects_.get(i)); + .computeMessageSize(12, element); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasStringTable()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, stringTable_); + .computeMessageSize(15, getStringTable()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.MapDataBlock parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -7937,131 +4798,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.MapDataBlock prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.MapDataBlockOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_MapDataBlock_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_MapDataBlock_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.MapDataBlock result; // Construct using net.osmand.binary.OsmandOdb.MapDataBlock.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDataObjectsFieldBuilder(); - getStringTableFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.MapDataBlock(); + return builder; } - public Builder clear() { - super.clear(); - baseId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - if (dataObjectsBuilder_ == null) { - dataObjects_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - dataObjectsBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.MapDataBlock internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } - if (stringTableBuilder_ == null) { - stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); - } else { - stringTableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); + result = new net.osmand.binary.OsmandOdb.MapDataBlock(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.MapDataBlock.getDescriptor(); } - public net.osmand.binary.OsmandOdb.MapDataBlock getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.MapDataBlock getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.MapDataBlock.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.MapDataBlock build() { - net.osmand.binary.OsmandOdb.MapDataBlock result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.MapDataBlock build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.MapDataBlock buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.MapDataBlock result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.MapDataBlock buildPartial() { - net.osmand.binary.OsmandOdb.MapDataBlock result = new net.osmand.binary.OsmandOdb.MapDataBlock(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.MapDataBlock buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.baseId_ = baseId_; - if (dataObjectsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - dataObjects_ = java.util.Collections.unmodifiableList(dataObjects_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.dataObjects_ = dataObjects_; - } else { - result.dataObjects_ = dataObjectsBuilder_.build(); + if (result.dataObjects_ != java.util.Collections.EMPTY_LIST) { + result.dataObjects_ = + java.util.Collections.unmodifiableList(result.dataObjects_); } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000002; - } - if (stringTableBuilder_ == null) { - result.stringTable_ = stringTable_; - } else { - result.stringTable_ = stringTableBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.MapDataBlock returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.MapDataBlock) { return mergeFrom((net.osmand.binary.OsmandOdb.MapDataBlock)other); } else { @@ -8075,31 +4901,11 @@ public final class OsmandOdb { if (other.hasBaseId()) { setBaseId(other.getBaseId()); } - if (dataObjectsBuilder_ == null) { - if (!other.dataObjects_.isEmpty()) { - if (dataObjects_.isEmpty()) { - dataObjects_ = other.dataObjects_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureDataObjectsIsMutable(); - dataObjects_.addAll(other.dataObjects_); - } - onChanged(); - } - } else { - if (!other.dataObjects_.isEmpty()) { - if (dataObjectsBuilder_.isEmpty()) { - dataObjectsBuilder_.dispose(); - dataObjectsBuilder_ = null; - dataObjects_ = other.dataObjects_; - bitField0_ = (bitField0_ & ~0x00000002); - dataObjectsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDataObjectsFieldBuilder() : null; - } else { - dataObjectsBuilder_.addAllMessages(other.dataObjects_); - } + if (!other.dataObjects_.isEmpty()) { + if (result.dataObjects_.isEmpty()) { + result.dataObjects_ = new java.util.ArrayList(); } + result.dataObjects_.addAll(other.dataObjects_); } if (other.hasStringTable()) { mergeStringTable(other.getStringTable()); @@ -8108,17 +4914,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - for (int i = 0; i < getDataObjectsCount(); i++) { - if (!getDataObjects(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -8130,20 +4927,17 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 80: { - bitField0_ |= 0x00000001; - baseId_ = input.readUInt64(); + setBaseId(input.readUInt64()); break; } case 98: { @@ -8165,358 +4959,130 @@ public final class OsmandOdb { } } - private int bitField0_; // optional uint64 baseId = 10; - private long baseId_ ; public boolean hasBaseId() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasBaseId(); } public long getBaseId() { - return baseId_; + return result.getBaseId(); } public Builder setBaseId(long value) { - bitField0_ |= 0x00000001; - baseId_ = value; - onChanged(); + result.hasBaseId = true; + result.baseId_ = value; return this; } public Builder clearBaseId() { - bitField0_ = (bitField0_ & ~0x00000001); - baseId_ = 0L; - onChanged(); + result.hasBaseId = false; + result.baseId_ = 0L; return this; } // repeated .MapData dataObjects = 12; - private java.util.List dataObjects_ = - java.util.Collections.emptyList(); - private void ensureDataObjectsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - dataObjects_ = new java.util.ArrayList(dataObjects_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.MapData, net.osmand.binary.OsmandOdb.MapData.Builder, net.osmand.binary.OsmandOdb.MapDataOrBuilder> dataObjectsBuilder_; - public java.util.List getDataObjectsList() { - if (dataObjectsBuilder_ == null) { - return java.util.Collections.unmodifiableList(dataObjects_); - } else { - return dataObjectsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.dataObjects_); } public int getDataObjectsCount() { - if (dataObjectsBuilder_ == null) { - return dataObjects_.size(); - } else { - return dataObjectsBuilder_.getCount(); - } + return result.getDataObjectsCount(); } public net.osmand.binary.OsmandOdb.MapData getDataObjects(int index) { - if (dataObjectsBuilder_ == null) { - return dataObjects_.get(index); - } else { - return dataObjectsBuilder_.getMessage(index); - } + return result.getDataObjects(index); } - public Builder setDataObjects( - int index, net.osmand.binary.OsmandOdb.MapData value) { - if (dataObjectsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataObjectsIsMutable(); - dataObjects_.set(index, value); - onChanged(); - } else { - dataObjectsBuilder_.setMessage(index, value); + public Builder setDataObjects(int index, net.osmand.binary.OsmandOdb.MapData value) { + if (value == null) { + throw new NullPointerException(); } + result.dataObjects_.set(index, value); return this; } - public Builder setDataObjects( - int index, net.osmand.binary.OsmandOdb.MapData.Builder builderForValue) { - if (dataObjectsBuilder_ == null) { - ensureDataObjectsIsMutable(); - dataObjects_.set(index, builderForValue.build()); - onChanged(); - } else { - dataObjectsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setDataObjects(int index, net.osmand.binary.OsmandOdb.MapData.Builder builderForValue) { + result.dataObjects_.set(index, builderForValue.build()); return this; } public Builder addDataObjects(net.osmand.binary.OsmandOdb.MapData value) { - if (dataObjectsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataObjectsIsMutable(); - dataObjects_.add(value); - onChanged(); - } else { - dataObjectsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.dataObjects_.isEmpty()) { + result.dataObjects_ = new java.util.ArrayList(); + } + result.dataObjects_.add(value); return this; } - public Builder addDataObjects( - int index, net.osmand.binary.OsmandOdb.MapData value) { - if (dataObjectsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataObjectsIsMutable(); - dataObjects_.add(index, value); - onChanged(); - } else { - dataObjectsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addDataObjects( - net.osmand.binary.OsmandOdb.MapData.Builder builderForValue) { - if (dataObjectsBuilder_ == null) { - ensureDataObjectsIsMutable(); - dataObjects_.add(builderForValue.build()); - onChanged(); - } else { - dataObjectsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addDataObjects( - int index, net.osmand.binary.OsmandOdb.MapData.Builder builderForValue) { - if (dataObjectsBuilder_ == null) { - ensureDataObjectsIsMutable(); - dataObjects_.add(index, builderForValue.build()); - onChanged(); - } else { - dataObjectsBuilder_.addMessage(index, builderForValue.build()); + public Builder addDataObjects(net.osmand.binary.OsmandOdb.MapData.Builder builderForValue) { + if (result.dataObjects_.isEmpty()) { + result.dataObjects_ = new java.util.ArrayList(); } + result.dataObjects_.add(builderForValue.build()); return this; } public Builder addAllDataObjects( java.lang.Iterable values) { - if (dataObjectsBuilder_ == null) { - ensureDataObjectsIsMutable(); - super.addAll(values, dataObjects_); - onChanged(); - } else { - dataObjectsBuilder_.addAllMessages(values); + if (result.dataObjects_.isEmpty()) { + result.dataObjects_ = new java.util.ArrayList(); } + super.addAll(values, result.dataObjects_); return this; } public Builder clearDataObjects() { - if (dataObjectsBuilder_ == null) { - dataObjects_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - dataObjectsBuilder_.clear(); - } + result.dataObjects_ = java.util.Collections.emptyList(); return this; } - public Builder removeDataObjects(int index) { - if (dataObjectsBuilder_ == null) { - ensureDataObjectsIsMutable(); - dataObjects_.remove(index); - onChanged(); - } else { - dataObjectsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.MapData.Builder getDataObjectsBuilder( - int index) { - return getDataObjectsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.MapDataOrBuilder getDataObjectsOrBuilder( - int index) { - if (dataObjectsBuilder_ == null) { - return dataObjects_.get(index); } else { - return dataObjectsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getDataObjectsOrBuilderList() { - if (dataObjectsBuilder_ != null) { - return dataObjectsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(dataObjects_); - } - } - public net.osmand.binary.OsmandOdb.MapData.Builder addDataObjectsBuilder() { - return getDataObjectsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.MapData.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.MapData.Builder addDataObjectsBuilder( - int index) { - return getDataObjectsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.MapData.getDefaultInstance()); - } - public java.util.List - getDataObjectsBuilderList() { - return getDataObjectsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.MapData, net.osmand.binary.OsmandOdb.MapData.Builder, net.osmand.binary.OsmandOdb.MapDataOrBuilder> - getDataObjectsFieldBuilder() { - if (dataObjectsBuilder_ == null) { - dataObjectsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.MapData, net.osmand.binary.OsmandOdb.MapData.Builder, net.osmand.binary.OsmandOdb.MapDataOrBuilder>( - dataObjects_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - dataObjects_ = null; - } - return dataObjectsBuilder_; - } // optional .StringTable stringTable = 15; - private net.osmand.binary.OsmandOdb.StringTable stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.StringTable, net.osmand.binary.OsmandOdb.StringTable.Builder, net.osmand.binary.OsmandOdb.StringTableOrBuilder> stringTableBuilder_; public boolean hasStringTable() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasStringTable(); } public net.osmand.binary.OsmandOdb.StringTable getStringTable() { - if (stringTableBuilder_ == null) { - return stringTable_; - } else { - return stringTableBuilder_.getMessage(); - } + return result.getStringTable(); } public Builder setStringTable(net.osmand.binary.OsmandOdb.StringTable value) { - if (stringTableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stringTable_ = value; - onChanged(); - } else { - stringTableBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000004; + result.hasStringTable = true; + result.stringTable_ = value; return this; } - public Builder setStringTable( - net.osmand.binary.OsmandOdb.StringTable.Builder builderForValue) { - if (stringTableBuilder_ == null) { - stringTable_ = builderForValue.build(); - onChanged(); - } else { - stringTableBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; + public Builder setStringTable(net.osmand.binary.OsmandOdb.StringTable.Builder builderForValue) { + result.hasStringTable = true; + result.stringTable_ = builderForValue.build(); return this; } public Builder mergeStringTable(net.osmand.binary.OsmandOdb.StringTable value) { - if (stringTableBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - stringTable_ != net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance()) { - stringTable_ = - net.osmand.binary.OsmandOdb.StringTable.newBuilder(stringTable_).mergeFrom(value).buildPartial(); - } else { - stringTable_ = value; - } - onChanged(); + if (result.hasStringTable() && + result.stringTable_ != net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance()) { + result.stringTable_ = + net.osmand.binary.OsmandOdb.StringTable.newBuilder(result.stringTable_).mergeFrom(value).buildPartial(); } else { - stringTableBuilder_.mergeFrom(value); + result.stringTable_ = value; } - bitField0_ |= 0x00000004; + result.hasStringTable = true; return this; } public Builder clearStringTable() { - if (stringTableBuilder_ == null) { - stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); - onChanged(); - } else { - stringTableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); + result.hasStringTable = false; + result.stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.StringTable.Builder getStringTableBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getStringTableFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.StringTableOrBuilder getStringTableOrBuilder() { - if (stringTableBuilder_ != null) { - return stringTableBuilder_.getMessageOrBuilder(); - } else { - return stringTable_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.StringTable, net.osmand.binary.OsmandOdb.StringTable.Builder, net.osmand.binary.OsmandOdb.StringTableOrBuilder> - getStringTableFieldBuilder() { - if (stringTableBuilder_ == null) { - stringTableBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.StringTable, net.osmand.binary.OsmandOdb.StringTable.Builder, net.osmand.binary.OsmandOdb.StringTableOrBuilder>( - stringTable_, - getParentForChildren(), - isClean()); - stringTable_ = null; - } - return stringTableBuilder_; - } // @@protoc_insertion_point(builder_scope:MapDataBlock) } static { defaultInstance = new MapDataBlock(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:MapDataBlock) } - public interface MapDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional bytes pointCoordinates = 1; - boolean hasPointCoordinates(); - com.google.protobuf.ByteString getPointCoordinates(); - - // optional bytes lineCoordinates = 2; - boolean hasLineCoordinates(); - com.google.protobuf.ByteString getLineCoordinates(); - - // optional bytes polygonOuterCoordinates = 3; - boolean hasPolygonOuterCoordinates(); - com.google.protobuf.ByteString getPolygonOuterCoordinates(); - - // repeated bytes polygonInnerCoordinates = 4; - java.util.List getPolygonInnerCoordinatesList(); - int getPolygonInnerCoordinatesCount(); - com.google.protobuf.ByteString getPolygonInnerCoordinates(int index); - - // optional bytes additionalTypes = 6; - boolean hasAdditionalTypes(); - com.google.protobuf.ByteString getAdditionalTypes(); - - // required bytes types = 7; - boolean hasTypes(); - com.google.protobuf.ByteString getTypes(); - - // optional bytes stringNames = 10; - boolean hasStringNames(); - com.google.protobuf.ByteString getStringNames(); - - // required sint64 id = 12; - boolean hasId(); - long getId(); - } public static final class MapData extends - com.google.protobuf.GeneratedMessage - implements MapDataOrBuilder { + com.google.protobuf.GeneratedMessage { // Use MapData.newBuilder() to construct. - private MapData(Builder builder) { - super(builder); + private MapData() { + initFields(); } private MapData(boolean noInit) {} @@ -8525,7 +5091,8 @@ public final class OsmandOdb { return defaultInstance; } - public MapData getDefaultInstanceForType() { + @Override + public MapData getDefaultInstanceForType() { return defaultInstance; } @@ -8534,208 +5101,148 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_MapData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_MapData_fieldAccessorTable; } - private int bitField0_; - // optional bytes pointCoordinates = 1; - public static final int POINTCOORDINATES_FIELD_NUMBER = 1; - private com.google.protobuf.ByteString pointCoordinates_; - public boolean hasPointCoordinates() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public com.google.protobuf.ByteString getPointCoordinates() { - return pointCoordinates_; - } + // optional bytes coordinates = 1; + public static final int COORDINATES_FIELD_NUMBER = 1; + private boolean hasCoordinates; + private com.google.protobuf.ByteString coordinates_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasCoordinates() { return hasCoordinates; } + public com.google.protobuf.ByteString getCoordinates() { return coordinates_; } - // optional bytes lineCoordinates = 2; - public static final int LINECOORDINATES_FIELD_NUMBER = 2; - private com.google.protobuf.ByteString lineCoordinates_; - public boolean hasLineCoordinates() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public com.google.protobuf.ByteString getLineCoordinates() { - return lineCoordinates_; - } - - // optional bytes polygonOuterCoordinates = 3; - public static final int POLYGONOUTERCOORDINATES_FIELD_NUMBER = 3; - private com.google.protobuf.ByteString polygonOuterCoordinates_; - public boolean hasPolygonOuterCoordinates() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.google.protobuf.ByteString getPolygonOuterCoordinates() { - return polygonOuterCoordinates_; - } + // optional bytes areaCoordinates = 2; + public static final int AREACOORDINATES_FIELD_NUMBER = 2; + private boolean hasAreaCoordinates; + private com.google.protobuf.ByteString areaCoordinates_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasAreaCoordinates() { return hasAreaCoordinates; } + public com.google.protobuf.ByteString getAreaCoordinates() { return areaCoordinates_; } // repeated bytes polygonInnerCoordinates = 4; public static final int POLYGONINNERCOORDINATES_FIELD_NUMBER = 4; - private java.util.List polygonInnerCoordinates_; - public java.util.List - getPolygonInnerCoordinatesList() { + private java.util.List polygonInnerCoordinates_ = + java.util.Collections.emptyList(); + public java.util.List getPolygonInnerCoordinatesList() { return polygonInnerCoordinates_; } - public int getPolygonInnerCoordinatesCount() { - return polygonInnerCoordinates_.size(); - } + public int getPolygonInnerCoordinatesCount() { return polygonInnerCoordinates_.size(); } public com.google.protobuf.ByteString getPolygonInnerCoordinates(int index) { return polygonInnerCoordinates_.get(index); } // optional bytes additionalTypes = 6; public static final int ADDITIONALTYPES_FIELD_NUMBER = 6; - private com.google.protobuf.ByteString additionalTypes_; - public boolean hasAdditionalTypes() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public com.google.protobuf.ByteString getAdditionalTypes() { - return additionalTypes_; - } + private boolean hasAdditionalTypes; + private com.google.protobuf.ByteString additionalTypes_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasAdditionalTypes() { return hasAdditionalTypes; } + public com.google.protobuf.ByteString getAdditionalTypes() { return additionalTypes_; } // required bytes types = 7; public static final int TYPES_FIELD_NUMBER = 7; - private com.google.protobuf.ByteString types_; - public boolean hasTypes() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public com.google.protobuf.ByteString getTypes() { - return types_; - } + private boolean hasTypes; + private com.google.protobuf.ByteString types_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasTypes() { return hasTypes; } + public com.google.protobuf.ByteString getTypes() { return types_; } // optional bytes stringNames = 10; public static final int STRINGNAMES_FIELD_NUMBER = 10; - private com.google.protobuf.ByteString stringNames_; - public boolean hasStringNames() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public com.google.protobuf.ByteString getStringNames() { - return stringNames_; - } + private boolean hasStringNames; + private com.google.protobuf.ByteString stringNames_ = com.google.protobuf.ByteString.EMPTY; + public boolean hasStringNames() { return hasStringNames; } + public com.google.protobuf.ByteString getStringNames() { return stringNames_; } // required sint64 id = 12; public static final int ID_FIELD_NUMBER = 12; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public long getId() { - return id_; - } + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } private void initFields() { - pointCoordinates_ = com.google.protobuf.ByteString.EMPTY; - lineCoordinates_ = com.google.protobuf.ByteString.EMPTY; - polygonOuterCoordinates_ = com.google.protobuf.ByteString.EMPTY; - polygonInnerCoordinates_ = java.util.Collections.emptyList();; - additionalTypes_ = com.google.protobuf.ByteString.EMPTY; - types_ = com.google.protobuf.ByteString.EMPTY; - stringNames_ = com.google.protobuf.ByteString.EMPTY; - id_ = 0L; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasTypes()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasTypes) return false; + if (!hasId) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, pointCoordinates_); + if (hasCoordinates()) { + output.writeBytes(1, getCoordinates()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, lineCoordinates_); + if (hasAreaCoordinates()) { + output.writeBytes(2, getAreaCoordinates()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, polygonOuterCoordinates_); + for (com.google.protobuf.ByteString element : getPolygonInnerCoordinatesList()) { + output.writeBytes(4, element); } - for (int i = 0; i < polygonInnerCoordinates_.size(); i++) { - output.writeBytes(4, polygonInnerCoordinates_.get(i)); + if (hasAdditionalTypes()) { + output.writeBytes(6, getAdditionalTypes()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(6, additionalTypes_); + if (hasTypes()) { + output.writeBytes(7, getTypes()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeBytes(7, types_); + if (hasStringNames()) { + output.writeBytes(10, getStringNames()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(10, stringNames_); - } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeSInt64(12, id_); + if (hasId()) { + output.writeSInt64(12, getId()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasCoordinates()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, pointCoordinates_); + .computeBytesSize(1, getCoordinates()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasAreaCoordinates()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, lineCoordinates_); - } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, polygonOuterCoordinates_); + .computeBytesSize(2, getAreaCoordinates()); } { int dataSize = 0; - for (int i = 0; i < polygonInnerCoordinates_.size(); i++) { + for (com.google.protobuf.ByteString element : getPolygonInnerCoordinatesList()) { dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(polygonInnerCoordinates_.get(i)); + .computeBytesSizeNoTag(element); } size += dataSize; size += 1 * getPolygonInnerCoordinatesList().size(); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasAdditionalTypes()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, additionalTypes_); + .computeBytesSize(6, getAdditionalTypes()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasTypes()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, types_); + .computeBytesSize(7, getTypes()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (hasStringNames()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, stringNames_); + .computeBytesSize(10, getStringNames()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(12, id_); + .computeSInt64Size(12, getId()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.MapData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -8804,143 +5311,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.MapData prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.MapDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_MapData_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_MapData_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.MapData result; // Construct using net.osmand.binary.OsmandOdb.MapData.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.MapData(); + return builder; } - public Builder clear() { - super.clear(); - pointCoordinates_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000001); - lineCoordinates_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - polygonOuterCoordinates_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000004); - polygonInnerCoordinates_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000008); - additionalTypes_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000010); - types_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000020); - stringNames_ = com.google.protobuf.ByteString.EMPTY; - bitField0_ = (bitField0_ & ~0x00000040); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000080); + @Override + protected net.osmand.binary.OsmandOdb.MapData internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.MapData(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.MapData.getDescriptor(); } - public net.osmand.binary.OsmandOdb.MapData getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.MapData getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.MapData.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.MapData build() { - net.osmand.binary.OsmandOdb.MapData result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.MapData build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.MapData buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.MapData result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.MapData buildPartial() { - net.osmand.binary.OsmandOdb.MapData result = new net.osmand.binary.OsmandOdb.MapData(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.MapData buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.pointCoordinates_ = pointCoordinates_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.polygonInnerCoordinates_ != java.util.Collections.EMPTY_LIST) { + result.polygonInnerCoordinates_ = + java.util.Collections.unmodifiableList(result.polygonInnerCoordinates_); } - result.lineCoordinates_ = lineCoordinates_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.polygonOuterCoordinates_ = polygonOuterCoordinates_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - polygonInnerCoordinates_ = java.util.Collections.unmodifiableList(polygonInnerCoordinates_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.polygonInnerCoordinates_ = polygonInnerCoordinates_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.additionalTypes_ = additionalTypes_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.types_ = types_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.stringNames_ = stringNames_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.id_ = id_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.MapData returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.MapData) { return mergeFrom((net.osmand.binary.OsmandOdb.MapData)other); } else { @@ -8951,24 +5411,17 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.MapData other) { if (other == net.osmand.binary.OsmandOdb.MapData.getDefaultInstance()) return this; - if (other.hasPointCoordinates()) { - setPointCoordinates(other.getPointCoordinates()); + if (other.hasCoordinates()) { + setCoordinates(other.getCoordinates()); } - if (other.hasLineCoordinates()) { - setLineCoordinates(other.getLineCoordinates()); - } - if (other.hasPolygonOuterCoordinates()) { - setPolygonOuterCoordinates(other.getPolygonOuterCoordinates()); + if (other.hasAreaCoordinates()) { + setAreaCoordinates(other.getAreaCoordinates()); } if (!other.polygonInnerCoordinates_.isEmpty()) { - if (polygonInnerCoordinates_.isEmpty()) { - polygonInnerCoordinates_ = other.polygonInnerCoordinates_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensurePolygonInnerCoordinatesIsMutable(); - polygonInnerCoordinates_.addAll(other.polygonInnerCoordinates_); + if (result.polygonInnerCoordinates_.isEmpty()) { + result.polygonInnerCoordinates_ = new java.util.ArrayList(); } - onChanged(); + result.polygonInnerCoordinates_.addAll(other.polygonInnerCoordinates_); } if (other.hasAdditionalTypes()) { setAdditionalTypes(other.getAdditionalTypes()); @@ -8986,19 +5439,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasTypes()) { - - return false; - } - if (!hasId()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9010,276 +5452,208 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - pointCoordinates_ = input.readBytes(); + setCoordinates(input.readBytes()); break; } case 18: { - bitField0_ |= 0x00000002; - lineCoordinates_ = input.readBytes(); - break; - } - case 26: { - bitField0_ |= 0x00000004; - polygonOuterCoordinates_ = input.readBytes(); + setAreaCoordinates(input.readBytes()); break; } case 34: { - ensurePolygonInnerCoordinatesIsMutable(); - polygonInnerCoordinates_.add(input.readBytes()); + addPolygonInnerCoordinates(input.readBytes()); break; } case 50: { - bitField0_ |= 0x00000010; - additionalTypes_ = input.readBytes(); + setAdditionalTypes(input.readBytes()); break; } case 58: { - bitField0_ |= 0x00000020; - types_ = input.readBytes(); + setTypes(input.readBytes()); break; } case 82: { - bitField0_ |= 0x00000040; - stringNames_ = input.readBytes(); + setStringNames(input.readBytes()); break; } case 96: { - bitField0_ |= 0x00000080; - id_ = input.readSInt64(); + setId(input.readSInt64()); break; } } } } - private int bitField0_; - // optional bytes pointCoordinates = 1; - private com.google.protobuf.ByteString pointCoordinates_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasPointCoordinates() { - return ((bitField0_ & 0x00000001) == 0x00000001); + // optional bytes coordinates = 1; + public boolean hasCoordinates() { + return result.hasCoordinates(); } - public com.google.protobuf.ByteString getPointCoordinates() { - return pointCoordinates_; + public com.google.protobuf.ByteString getCoordinates() { + return result.getCoordinates(); } - public Builder setPointCoordinates(com.google.protobuf.ByteString value) { + public Builder setCoordinates(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - pointCoordinates_ = value; - onChanged(); + result.hasCoordinates = true; + result.coordinates_ = value; return this; } - public Builder clearPointCoordinates() { - bitField0_ = (bitField0_ & ~0x00000001); - pointCoordinates_ = getDefaultInstance().getPointCoordinates(); - onChanged(); + public Builder clearCoordinates() { + result.hasCoordinates = false; + result.coordinates_ = getDefaultInstance().getCoordinates(); return this; } - // optional bytes lineCoordinates = 2; - private com.google.protobuf.ByteString lineCoordinates_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasLineCoordinates() { - return ((bitField0_ & 0x00000002) == 0x00000002); + // optional bytes areaCoordinates = 2; + public boolean hasAreaCoordinates() { + return result.hasAreaCoordinates(); } - public com.google.protobuf.ByteString getLineCoordinates() { - return lineCoordinates_; + public com.google.protobuf.ByteString getAreaCoordinates() { + return result.getAreaCoordinates(); } - public Builder setLineCoordinates(com.google.protobuf.ByteString value) { + public Builder setAreaCoordinates(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - lineCoordinates_ = value; - onChanged(); + result.hasAreaCoordinates = true; + result.areaCoordinates_ = value; return this; } - public Builder clearLineCoordinates() { - bitField0_ = (bitField0_ & ~0x00000002); - lineCoordinates_ = getDefaultInstance().getLineCoordinates(); - onChanged(); - return this; - } - - // optional bytes polygonOuterCoordinates = 3; - private com.google.protobuf.ByteString polygonOuterCoordinates_ = com.google.protobuf.ByteString.EMPTY; - public boolean hasPolygonOuterCoordinates() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public com.google.protobuf.ByteString getPolygonOuterCoordinates() { - return polygonOuterCoordinates_; - } - public Builder setPolygonOuterCoordinates(com.google.protobuf.ByteString value) { - if (value == null) { - throw new NullPointerException(); - } - bitField0_ |= 0x00000004; - polygonOuterCoordinates_ = value; - onChanged(); - return this; - } - public Builder clearPolygonOuterCoordinates() { - bitField0_ = (bitField0_ & ~0x00000004); - polygonOuterCoordinates_ = getDefaultInstance().getPolygonOuterCoordinates(); - onChanged(); + public Builder clearAreaCoordinates() { + result.hasAreaCoordinates = false; + result.areaCoordinates_ = getDefaultInstance().getAreaCoordinates(); return this; } // repeated bytes polygonInnerCoordinates = 4; - private java.util.List polygonInnerCoordinates_ = java.util.Collections.emptyList();; - private void ensurePolygonInnerCoordinatesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - polygonInnerCoordinates_ = new java.util.ArrayList(polygonInnerCoordinates_); - bitField0_ |= 0x00000008; - } - } - public java.util.List - getPolygonInnerCoordinatesList() { - return java.util.Collections.unmodifiableList(polygonInnerCoordinates_); + public java.util.List getPolygonInnerCoordinatesList() { + return java.util.Collections.unmodifiableList(result.polygonInnerCoordinates_); } public int getPolygonInnerCoordinatesCount() { - return polygonInnerCoordinates_.size(); + return result.getPolygonInnerCoordinatesCount(); } public com.google.protobuf.ByteString getPolygonInnerCoordinates(int index) { - return polygonInnerCoordinates_.get(index); + return result.getPolygonInnerCoordinates(index); } - public Builder setPolygonInnerCoordinates( - int index, com.google.protobuf.ByteString value) { + public Builder setPolygonInnerCoordinates(int index, com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensurePolygonInnerCoordinatesIsMutable(); - polygonInnerCoordinates_.set(index, value); - onChanged(); + result.polygonInnerCoordinates_.set(index, value); return this; } public Builder addPolygonInnerCoordinates(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - ensurePolygonInnerCoordinatesIsMutable(); - polygonInnerCoordinates_.add(value); - onChanged(); + if (result.polygonInnerCoordinates_.isEmpty()) { + result.polygonInnerCoordinates_ = new java.util.ArrayList(); + } + result.polygonInnerCoordinates_.add(value); return this; } public Builder addAllPolygonInnerCoordinates( java.lang.Iterable values) { - ensurePolygonInnerCoordinatesIsMutable(); - super.addAll(values, polygonInnerCoordinates_); - onChanged(); + if (result.polygonInnerCoordinates_.isEmpty()) { + result.polygonInnerCoordinates_ = new java.util.ArrayList(); + } + super.addAll(values, result.polygonInnerCoordinates_); return this; } public Builder clearPolygonInnerCoordinates() { - polygonInnerCoordinates_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); + result.polygonInnerCoordinates_ = java.util.Collections.emptyList(); return this; } // optional bytes additionalTypes = 6; - private com.google.protobuf.ByteString additionalTypes_ = com.google.protobuf.ByteString.EMPTY; public boolean hasAdditionalTypes() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasAdditionalTypes(); } public com.google.protobuf.ByteString getAdditionalTypes() { - return additionalTypes_; + return result.getAdditionalTypes(); } public Builder setAdditionalTypes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; - additionalTypes_ = value; - onChanged(); + result.hasAdditionalTypes = true; + result.additionalTypes_ = value; return this; } public Builder clearAdditionalTypes() { - bitField0_ = (bitField0_ & ~0x00000010); - additionalTypes_ = getDefaultInstance().getAdditionalTypes(); - onChanged(); + result.hasAdditionalTypes = false; + result.additionalTypes_ = getDefaultInstance().getAdditionalTypes(); return this; } // required bytes types = 7; - private com.google.protobuf.ByteString types_ = com.google.protobuf.ByteString.EMPTY; public boolean hasTypes() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return result.hasTypes(); } public com.google.protobuf.ByteString getTypes() { - return types_; + return result.getTypes(); } public Builder setTypes(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000020; - types_ = value; - onChanged(); + result.hasTypes = true; + result.types_ = value; return this; } public Builder clearTypes() { - bitField0_ = (bitField0_ & ~0x00000020); - types_ = getDefaultInstance().getTypes(); - onChanged(); + result.hasTypes = false; + result.types_ = getDefaultInstance().getTypes(); return this; } // optional bytes stringNames = 10; - private com.google.protobuf.ByteString stringNames_ = com.google.protobuf.ByteString.EMPTY; public boolean hasStringNames() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return result.hasStringNames(); } public com.google.protobuf.ByteString getStringNames() { - return stringNames_; + return result.getStringNames(); } public Builder setStringNames(com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; - stringNames_ = value; - onChanged(); + result.hasStringNames = true; + result.stringNames_ = value; return this; } public Builder clearStringNames() { - bitField0_ = (bitField0_ & ~0x00000040); - stringNames_ = getDefaultInstance().getStringNames(); - onChanged(); + result.hasStringNames = false; + result.stringNames_ = getDefaultInstance().getStringNames(); return this; } // required sint64 id = 12; - private long id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return result.hasId(); } public long getId() { - return id_; + return result.getId(); } public Builder setId(long value) { - bitField0_ |= 0x00000080; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000080); - id_ = 0L; - onChanged(); + result.hasId = false; + result.id_ = 0L; return this; } @@ -9288,49 +5662,18 @@ public final class OsmandOdb { static { defaultInstance = new MapData(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:MapData) } - public interface OsmAndAddressIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string name = 1; - boolean hasName(); - String getName(); - - // optional string name_en = 2; - boolean hasNameEn(); - String getNameEn(); - - // optional .OsmAndTileBox boundaries = 3; - boolean hasBoundaries(); - net.osmand.binary.OsmandOdb.OsmAndTileBox getBoundaries(); - net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder getBoundariesOrBuilder(); - - // repeated .OsmAndAddressIndex.CitiesIndex cities = 6; - java.util.List - getCitiesList(); - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex getCities(int index); - int getCitiesCount(); - java.util.List - getCitiesOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndexOrBuilder getCitiesOrBuilder( - int index); - - // optional .OsmAndAddressNameIndexData nameIndex = 7; - boolean hasNameIndex(); - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData getNameIndex(); - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexDataOrBuilder getNameIndexOrBuilder(); - } public static final class OsmAndAddressIndex extends - com.google.protobuf.GeneratedMessage - implements OsmAndAddressIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndAddressIndex.newBuilder() to construct. - private OsmAndAddressIndex(Builder builder) { - super(builder); + private OsmAndAddressIndex() { + initFields(); } private OsmAndAddressIndex(boolean noInit) {} @@ -9339,7 +5682,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndAddressIndex getDefaultInstanceForType() { + @Override + public OsmAndAddressIndex getDefaultInstanceForType() { return defaultInstance; } @@ -9348,44 +5692,17 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressIndex_fieldAccessorTable; } - public interface CitiesIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required uint32 type = 2; - boolean hasType(); - int getType(); - - // repeated .CityIndex cities = 5; - java.util.List - getCitiesList(); - net.osmand.binary.OsmandOdb.CityIndex getCities(int index); - int getCitiesCount(); - java.util.List - getCitiesOrBuilderList(); - net.osmand.binary.OsmandOdb.CityIndexOrBuilder getCitiesOrBuilder( - int index); - - // repeated .CityBlockIndex blocks = 7; - java.util.List - getBlocksList(); - net.osmand.binary.OsmandOdb.CityBlockIndex getBlocks(int index); - int getBlocksCount(); - java.util.List - getBlocksOrBuilderList(); - net.osmand.binary.OsmandOdb.CityBlockIndexOrBuilder getBlocksOrBuilder( - int index); - } public static final class CitiesIndex extends - com.google.protobuf.GeneratedMessage - implements CitiesIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use CitiesIndex.newBuilder() to construct. - private CitiesIndex(Builder builder) { - super(builder); + private CitiesIndex() { + initFields(); } private CitiesIndex(boolean noInit) {} @@ -9394,7 +5711,8 @@ public final class OsmandOdb { return defaultInstance; } - public CitiesIndex getDefaultInstanceForType() { + @Override + public CitiesIndex getDefaultInstanceForType() { return defaultInstance; } @@ -9403,139 +5721,97 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressIndex_CitiesIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressIndex_CitiesIndex_fieldAccessorTable; } - private int bitField0_; // required uint32 type = 2; public static final int TYPE_FIELD_NUMBER = 2; - private int type_; - public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getType() { - return type_; - } + private boolean hasType; + private int type_ = 0; + public boolean hasType() { return hasType; } + public int getType() { return type_; } // repeated .CityIndex cities = 5; public static final int CITIES_FIELD_NUMBER = 5; - private java.util.List cities_; + private java.util.List cities_ = + java.util.Collections.emptyList(); public java.util.List getCitiesList() { return cities_; } - public java.util.List - getCitiesOrBuilderList() { - return cities_; - } - public int getCitiesCount() { - return cities_.size(); - } + public int getCitiesCount() { return cities_.size(); } public net.osmand.binary.OsmandOdb.CityIndex getCities(int index) { return cities_.get(index); } - public net.osmand.binary.OsmandOdb.CityIndexOrBuilder getCitiesOrBuilder( - int index) { - return cities_.get(index); - } // repeated .CityBlockIndex blocks = 7; public static final int BLOCKS_FIELD_NUMBER = 7; - private java.util.List blocks_; + private java.util.List blocks_ = + java.util.Collections.emptyList(); public java.util.List getBlocksList() { return blocks_; } - public java.util.List - getBlocksOrBuilderList() { - return blocks_; - } - public int getBlocksCount() { - return blocks_.size(); - } + public int getBlocksCount() { return blocks_.size(); } public net.osmand.binary.OsmandOdb.CityBlockIndex getBlocks(int index) { return blocks_.get(index); } - public net.osmand.binary.OsmandOdb.CityBlockIndexOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); - } private void initFields() { - type_ = 0; - cities_ = java.util.Collections.emptyList(); - blocks_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasType()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasType) return false; + for (net.osmand.binary.OsmandOdb.CityIndex element : getCitiesList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getCitiesCount(); i++) { - if (!getCities(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + for (net.osmand.binary.OsmandOdb.CityBlockIndex element : getBlocksList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getBlocksCount(); i++) { - if (!getBlocks(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(2, type_); + if (hasType()) { + output.writeUInt32(2, getType()); } - for (int i = 0; i < cities_.size(); i++) { - output.writeMessage(5, cities_.get(i)); + for (net.osmand.binary.OsmandOdb.CityIndex element : getCitiesList()) { + output.writeMessage(5, element); } - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(7, blocks_.get(i)); + for (net.osmand.binary.OsmandOdb.CityBlockIndex element : getBlocksList()) { + output.writeMessage(7, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasType()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, type_); + .computeUInt32Size(2, getType()); } - for (int i = 0; i < cities_.size(); i++) { + for (net.osmand.binary.OsmandOdb.CityIndex element : getCitiesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, cities_.get(i)); + .computeMessageSize(5, element); } - for (int i = 0; i < blocks_.size(); i++) { + for (net.osmand.binary.OsmandOdb.CityBlockIndex element : getBlocksList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, blocks_.get(i)); + .computeMessageSize(7, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -9604,132 +5880,100 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressIndex_CitiesIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressIndex_CitiesIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex result; // Construct using net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getCitiesFieldBuilder(); - getBlocksFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex(); + return builder; } - public Builder clear() { - super.clear(); - type_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - if (citiesBuilder_ == null) { - cities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - citiesBuilder_.clear(); - } - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - blocksBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex build() { - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex result = new net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.type_ = type_; - if (citiesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - cities_ = java.util.Collections.unmodifiableList(cities_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.cities_ = cities_; - } else { - result.cities_ = citiesBuilder_.build(); + if (result.cities_ != java.util.Collections.EMPTY_LIST) { + result.cities_ = + java.util.Collections.unmodifiableList(result.cities_); } - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); + if (result.blocks_ != java.util.Collections.EMPTY_LIST) { + result.blocks_ = + java.util.Collections.unmodifiableList(result.blocks_); } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex)other); } else { @@ -9743,83 +5987,24 @@ public final class OsmandOdb { if (other.hasType()) { setType(other.getType()); } - if (citiesBuilder_ == null) { - if (!other.cities_.isEmpty()) { - if (cities_.isEmpty()) { - cities_ = other.cities_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureCitiesIsMutable(); - cities_.addAll(other.cities_); - } - onChanged(); - } - } else { - if (!other.cities_.isEmpty()) { - if (citiesBuilder_.isEmpty()) { - citiesBuilder_.dispose(); - citiesBuilder_ = null; - cities_ = other.cities_; - bitField0_ = (bitField0_ & ~0x00000002); - citiesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getCitiesFieldBuilder() : null; - } else { - citiesBuilder_.addAllMessages(other.cities_); - } + if (!other.cities_.isEmpty()) { + if (result.cities_.isEmpty()) { + result.cities_ = new java.util.ArrayList(); } + result.cities_.addAll(other.cities_); } - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000004); - blocksBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBlocksFieldBuilder() : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } + if (!other.blocks_.isEmpty()) { + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + result.blocks_.addAll(other.blocks_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasType()) { - - return false; - } - for (int i = 0; i < getCitiesCount(); i++) { - if (!getCities(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getBlocksCount(); i++) { - if (!getBlocks(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -9831,20 +6016,17 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 16: { - bitField0_ |= 0x00000001; - type_ = input.readUInt32(); + setType(input.readUInt32()); break; } case 42: { @@ -9863,621 +6045,252 @@ public final class OsmandOdb { } } - private int bitField0_; // required uint32 type = 2; - private int type_ ; public boolean hasType() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasType(); } public int getType() { - return type_; + return result.getType(); } public Builder setType(int value) { - bitField0_ |= 0x00000001; - type_ = value; - onChanged(); + result.hasType = true; + result.type_ = value; return this; } public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000001); - type_ = 0; - onChanged(); + result.hasType = false; + result.type_ = 0; return this; } // repeated .CityIndex cities = 5; - private java.util.List cities_ = - java.util.Collections.emptyList(); - private void ensureCitiesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - cities_ = new java.util.ArrayList(cities_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.CityIndex, net.osmand.binary.OsmandOdb.CityIndex.Builder, net.osmand.binary.OsmandOdb.CityIndexOrBuilder> citiesBuilder_; - public java.util.List getCitiesList() { - if (citiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(cities_); - } else { - return citiesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.cities_); } public int getCitiesCount() { - if (citiesBuilder_ == null) { - return cities_.size(); - } else { - return citiesBuilder_.getCount(); - } + return result.getCitiesCount(); } public net.osmand.binary.OsmandOdb.CityIndex getCities(int index) { - if (citiesBuilder_ == null) { - return cities_.get(index); - } else { - return citiesBuilder_.getMessage(index); - } + return result.getCities(index); } - public Builder setCities( - int index, net.osmand.binary.OsmandOdb.CityIndex value) { - if (citiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitiesIsMutable(); - cities_.set(index, value); - onChanged(); - } else { - citiesBuilder_.setMessage(index, value); + public Builder setCities(int index, net.osmand.binary.OsmandOdb.CityIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.cities_.set(index, value); return this; } - public Builder setCities( - int index, net.osmand.binary.OsmandOdb.CityIndex.Builder builderForValue) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - cities_.set(index, builderForValue.build()); - onChanged(); - } else { - citiesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setCities(int index, net.osmand.binary.OsmandOdb.CityIndex.Builder builderForValue) { + result.cities_.set(index, builderForValue.build()); return this; } public Builder addCities(net.osmand.binary.OsmandOdb.CityIndex value) { - if (citiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitiesIsMutable(); - cities_.add(value); - onChanged(); - } else { - citiesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.cities_.isEmpty()) { + result.cities_ = new java.util.ArrayList(); + } + result.cities_.add(value); return this; } - public Builder addCities( - int index, net.osmand.binary.OsmandOdb.CityIndex value) { - if (citiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitiesIsMutable(); - cities_.add(index, value); - onChanged(); - } else { - citiesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addCities( - net.osmand.binary.OsmandOdb.CityIndex.Builder builderForValue) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - cities_.add(builderForValue.build()); - onChanged(); - } else { - citiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addCities( - int index, net.osmand.binary.OsmandOdb.CityIndex.Builder builderForValue) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - cities_.add(index, builderForValue.build()); - onChanged(); - } else { - citiesBuilder_.addMessage(index, builderForValue.build()); + public Builder addCities(net.osmand.binary.OsmandOdb.CityIndex.Builder builderForValue) { + if (result.cities_.isEmpty()) { + result.cities_ = new java.util.ArrayList(); } + result.cities_.add(builderForValue.build()); return this; } public Builder addAllCities( java.lang.Iterable values) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - super.addAll(values, cities_); - onChanged(); - } else { - citiesBuilder_.addAllMessages(values); + if (result.cities_.isEmpty()) { + result.cities_ = new java.util.ArrayList(); } + super.addAll(values, result.cities_); return this; } public Builder clearCities() { - if (citiesBuilder_ == null) { - cities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - citiesBuilder_.clear(); - } + result.cities_ = java.util.Collections.emptyList(); return this; } - public Builder removeCities(int index) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - cities_.remove(index); - onChanged(); - } else { - citiesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.CityIndex.Builder getCitiesBuilder( - int index) { - return getCitiesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.CityIndexOrBuilder getCitiesOrBuilder( - int index) { - if (citiesBuilder_ == null) { - return cities_.get(index); } else { - return citiesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getCitiesOrBuilderList() { - if (citiesBuilder_ != null) { - return citiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cities_); - } - } - public net.osmand.binary.OsmandOdb.CityIndex.Builder addCitiesBuilder() { - return getCitiesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.CityIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.CityIndex.Builder addCitiesBuilder( - int index) { - return getCitiesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.CityIndex.getDefaultInstance()); - } - public java.util.List - getCitiesBuilderList() { - return getCitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.CityIndex, net.osmand.binary.OsmandOdb.CityIndex.Builder, net.osmand.binary.OsmandOdb.CityIndexOrBuilder> - getCitiesFieldBuilder() { - if (citiesBuilder_ == null) { - citiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.CityIndex, net.osmand.binary.OsmandOdb.CityIndex.Builder, net.osmand.binary.OsmandOdb.CityIndexOrBuilder>( - cities_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - cities_ = null; - } - return citiesBuilder_; - } // repeated .CityBlockIndex blocks = 7; - private java.util.List blocks_ = - java.util.Collections.emptyList(); - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - blocks_ = new java.util.ArrayList(blocks_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.CityBlockIndex, net.osmand.binary.OsmandOdb.CityBlockIndex.Builder, net.osmand.binary.OsmandOdb.CityBlockIndexOrBuilder> blocksBuilder_; - public java.util.List getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.blocks_); } public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } + return result.getBlocksCount(); } public net.osmand.binary.OsmandOdb.CityBlockIndex getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); - } + return result.getBlocks(index); } - public Builder setBlocks( - int index, net.osmand.binary.OsmandOdb.CityBlockIndex value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); + public Builder setBlocks(int index, net.osmand.binary.OsmandOdb.CityBlockIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.blocks_.set(index, value); return this; } - public Builder setBlocks( - int index, net.osmand.binary.OsmandOdb.CityBlockIndex.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBlocks(int index, net.osmand.binary.OsmandOdb.CityBlockIndex.Builder builderForValue) { + result.blocks_.set(index, builderForValue.build()); return this; } public Builder addBlocks(net.osmand.binary.OsmandOdb.CityBlockIndex value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); + } + result.blocks_.add(value); return this; } - public Builder addBlocks( - int index, net.osmand.binary.OsmandOdb.CityBlockIndex value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBlocks( - net.osmand.binary.OsmandOdb.CityBlockIndex.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBlocks( - int index, net.osmand.binary.OsmandOdb.CityBlockIndex.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); + public Builder addBlocks(net.osmand.binary.OsmandOdb.CityBlockIndex.Builder builderForValue) { + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + result.blocks_.add(builderForValue.build()); return this; } public Builder addAllBlocks( java.lang.Iterable values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - super.addAll(values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + super.addAll(values, result.blocks_); return this; } public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - blocksBuilder_.clear(); - } + result.blocks_ = java.util.Collections.emptyList(); return this; } - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.CityBlockIndex.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.CityBlockIndexOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); } else { - return blocksBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } - } - public net.osmand.binary.OsmandOdb.CityBlockIndex.Builder addBlocksBuilder() { - return getBlocksFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.CityBlockIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.CityBlockIndex.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.CityBlockIndex.getDefaultInstance()); - } - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.CityBlockIndex, net.osmand.binary.OsmandOdb.CityBlockIndex.Builder, net.osmand.binary.OsmandOdb.CityBlockIndexOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.CityBlockIndex, net.osmand.binary.OsmandOdb.CityBlockIndex.Builder, net.osmand.binary.OsmandOdb.CityBlockIndexOrBuilder>( - blocks_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - blocks_ = null; - } - return blocksBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndAddressIndex.CitiesIndex) } static { defaultInstance = new CitiesIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndAddressIndex.CitiesIndex) } - private int bitField0_; // required string name = 1; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // optional string name_en = 2; public static final int NAME_EN_FIELD_NUMBER = 2; - private java.lang.Object nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nameEn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameEnBytes() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nameEn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNameEn; + private java.lang.String nameEn_ = ""; + public boolean hasNameEn() { return hasNameEn; } + public java.lang.String getNameEn() { return nameEn_; } // optional .OsmAndTileBox boundaries = 3; public static final int BOUNDARIES_FIELD_NUMBER = 3; + private boolean hasBoundaries; private net.osmand.binary.OsmandOdb.OsmAndTileBox boundaries_; - public boolean hasBoundaries() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public net.osmand.binary.OsmandOdb.OsmAndTileBox getBoundaries() { - return boundaries_; - } - public net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder getBoundariesOrBuilder() { - return boundaries_; - } + public boolean hasBoundaries() { return hasBoundaries; } + public net.osmand.binary.OsmandOdb.OsmAndTileBox getBoundaries() { return boundaries_; } // repeated .OsmAndAddressIndex.CitiesIndex cities = 6; public static final int CITIES_FIELD_NUMBER = 6; - private java.util.List cities_; + private java.util.List cities_ = + java.util.Collections.emptyList(); public java.util.List getCitiesList() { return cities_; } - public java.util.List - getCitiesOrBuilderList() { - return cities_; - } - public int getCitiesCount() { - return cities_.size(); - } + public int getCitiesCount() { return cities_.size(); } public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex getCities(int index) { return cities_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndexOrBuilder getCitiesOrBuilder( - int index) { - return cities_.get(index); - } // optional .OsmAndAddressNameIndexData nameIndex = 7; public static final int NAMEINDEX_FIELD_NUMBER = 7; + private boolean hasNameIndex; private net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData nameIndex_; - public boolean hasNameIndex() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData getNameIndex() { - return nameIndex_; - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexDataOrBuilder getNameIndexOrBuilder() { - return nameIndex_; - } + public boolean hasNameIndex() { return hasNameIndex; } + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData getNameIndex() { return nameIndex_; } private void initFields() { - name_ = ""; - nameEn_ = ""; boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); - cities_ = java.util.Collections.emptyList(); nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + if (!hasName) return false; if (hasBoundaries()) { - if (!getBoundaries().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + if (!getBoundaries().isInitialized()) return false; } - for (int i = 0; i < getCitiesCount(); i++) { - if (!getCities(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex element : getCitiesList()) { + if (!element.isInitialized()) return false; } if (hasNameIndex()) { - if (!getNameIndex().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + if (!getNameIndex().isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + if (hasName()) { + output.writeString(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getNameEnBytes()); + if (hasNameEn()) { + output.writeString(2, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(3, boundaries_); + if (hasBoundaries()) { + output.writeMessage(3, getBoundaries()); } - for (int i = 0; i < cities_.size(); i++) { - output.writeMessage(6, cities_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex element : getCitiesList()) { + output.writeMessage(6, element); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(7, nameIndex_); + if (hasNameIndex()) { + output.writeMessage(7, getNameIndex()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeStringSize(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameEnBytes()); + .computeStringSize(2, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasBoundaries()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, boundaries_); + .computeMessageSize(3, getBoundaries()); } - for (int i = 0; i < cities_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex element : getCitiesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, cities_.get(i)); + .computeMessageSize(6, element); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasNameIndex()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, nameIndex_); + .computeMessageSize(7, getNameIndex()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndAddressIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -10546,152 +6359,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndAddressIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndAddressIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndAddressIndex result; // Construct using net.osmand.binary.OsmandOdb.OsmAndAddressIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBoundariesFieldBuilder(); - getCitiesFieldBuilder(); - getNameIndexFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndAddressIndex(); + return builder; } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - nameEn_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - if (boundariesBuilder_ == null) { - boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); - } else { - boundariesBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndAddressIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } - bitField0_ = (bitField0_ & ~0x00000004); - if (citiesBuilder_ == null) { - cities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - citiesBuilder_.clear(); - } - if (nameIndexBuilder_ == null) { - nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance(); - } else { - nameIndexBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); + result = new net.osmand.binary.OsmandOdb.OsmAndAddressIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex build() { - net.osmand.binary.OsmandOdb.OsmAndAddressIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndAddressIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndAddressIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndAddressIndex result = new net.osmand.binary.OsmandOdb.OsmAndAddressIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.cities_ != java.util.Collections.EMPTY_LIST) { + result.cities_ = + java.util.Collections.unmodifiableList(result.cities_); } - result.nameEn_ = nameEn_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (boundariesBuilder_ == null) { - result.boundaries_ = boundaries_; - } else { - result.boundaries_ = boundariesBuilder_.build(); - } - if (citiesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - cities_ = java.util.Collections.unmodifiableList(cities_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.cities_ = cities_; - } else { - result.cities_ = citiesBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - if (nameIndexBuilder_ == null) { - result.nameIndex_ = nameIndex_; - } else { - result.nameIndex_ = nameIndexBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndAddressIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndAddressIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndAddressIndex)other); } else { @@ -10711,31 +6468,11 @@ public final class OsmandOdb { if (other.hasBoundaries()) { mergeBoundaries(other.getBoundaries()); } - if (citiesBuilder_ == null) { - if (!other.cities_.isEmpty()) { - if (cities_.isEmpty()) { - cities_ = other.cities_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureCitiesIsMutable(); - cities_.addAll(other.cities_); - } - onChanged(); - } - } else { - if (!other.cities_.isEmpty()) { - if (citiesBuilder_.isEmpty()) { - citiesBuilder_.dispose(); - citiesBuilder_ = null; - cities_ = other.cities_; - bitField0_ = (bitField0_ & ~0x00000008); - citiesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getCitiesFieldBuilder() : null; - } else { - citiesBuilder_.addAllMessages(other.cities_); - } + if (!other.cities_.isEmpty()) { + if (result.cities_.isEmpty()) { + result.cities_ = new java.util.ArrayList(); } + result.cities_.addAll(other.cities_); } if (other.hasNameIndex()) { mergeNameIndex(other.getNameIndex()); @@ -10744,33 +6481,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasName()) { - - return false; - } - if (hasBoundaries()) { - if (!getBoundaries().isInitialized()) { - - return false; - } - } - for (int i = 0; i < getCitiesCount(); i++) { - if (!getCities(i).isInitialized()) { - - return false; - } - } - if (hasNameIndex()) { - if (!getNameIndex().isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -10782,25 +6494,21 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + setName(input.readString()); break; } case 18: { - bitField0_ |= 0x00000002; - nameEn_ = input.readBytes(); + setNameEn(input.readString()); break; } case 26: { @@ -10831,481 +6539,191 @@ public final class OsmandOdb { } } - private int bitField0_; // required string name = 1; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - } // optional string name_en = 2; - private java.lang.Object nameEn_ = ""; public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasNameEn(); } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nameEn_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNameEn() { + return result.getNameEn(); } - public Builder setNameEn(String value) { + public Builder setNameEn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000002); - nameEn_ = getDefaultInstance().getNameEn(); - onChanged(); + result.hasNameEn = false; + result.nameEn_ = getDefaultInstance().getNameEn(); return this; } - void setNameEn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); - } // optional .OsmAndTileBox boundaries = 3; - private net.osmand.binary.OsmandOdb.OsmAndTileBox boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTileBox, net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder, net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder> boundariesBuilder_; public boolean hasBoundaries() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasBoundaries(); } public net.osmand.binary.OsmandOdb.OsmAndTileBox getBoundaries() { - if (boundariesBuilder_ == null) { - return boundaries_; - } else { - return boundariesBuilder_.getMessage(); - } + return result.getBoundaries(); } public Builder setBoundaries(net.osmand.binary.OsmandOdb.OsmAndTileBox value) { - if (boundariesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundaries_ = value; - onChanged(); - } else { - boundariesBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000004; + result.hasBoundaries = true; + result.boundaries_ = value; return this; } - public Builder setBoundaries( - net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder builderForValue) { - if (boundariesBuilder_ == null) { - boundaries_ = builderForValue.build(); - onChanged(); - } else { - boundariesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; + public Builder setBoundaries(net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder builderForValue) { + result.hasBoundaries = true; + result.boundaries_ = builderForValue.build(); return this; } public Builder mergeBoundaries(net.osmand.binary.OsmandOdb.OsmAndTileBox value) { - if (boundariesBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - boundaries_ != net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance()) { - boundaries_ = - net.osmand.binary.OsmandOdb.OsmAndTileBox.newBuilder(boundaries_).mergeFrom(value).buildPartial(); - } else { - boundaries_ = value; - } - onChanged(); + if (result.hasBoundaries() && + result.boundaries_ != net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance()) { + result.boundaries_ = + net.osmand.binary.OsmandOdb.OsmAndTileBox.newBuilder(result.boundaries_).mergeFrom(value).buildPartial(); } else { - boundariesBuilder_.mergeFrom(value); + result.boundaries_ = value; } - bitField0_ |= 0x00000004; + result.hasBoundaries = true; return this; } public Builder clearBoundaries() { - if (boundariesBuilder_ == null) { - boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); - onChanged(); - } else { - boundariesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); + result.hasBoundaries = false; + result.boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder getBoundariesBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getBoundariesFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder getBoundariesOrBuilder() { - if (boundariesBuilder_ != null) { - return boundariesBuilder_.getMessageOrBuilder(); - } else { - return boundaries_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTileBox, net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder, net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder> - getBoundariesFieldBuilder() { - if (boundariesBuilder_ == null) { - boundariesBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTileBox, net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder, net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder>( - boundaries_, - getParentForChildren(), - isClean()); - boundaries_ = null; - } - return boundariesBuilder_; - } // repeated .OsmAndAddressIndex.CitiesIndex cities = 6; - private java.util.List cities_ = - java.util.Collections.emptyList(); - private void ensureCitiesIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - cities_ = new java.util.ArrayList(cities_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndexOrBuilder> citiesBuilder_; - public java.util.List getCitiesList() { - if (citiesBuilder_ == null) { - return java.util.Collections.unmodifiableList(cities_); - } else { - return citiesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.cities_); } public int getCitiesCount() { - if (citiesBuilder_ == null) { - return cities_.size(); - } else { - return citiesBuilder_.getCount(); - } + return result.getCitiesCount(); } public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex getCities(int index) { - if (citiesBuilder_ == null) { - return cities_.get(index); - } else { - return citiesBuilder_.getMessage(index); - } + return result.getCities(index); } - public Builder setCities( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex value) { - if (citiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitiesIsMutable(); - cities_.set(index, value); - onChanged(); - } else { - citiesBuilder_.setMessage(index, value); + public Builder setCities(int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.cities_.set(index, value); return this; } - public Builder setCities( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder builderForValue) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - cities_.set(index, builderForValue.build()); - onChanged(); - } else { - citiesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setCities(int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder builderForValue) { + result.cities_.set(index, builderForValue.build()); return this; } public Builder addCities(net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex value) { - if (citiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitiesIsMutable(); - cities_.add(value); - onChanged(); - } else { - citiesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.cities_.isEmpty()) { + result.cities_ = new java.util.ArrayList(); + } + result.cities_.add(value); return this; } - public Builder addCities( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex value) { - if (citiesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCitiesIsMutable(); - cities_.add(index, value); - onChanged(); - } else { - citiesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addCities( - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder builderForValue) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - cities_.add(builderForValue.build()); - onChanged(); - } else { - citiesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addCities( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder builderForValue) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - cities_.add(index, builderForValue.build()); - onChanged(); - } else { - citiesBuilder_.addMessage(index, builderForValue.build()); + public Builder addCities(net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder builderForValue) { + if (result.cities_.isEmpty()) { + result.cities_ = new java.util.ArrayList(); } + result.cities_.add(builderForValue.build()); return this; } public Builder addAllCities( java.lang.Iterable values) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - super.addAll(values, cities_); - onChanged(); - } else { - citiesBuilder_.addAllMessages(values); + if (result.cities_.isEmpty()) { + result.cities_ = new java.util.ArrayList(); } + super.addAll(values, result.cities_); return this; } public Builder clearCities() { - if (citiesBuilder_ == null) { - cities_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - citiesBuilder_.clear(); - } + result.cities_ = java.util.Collections.emptyList(); return this; } - public Builder removeCities(int index) { - if (citiesBuilder_ == null) { - ensureCitiesIsMutable(); - cities_.remove(index); - onChanged(); - } else { - citiesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder getCitiesBuilder( - int index) { - return getCitiesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndexOrBuilder getCitiesOrBuilder( - int index) { - if (citiesBuilder_ == null) { - return cities_.get(index); } else { - return citiesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getCitiesOrBuilderList() { - if (citiesBuilder_ != null) { - return citiesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(cities_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder addCitiesBuilder() { - return getCitiesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder addCitiesBuilder( - int index) { - return getCitiesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.getDefaultInstance()); - } - public java.util.List - getCitiesBuilderList() { - return getCitiesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndexOrBuilder> - getCitiesFieldBuilder() { - if (citiesBuilder_ == null) { - citiesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressIndex.CitiesIndexOrBuilder>( - cities_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - cities_ = null; - } - return citiesBuilder_; - } // optional .OsmAndAddressNameIndexData nameIndex = 7; - private net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexDataOrBuilder> nameIndexBuilder_; public boolean hasNameIndex() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasNameIndex(); } public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData getNameIndex() { - if (nameIndexBuilder_ == null) { - return nameIndex_; - } else { - return nameIndexBuilder_.getMessage(); - } + return result.getNameIndex(); } public Builder setNameIndex(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData value) { - if (nameIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nameIndex_ = value; - onChanged(); - } else { - nameIndexBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000010; + result.hasNameIndex = true; + result.nameIndex_ = value; return this; } - public Builder setNameIndex( - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.Builder builderForValue) { - if (nameIndexBuilder_ == null) { - nameIndex_ = builderForValue.build(); - onChanged(); - } else { - nameIndexBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; + public Builder setNameIndex(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.Builder builderForValue) { + result.hasNameIndex = true; + result.nameIndex_ = builderForValue.build(); return this; } public Builder mergeNameIndex(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData value) { - if (nameIndexBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - nameIndex_ != net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance()) { - nameIndex_ = - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.newBuilder(nameIndex_).mergeFrom(value).buildPartial(); - } else { - nameIndex_ = value; - } - onChanged(); + if (result.hasNameIndex() && + result.nameIndex_ != net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance()) { + result.nameIndex_ = + net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.newBuilder(result.nameIndex_).mergeFrom(value).buildPartial(); } else { - nameIndexBuilder_.mergeFrom(value); + result.nameIndex_ = value; } - bitField0_ |= 0x00000010; + result.hasNameIndex = true; return this; } public Builder clearNameIndex() { - if (nameIndexBuilder_ == null) { - nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance(); - onChanged(); - } else { - nameIndexBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); + result.hasNameIndex = false; + result.nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.Builder getNameIndexBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getNameIndexFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexDataOrBuilder getNameIndexOrBuilder() { - if (nameIndexBuilder_ != null) { - return nameIndexBuilder_.getMessageOrBuilder(); - } else { - return nameIndex_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexDataOrBuilder> - getNameIndexFieldBuilder() { - if (nameIndexBuilder_ == null) { - nameIndexBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexDataOrBuilder>( - nameIndex_, - getParentForChildren(), - isClean()); - nameIndex_ = null; - } - return nameIndexBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndAddressIndex) } static { defaultInstance = new OsmAndAddressIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndAddressIndex) } - public interface OsmAndAddressNameIndexDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .OsmAndAddressNameIndexData.AddressNameIndexDataBlocks blocks = 3; - java.util.List - getBlocksList(); - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks getBlocks(int index); - int getBlocksCount(); - java.util.List - getBlocksOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocksOrBuilder getBlocksOrBuilder( - int index); - - // required .IndexedStringTable table = 4; - boolean hasTable(); - net.osmand.binary.OsmandOdb.IndexedStringTable getTable(); - net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getTableOrBuilder(); - } public static final class OsmAndAddressNameIndexData extends - com.google.protobuf.GeneratedMessage - implements OsmAndAddressNameIndexDataOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndAddressNameIndexData.newBuilder() to construct. - private OsmAndAddressNameIndexData(Builder builder) { - super(builder); + private OsmAndAddressNameIndexData() { + initFields(); } private OsmAndAddressNameIndexData(boolean noInit) {} @@ -11314,7 +6732,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndAddressNameIndexData getDefaultInstanceForType() { + @Override + public OsmAndAddressNameIndexData getDefaultInstanceForType() { return defaultInstance; } @@ -11323,30 +6742,17 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_fieldAccessorTable; } - public interface AddressNameIndexDataBlocksOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData atom = 4; - java.util.List - getAtomList(); - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData getAtom(int index); - int getAtomCount(); - java.util.List - getAtomOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexDataOrBuilder getAtomOrBuilder( - int index); - } public static final class AddressNameIndexDataBlocks extends - com.google.protobuf.GeneratedMessage - implements AddressNameIndexDataBlocksOrBuilder { + com.google.protobuf.GeneratedMessage { // Use AddressNameIndexDataBlocks.newBuilder() to construct. - private AddressNameIndexDataBlocks(Builder builder) { - super(builder); + private AddressNameIndexDataBlocks() { + initFields(); } private AddressNameIndexDataBlocks(boolean noInit) {} @@ -11355,7 +6761,8 @@ public final class OsmandOdb { return defaultInstance; } - public AddressNameIndexDataBlocks getDefaultInstanceForType() { + @Override + public AddressNameIndexDataBlocks getDefaultInstanceForType() { return defaultInstance; } @@ -11364,30 +6771,17 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_AddressNameIndexDataBlocks_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_AddressNameIndexDataBlocks_fieldAccessorTable; } - public interface AddressNameIndexDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .AddressNameIndexDataAtom atom = 4; - java.util.List - getAtomList(); - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom getAtom(int index); - int getAtomCount(); - java.util.List - getAtomOrBuilderList(); - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtomOrBuilder getAtomOrBuilder( - int index); - } public static final class AddressNameIndexData extends - com.google.protobuf.GeneratedMessage - implements AddressNameIndexDataOrBuilder { + com.google.protobuf.GeneratedMessage { // Use AddressNameIndexData.newBuilder() to construct. - private AddressNameIndexData(Builder builder) { - super(builder); + private AddressNameIndexData() { + initFields(); } private AddressNameIndexData(boolean noInit) {} @@ -11396,7 +6790,8 @@ public final class OsmandOdb { return defaultInstance; } - public AddressNameIndexData getDefaultInstanceForType() { + @Override + public AddressNameIndexData getDefaultInstanceForType() { return defaultInstance; } @@ -11405,81 +6800,60 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_AddressNameIndexDataBlocks_AddressNameIndexData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_AddressNameIndexDataBlocks_AddressNameIndexData_fieldAccessorTable; } // repeated .AddressNameIndexDataAtom atom = 4; public static final int ATOM_FIELD_NUMBER = 4; - private java.util.List atom_; + private java.util.List atom_ = + java.util.Collections.emptyList(); public java.util.List getAtomList() { return atom_; } - public java.util.List - getAtomOrBuilderList() { - return atom_; - } - public int getAtomCount() { - return atom_.size(); - } + public int getAtomCount() { return atom_.size(); } public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom getAtom(int index) { return atom_.get(index); } - public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtomOrBuilder getAtomOrBuilder( - int index) { - return atom_.get(index); - } private void initFields() { - atom_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - for (int i = 0; i < getAtomCount(); i++) { - if (!getAtom(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + for (net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom element : getAtomList()) { + if (!element.isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < atom_.size(); i++) { - output.writeMessage(4, atom_.get(i)); + for (net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom element : getAtomList()) { + output.writeMessage(4, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - for (int i = 0; i < atom_.size(); i++) { + for (net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom element : getAtomList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, atom_.get(i)); + .computeMessageSize(4, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -11548,108 +6922,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_AddressNameIndexDataBlocks_AddressNameIndexData_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_AddressNameIndexDataBlocks_AddressNameIndexData_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData result; // Construct using net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getAtomFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData(); + return builder; } - public Builder clear() { - super.clear(); - if (atomBuilder_ == null) { - atom_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - atomBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData build() { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData(this); - int from_bitField0_ = bitField0_; - if (atomBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - atom_ = java.util.Collections.unmodifiableList(atom_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.atom_ = atom_; - } else { - result.atom_ = atomBuilder_.build(); + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - onBuilt(); - return result; + if (result.atom_ != java.util.Collections.EMPTY_LIST) { + result.atom_ = + java.util.Collections.unmodifiableList(result.atom_); + } + net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData)other); } else { @@ -11660,47 +7022,18 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData other) { if (other == net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.getDefaultInstance()) return this; - if (atomBuilder_ == null) { - if (!other.atom_.isEmpty()) { - if (atom_.isEmpty()) { - atom_ = other.atom_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAtomIsMutable(); - atom_.addAll(other.atom_); - } - onChanged(); - } - } else { - if (!other.atom_.isEmpty()) { - if (atomBuilder_.isEmpty()) { - atomBuilder_.dispose(); - atomBuilder_ = null; - atom_ = other.atom_; - bitField0_ = (bitField0_ & ~0x00000001); - atomBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getAtomFieldBuilder() : null; - } else { - atomBuilder_.addAllMessages(other.atom_); - } + if (!other.atom_.isEmpty()) { + if (result.atom_.isEmpty()) { + result.atom_ = new java.util.ArrayList(); } + result.atom_.addAll(other.atom_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - for (int i = 0; i < getAtomCount(); i++) { - if (!getAtom(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -11712,13 +7045,11 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; @@ -11733,199 +7064,64 @@ public final class OsmandOdb { } } - private int bitField0_; // repeated .AddressNameIndexDataAtom atom = 4; - private java.util.List atom_ = - java.util.Collections.emptyList(); - private void ensureAtomIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - atom_ = new java.util.ArrayList(atom_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtomOrBuilder> atomBuilder_; - public java.util.List getAtomList() { - if (atomBuilder_ == null) { - return java.util.Collections.unmodifiableList(atom_); - } else { - return atomBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.atom_); } public int getAtomCount() { - if (atomBuilder_ == null) { - return atom_.size(); - } else { - return atomBuilder_.getCount(); - } + return result.getAtomCount(); } public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom getAtom(int index) { - if (atomBuilder_ == null) { - return atom_.get(index); - } else { - return atomBuilder_.getMessage(index); - } + return result.getAtom(index); } - public Builder setAtom( - int index, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom value) { - if (atomBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomIsMutable(); - atom_.set(index, value); - onChanged(); - } else { - atomBuilder_.setMessage(index, value); + public Builder setAtom(int index, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom value) { + if (value == null) { + throw new NullPointerException(); } + result.atom_.set(index, value); return this; } - public Builder setAtom( - int index, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder builderForValue) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - atom_.set(index, builderForValue.build()); - onChanged(); - } else { - atomBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setAtom(int index, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder builderForValue) { + result.atom_.set(index, builderForValue.build()); return this; } public Builder addAtom(net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom value) { - if (atomBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomIsMutable(); - atom_.add(value); - onChanged(); - } else { - atomBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.atom_.isEmpty()) { + result.atom_ = new java.util.ArrayList(); + } + result.atom_.add(value); return this; } - public Builder addAtom( - int index, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom value) { - if (atomBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomIsMutable(); - atom_.add(index, value); - onChanged(); - } else { - atomBuilder_.addMessage(index, value); - } - return this; - } - public Builder addAtom( - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder builderForValue) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - atom_.add(builderForValue.build()); - onChanged(); - } else { - atomBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addAtom( - int index, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder builderForValue) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - atom_.add(index, builderForValue.build()); - onChanged(); - } else { - atomBuilder_.addMessage(index, builderForValue.build()); + public Builder addAtom(net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder builderForValue) { + if (result.atom_.isEmpty()) { + result.atom_ = new java.util.ArrayList(); } + result.atom_.add(builderForValue.build()); return this; } public Builder addAllAtom( java.lang.Iterable values) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - super.addAll(values, atom_); - onChanged(); - } else { - atomBuilder_.addAllMessages(values); + if (result.atom_.isEmpty()) { + result.atom_ = new java.util.ArrayList(); } + super.addAll(values, result.atom_); return this; } public Builder clearAtom() { - if (atomBuilder_ == null) { - atom_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - atomBuilder_.clear(); - } + result.atom_ = java.util.Collections.emptyList(); return this; } - public Builder removeAtom(int index) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - atom_.remove(index); - onChanged(); - } else { - atomBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder getAtomBuilder( - int index) { - return getAtomFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtomOrBuilder getAtomOrBuilder( - int index) { - if (atomBuilder_ == null) { - return atom_.get(index); } else { - return atomBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getAtomOrBuilderList() { - if (atomBuilder_ != null) { - return atomBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(atom_); - } - } - public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder addAtomBuilder() { - return getAtomFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder addAtomBuilder( - int index) { - return getAtomFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.getDefaultInstance()); - } - public java.util.List - getAtomBuilderList() { - return getAtomFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtomOrBuilder> - getAtomFieldBuilder() { - if (atomBuilder_ == null) { - atomBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.Builder, net.osmand.binary.OsmandOdb.AddressNameIndexDataAtomOrBuilder>( - atom_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - atom_ = null; - } - return atomBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData) } static { defaultInstance = new AddressNameIndexData(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } @@ -11934,74 +7130,52 @@ public final class OsmandOdb { // repeated .OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData atom = 4; public static final int ATOM_FIELD_NUMBER = 4; - private java.util.List atom_; + private java.util.List atom_ = + java.util.Collections.emptyList(); public java.util.List getAtomList() { return atom_; } - public java.util.List - getAtomOrBuilderList() { - return atom_; - } - public int getAtomCount() { - return atom_.size(); - } + public int getAtomCount() { return atom_.size(); } public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData getAtom(int index) { return atom_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexDataOrBuilder getAtomOrBuilder( - int index) { - return atom_.get(index); - } private void initFields() { - atom_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - for (int i = 0; i < getAtomCount(); i++) { - if (!getAtom(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + for (net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData element : getAtomList()) { + if (!element.isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < atom_.size(); i++) { - output.writeMessage(4, atom_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData element : getAtomList()) { + output.writeMessage(4, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - for (int i = 0; i < atom_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData element : getAtomList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, atom_.get(i)); + .computeMessageSize(4, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -12070,108 +7244,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocksOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_AddressNameIndexDataBlocks_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_AddressNameIndexDataBlocks_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks result; // Construct using net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getAtomFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks(); + return builder; } - public Builder clear() { - super.clear(); - if (atomBuilder_ == null) { - atom_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - atomBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks build() { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks(this); - int from_bitField0_ = bitField0_; - if (atomBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - atom_ = java.util.Collections.unmodifiableList(atom_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.atom_ = atom_; - } else { - result.atom_ = atomBuilder_.build(); + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - onBuilt(); - return result; + if (result.atom_ != java.util.Collections.EMPTY_LIST) { + result.atom_ = + java.util.Collections.unmodifiableList(result.atom_); + } + net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks)other); } else { @@ -12182,47 +7344,18 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks other) { if (other == net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.getDefaultInstance()) return this; - if (atomBuilder_ == null) { - if (!other.atom_.isEmpty()) { - if (atom_.isEmpty()) { - atom_ = other.atom_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAtomIsMutable(); - atom_.addAll(other.atom_); - } - onChanged(); - } - } else { - if (!other.atom_.isEmpty()) { - if (atomBuilder_.isEmpty()) { - atomBuilder_.dispose(); - atomBuilder_ = null; - atom_ = other.atom_; - bitField0_ = (bitField0_ & ~0x00000001); - atomBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getAtomFieldBuilder() : null; - } else { - atomBuilder_.addAllMessages(other.atom_); - } + if (!other.atom_.isEmpty()) { + if (result.atom_.isEmpty()) { + result.atom_ = new java.util.ArrayList(); } + result.atom_.addAll(other.atom_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - for (int i = 0; i < getAtomCount(); i++) { - if (!getAtom(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12234,13 +7367,11 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; @@ -12255,301 +7386,134 @@ public final class OsmandOdb { } } - private int bitField0_; // repeated .OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData atom = 4; - private java.util.List atom_ = - java.util.Collections.emptyList(); - private void ensureAtomIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - atom_ = new java.util.ArrayList(atom_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexDataOrBuilder> atomBuilder_; - public java.util.List getAtomList() { - if (atomBuilder_ == null) { - return java.util.Collections.unmodifiableList(atom_); - } else { - return atomBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.atom_); } public int getAtomCount() { - if (atomBuilder_ == null) { - return atom_.size(); - } else { - return atomBuilder_.getCount(); - } + return result.getAtomCount(); } public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData getAtom(int index) { - if (atomBuilder_ == null) { - return atom_.get(index); - } else { - return atomBuilder_.getMessage(index); - } + return result.getAtom(index); } - public Builder setAtom( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData value) { - if (atomBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomIsMutable(); - atom_.set(index, value); - onChanged(); - } else { - atomBuilder_.setMessage(index, value); + public Builder setAtom(int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData value) { + if (value == null) { + throw new NullPointerException(); } + result.atom_.set(index, value); return this; } - public Builder setAtom( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder builderForValue) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - atom_.set(index, builderForValue.build()); - onChanged(); - } else { - atomBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setAtom(int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder builderForValue) { + result.atom_.set(index, builderForValue.build()); return this; } public Builder addAtom(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData value) { - if (atomBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomIsMutable(); - atom_.add(value); - onChanged(); - } else { - atomBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.atom_.isEmpty()) { + result.atom_ = new java.util.ArrayList(); + } + result.atom_.add(value); return this; } - public Builder addAtom( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData value) { - if (atomBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomIsMutable(); - atom_.add(index, value); - onChanged(); - } else { - atomBuilder_.addMessage(index, value); - } - return this; - } - public Builder addAtom( - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder builderForValue) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - atom_.add(builderForValue.build()); - onChanged(); - } else { - atomBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addAtom( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder builderForValue) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - atom_.add(index, builderForValue.build()); - onChanged(); - } else { - atomBuilder_.addMessage(index, builderForValue.build()); + public Builder addAtom(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder builderForValue) { + if (result.atom_.isEmpty()) { + result.atom_ = new java.util.ArrayList(); } + result.atom_.add(builderForValue.build()); return this; } public Builder addAllAtom( java.lang.Iterable values) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - super.addAll(values, atom_); - onChanged(); - } else { - atomBuilder_.addAllMessages(values); + if (result.atom_.isEmpty()) { + result.atom_ = new java.util.ArrayList(); } + super.addAll(values, result.atom_); return this; } public Builder clearAtom() { - if (atomBuilder_ == null) { - atom_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - atomBuilder_.clear(); - } + result.atom_ = java.util.Collections.emptyList(); return this; } - public Builder removeAtom(int index) { - if (atomBuilder_ == null) { - ensureAtomIsMutable(); - atom_.remove(index); - onChanged(); - } else { - atomBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder getAtomBuilder( - int index) { - return getAtomFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexDataOrBuilder getAtomOrBuilder( - int index) { - if (atomBuilder_ == null) { - return atom_.get(index); } else { - return atomBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getAtomOrBuilderList() { - if (atomBuilder_ != null) { - return atomBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(atom_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder addAtomBuilder() { - return getAtomFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder addAtomBuilder( - int index) { - return getAtomFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.getDefaultInstance()); - } - public java.util.List - getAtomBuilderList() { - return getAtomFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexDataOrBuilder> - getAtomFieldBuilder() { - if (atomBuilder_ == null) { - atomBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.AddressNameIndexDataOrBuilder>( - atom_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - atom_ = null; - } - return atomBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndAddressNameIndexData.AddressNameIndexDataBlocks) } static { defaultInstance = new AddressNameIndexDataBlocks(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndAddressNameIndexData.AddressNameIndexDataBlocks) } - private int bitField0_; // repeated .OsmAndAddressNameIndexData.AddressNameIndexDataBlocks blocks = 3; public static final int BLOCKS_FIELD_NUMBER = 3; - private java.util.List blocks_; + private java.util.List blocks_ = + java.util.Collections.emptyList(); public java.util.List getBlocksList() { return blocks_; } - public java.util.List - getBlocksOrBuilderList() { - return blocks_; - } - public int getBlocksCount() { - return blocks_.size(); - } + public int getBlocksCount() { return blocks_.size(); } public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks getBlocks(int index) { return blocks_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocksOrBuilder getBlocksOrBuilder( - int index) { - return blocks_.get(index); - } // required .IndexedStringTable table = 4; public static final int TABLE_FIELD_NUMBER = 4; + private boolean hasTable; private net.osmand.binary.OsmandOdb.IndexedStringTable table_; - public boolean hasTable() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public net.osmand.binary.OsmandOdb.IndexedStringTable getTable() { - return table_; - } - public net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getTableOrBuilder() { - return table_; - } + public boolean hasTable() { return hasTable; } + public net.osmand.binary.OsmandOdb.IndexedStringTable getTable() { return table_; } private void initFields() { - blocks_ = java.util.Collections.emptyList(); table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasTable()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasTable) return false; + for (net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks element : getBlocksList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getBlocksCount(); i++) { - if (!getBlocks(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < blocks_.size(); i++) { - output.writeMessage(3, blocks_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks element : getBlocksList()) { + output.writeMessage(3, element); } - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeMessage(4, table_); + if (hasTable()) { + output.writeMessage(4, getTable()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - for (int i = 0; i < blocks_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks element : getBlocksList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, blocks_.get(i)); + .computeMessageSize(3, element); } - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasTable()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, table_); + .computeMessageSize(4, getTable()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -12618,125 +7582,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndAddressNameIndexData_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData result; // Construct using net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBlocksFieldBuilder(); - getTableFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData(); + return builder; } - public Builder clear() { - super.clear(); - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - blocksBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } - if (tableBuilder_ == null) { - table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); - } else { - tableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); + result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData build() { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData result = new net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (blocksBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - blocks_ = java.util.Collections.unmodifiableList(blocks_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.blocks_ = blocks_; - } else { - result.blocks_ = blocksBuilder_.build(); + @Override + public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000001; + if (result.blocks_ != java.util.Collections.EMPTY_LIST) { + result.blocks_ = + java.util.Collections.unmodifiableList(result.blocks_); } - if (tableBuilder_ == null) { - result.table_ = table_; - } else { - result.table_ = tableBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData)other); } else { @@ -12747,31 +7682,11 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData other) { if (other == net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.getDefaultInstance()) return this; - if (blocksBuilder_ == null) { - if (!other.blocks_.isEmpty()) { - if (blocks_.isEmpty()) { - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureBlocksIsMutable(); - blocks_.addAll(other.blocks_); - } - onChanged(); - } - } else { - if (!other.blocks_.isEmpty()) { - if (blocksBuilder_.isEmpty()) { - blocksBuilder_.dispose(); - blocksBuilder_ = null; - blocks_ = other.blocks_; - bitField0_ = (bitField0_ & ~0x00000001); - blocksBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBlocksFieldBuilder() : null; - } else { - blocksBuilder_.addAllMessages(other.blocks_); - } + if (!other.blocks_.isEmpty()) { + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + result.blocks_.addAll(other.blocks_); } if (other.hasTable()) { mergeTable(other.getTable()); @@ -12780,21 +7695,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasTable()) { - - return false; - } - for (int i = 0; i < getBlocksCount(); i++) { - if (!getBlocks(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -12806,13 +7708,11 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; @@ -12836,326 +7736,112 @@ public final class OsmandOdb { } } - private int bitField0_; // repeated .OsmAndAddressNameIndexData.AddressNameIndexDataBlocks blocks = 3; - private java.util.List blocks_ = - java.util.Collections.emptyList(); - private void ensureBlocksIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - blocks_ = new java.util.ArrayList(blocks_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocksOrBuilder> blocksBuilder_; - public java.util.List getBlocksList() { - if (blocksBuilder_ == null) { - return java.util.Collections.unmodifiableList(blocks_); - } else { - return blocksBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.blocks_); } public int getBlocksCount() { - if (blocksBuilder_ == null) { - return blocks_.size(); - } else { - return blocksBuilder_.getCount(); - } + return result.getBlocksCount(); } public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks getBlocks(int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); - } else { - return blocksBuilder_.getMessage(index); - } + return result.getBlocks(index); } - public Builder setBlocks( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.set(index, value); - onChanged(); - } else { - blocksBuilder_.setMessage(index, value); + public Builder setBlocks(int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks value) { + if (value == null) { + throw new NullPointerException(); } + result.blocks_.set(index, value); return this; } - public Builder setBlocks( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.set(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBlocks(int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder builderForValue) { + result.blocks_.set(index, builderForValue.build()); return this; } public Builder addBlocks(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(value); - onChanged(); - } else { - blocksBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); + } + result.blocks_.add(value); return this; } - public Builder addBlocks( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks value) { - if (blocksBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBlocksIsMutable(); - blocks_.add(index, value); - onChanged(); - } else { - blocksBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBlocks( - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBlocks( - int index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder builderForValue) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.add(index, builderForValue.build()); - onChanged(); - } else { - blocksBuilder_.addMessage(index, builderForValue.build()); + public Builder addBlocks(net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder builderForValue) { + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + result.blocks_.add(builderForValue.build()); return this; } public Builder addAllBlocks( java.lang.Iterable values) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - super.addAll(values, blocks_); - onChanged(); - } else { - blocksBuilder_.addAllMessages(values); + if (result.blocks_.isEmpty()) { + result.blocks_ = new java.util.ArrayList(); } + super.addAll(values, result.blocks_); return this; } public Builder clearBlocks() { - if (blocksBuilder_ == null) { - blocks_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - blocksBuilder_.clear(); - } + result.blocks_ = java.util.Collections.emptyList(); return this; } - public Builder removeBlocks(int index) { - if (blocksBuilder_ == null) { - ensureBlocksIsMutable(); - blocks_.remove(index); - onChanged(); - } else { - blocksBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder getBlocksBuilder( - int index) { - return getBlocksFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocksOrBuilder getBlocksOrBuilder( - int index) { - if (blocksBuilder_ == null) { - return blocks_.get(index); } else { - return blocksBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBlocksOrBuilderList() { - if (blocksBuilder_ != null) { - return blocksBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(blocks_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder addBlocksBuilder() { - return getBlocksFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder addBlocksBuilder( - int index) { - return getBlocksFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.getDefaultInstance()); - } - public java.util.List - getBlocksBuilderList() { - return getBlocksFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocksOrBuilder> - getBlocksFieldBuilder() { - if (blocksBuilder_ == null) { - blocksBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocks.Builder, net.osmand.binary.OsmandOdb.OsmAndAddressNameIndexData.AddressNameIndexDataBlocksOrBuilder>( - blocks_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - blocks_ = null; - } - return blocksBuilder_; - } // required .IndexedStringTable table = 4; - private net.osmand.binary.OsmandOdb.IndexedStringTable table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder> tableBuilder_; public boolean hasTable() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasTable(); } public net.osmand.binary.OsmandOdb.IndexedStringTable getTable() { - if (tableBuilder_ == null) { - return table_; - } else { - return tableBuilder_.getMessage(); - } + return result.getTable(); } public Builder setTable(net.osmand.binary.OsmandOdb.IndexedStringTable value) { - if (tableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - table_ = value; - onChanged(); - } else { - tableBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000002; + result.hasTable = true; + result.table_ = value; return this; } - public Builder setTable( - net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { - if (tableBuilder_ == null) { - table_ = builderForValue.build(); - onChanged(); - } else { - tableBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; + public Builder setTable(net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { + result.hasTable = true; + result.table_ = builderForValue.build(); return this; } public Builder mergeTable(net.osmand.binary.OsmandOdb.IndexedStringTable value) { - if (tableBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - table_ != net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance()) { - table_ = - net.osmand.binary.OsmandOdb.IndexedStringTable.newBuilder(table_).mergeFrom(value).buildPartial(); - } else { - table_ = value; - } - onChanged(); + if (result.hasTable() && + result.table_ != net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance()) { + result.table_ = + net.osmand.binary.OsmandOdb.IndexedStringTable.newBuilder(result.table_).mergeFrom(value).buildPartial(); } else { - tableBuilder_.mergeFrom(value); + result.table_ = value; } - bitField0_ |= 0x00000002; + result.hasTable = true; return this; } public Builder clearTable() { - if (tableBuilder_ == null) { - table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); - onChanged(); - } else { - tableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); + result.hasTable = false; + result.table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.IndexedStringTable.Builder getTableBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getTableFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getTableOrBuilder() { - if (tableBuilder_ != null) { - return tableBuilder_.getMessageOrBuilder(); - } else { - return table_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder> - getTableFieldBuilder() { - if (tableBuilder_ == null) { - tableBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder>( - table_, - getParentForChildren(), - isClean()); - table_ = null; - } - return tableBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndAddressNameIndexData) } static { defaultInstance = new OsmAndAddressNameIndexData(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndAddressNameIndexData) } - public interface AddressNameIndexDataAtomOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string name = 1; - boolean hasName(); - String getName(); - - // optional string nameEn = 2; - boolean hasNameEn(); - String getNameEn(); - - // required uint32 type = 3; - boolean hasType(); - int getType(); - - // repeated fixed32 shiftToIndex = 5; - java.util.List getShiftToIndexList(); - int getShiftToIndexCount(); - int getShiftToIndex(int index); - - // repeated fixed32 shiftToCityIndex = 6; - java.util.List getShiftToCityIndexList(); - int getShiftToCityIndexCount(); - int getShiftToCityIndex(int index); - } public static final class AddressNameIndexDataAtom extends - com.google.protobuf.GeneratedMessage - implements AddressNameIndexDataAtomOrBuilder { + com.google.protobuf.GeneratedMessage { // Use AddressNameIndexDataAtom.newBuilder() to construct. - private AddressNameIndexDataAtom(Builder builder) { - super(builder); + private AddressNameIndexDataAtom() { + initFields(); } private AddressNameIndexDataAtom(boolean noInit) {} @@ -13164,7 +7850,8 @@ public final class OsmandOdb { return defaultInstance; } - public AddressNameIndexDataAtom getDefaultInstanceForType() { + @Override + public AddressNameIndexDataAtom getDefaultInstanceForType() { return defaultInstance; } @@ -13173,176 +7860,106 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_AddressNameIndexDataAtom_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_AddressNameIndexDataAtom_fieldAccessorTable; } - private int bitField0_; // required string name = 1; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // optional string nameEn = 2; public static final int NAMEEN_FIELD_NUMBER = 2; - private java.lang.Object nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nameEn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameEnBytes() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nameEn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNameEn; + private java.lang.String nameEn_ = ""; + public boolean hasNameEn() { return hasNameEn; } + public java.lang.String getNameEn() { return nameEn_; } // required uint32 type = 3; public static final int TYPE_FIELD_NUMBER = 3; - private int type_; - public boolean hasType() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getType() { - return type_; - } + private boolean hasType; + private int type_ = 0; + public boolean hasType() { return hasType; } + public int getType() { return type_; } // repeated fixed32 shiftToIndex = 5; public static final int SHIFTTOINDEX_FIELD_NUMBER = 5; - private java.util.List shiftToIndex_; - public java.util.List - getShiftToIndexList() { + private java.util.List shiftToIndex_ = + java.util.Collections.emptyList(); + public java.util.List getShiftToIndexList() { return shiftToIndex_; } - public int getShiftToIndexCount() { - return shiftToIndex_.size(); - } + public int getShiftToIndexCount() { return shiftToIndex_.size(); } public int getShiftToIndex(int index) { return shiftToIndex_.get(index); } // repeated fixed32 shiftToCityIndex = 6; public static final int SHIFTTOCITYINDEX_FIELD_NUMBER = 6; - private java.util.List shiftToCityIndex_; - public java.util.List - getShiftToCityIndexList() { + private java.util.List shiftToCityIndex_ = + java.util.Collections.emptyList(); + public java.util.List getShiftToCityIndexList() { return shiftToCityIndex_; } - public int getShiftToCityIndexCount() { - return shiftToCityIndex_.size(); - } + public int getShiftToCityIndexCount() { return shiftToCityIndex_.size(); } public int getShiftToCityIndex(int index) { return shiftToCityIndex_.get(index); } private void initFields() { - name_ = ""; - nameEn_ = ""; - type_ = 0; - shiftToIndex_ = java.util.Collections.emptyList();; - shiftToCityIndex_ = java.util.Collections.emptyList();; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasType()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasName) return false; + if (!hasType) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + if (hasName()) { + output.writeString(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getNameEnBytes()); + if (hasNameEn()) { + output.writeString(2, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(3, type_); + if (hasType()) { + output.writeUInt32(3, getType()); } - for (int i = 0; i < shiftToIndex_.size(); i++) { - output.writeFixed32(5, shiftToIndex_.get(i)); + for (int element : getShiftToIndexList()) { + output.writeFixed32(5, element); } - for (int i = 0; i < shiftToCityIndex_.size(); i++) { - output.writeFixed32(6, shiftToCityIndex_.get(i)); + for (int element : getShiftToCityIndexList()) { + output.writeFixed32(6, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeStringSize(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameEnBytes()); + .computeStringSize(2, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasType()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, type_); + .computeUInt32Size(3, getType()); } { int dataSize = 0; @@ -13361,13 +7978,6 @@ public final class OsmandOdb { return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -13436,126 +8046,100 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.AddressNameIndexDataAtomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_AddressNameIndexDataAtom_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_AddressNameIndexDataAtom_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom result; // Construct using net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom(); + return builder; } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - nameEn_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - type_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - shiftToIndex_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000008); - shiftToCityIndex_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000010); + @Override + protected net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.getDescriptor(); } - public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom build() { - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom buildPartial() { - net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom result = new net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.shiftToIndex_ != java.util.Collections.EMPTY_LIST) { + result.shiftToIndex_ = + java.util.Collections.unmodifiableList(result.shiftToIndex_); } - result.nameEn_ = nameEn_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + if (result.shiftToCityIndex_ != java.util.Collections.EMPTY_LIST) { + result.shiftToCityIndex_ = + java.util.Collections.unmodifiableList(result.shiftToCityIndex_); } - result.type_ = type_; - if (((bitField0_ & 0x00000008) == 0x00000008)) { - shiftToIndex_ = java.util.Collections.unmodifiableList(shiftToIndex_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.shiftToIndex_ = shiftToIndex_; - if (((bitField0_ & 0x00000010) == 0x00000010)) { - shiftToCityIndex_ = java.util.Collections.unmodifiableList(shiftToCityIndex_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.shiftToCityIndex_ = shiftToCityIndex_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom) { return mergeFrom((net.osmand.binary.OsmandOdb.AddressNameIndexDataAtom)other); } else { @@ -13576,42 +8160,23 @@ public final class OsmandOdb { setType(other.getType()); } if (!other.shiftToIndex_.isEmpty()) { - if (shiftToIndex_.isEmpty()) { - shiftToIndex_ = other.shiftToIndex_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensureShiftToIndexIsMutable(); - shiftToIndex_.addAll(other.shiftToIndex_); + if (result.shiftToIndex_.isEmpty()) { + result.shiftToIndex_ = new java.util.ArrayList(); } - onChanged(); + result.shiftToIndex_.addAll(other.shiftToIndex_); } if (!other.shiftToCityIndex_.isEmpty()) { - if (shiftToCityIndex_.isEmpty()) { - shiftToCityIndex_ = other.shiftToCityIndex_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureShiftToCityIndexIsMutable(); - shiftToCityIndex_.addAll(other.shiftToCityIndex_); + if (result.shiftToCityIndex_.isEmpty()) { + result.shiftToCityIndex_ = new java.util.ArrayList(); } - onChanged(); + result.shiftToCityIndex_.addAll(other.shiftToCityIndex_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasName()) { - - return false; - } - if (!hasType()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -13623,35 +8188,29 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + setName(input.readString()); break; } case 18: { - bitField0_ |= 0x00000002; - nameEn_ = input.readBytes(); + setNameEn(input.readString()); break; } case 24: { - bitField0_ |= 0x00000004; - type_ = input.readUInt32(); + setType(input.readUInt32()); break; } case 45: { - ensureShiftToIndexIsMutable(); - shiftToIndex_.add(input.readFixed32()); + addShiftToIndex(input.readFixed32()); break; } case 42: { @@ -13664,8 +8223,7 @@ public final class OsmandOdb { break; } case 53: { - ensureShiftToCityIndexIsMutable(); - shiftToCityIndex_.add(input.readFixed32()); + addShiftToCityIndex(input.readFixed32()); break; } case 50: { @@ -13681,188 +8239,132 @@ public final class OsmandOdb { } } - private int bitField0_; // required string name = 1; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - } // optional string nameEn = 2; - private java.lang.Object nameEn_ = ""; public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasNameEn(); } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nameEn_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNameEn() { + return result.getNameEn(); } - public Builder setNameEn(String value) { + public Builder setNameEn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000002); - nameEn_ = getDefaultInstance().getNameEn(); - onChanged(); + result.hasNameEn = false; + result.nameEn_ = getDefaultInstance().getNameEn(); return this; } - void setNameEn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); - } // required uint32 type = 3; - private int type_ ; public boolean hasType() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasType(); } public int getType() { - return type_; + return result.getType(); } public Builder setType(int value) { - bitField0_ |= 0x00000004; - type_ = value; - onChanged(); + result.hasType = true; + result.type_ = value; return this; } public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000004); - type_ = 0; - onChanged(); + result.hasType = false; + result.type_ = 0; return this; } // repeated fixed32 shiftToIndex = 5; - private java.util.List shiftToIndex_ = java.util.Collections.emptyList();; - private void ensureShiftToIndexIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - shiftToIndex_ = new java.util.ArrayList(shiftToIndex_); - bitField0_ |= 0x00000008; - } - } - public java.util.List - getShiftToIndexList() { - return java.util.Collections.unmodifiableList(shiftToIndex_); + public java.util.List getShiftToIndexList() { + return java.util.Collections.unmodifiableList(result.shiftToIndex_); } public int getShiftToIndexCount() { - return shiftToIndex_.size(); + return result.getShiftToIndexCount(); } public int getShiftToIndex(int index) { - return shiftToIndex_.get(index); + return result.getShiftToIndex(index); } - public Builder setShiftToIndex( - int index, int value) { - ensureShiftToIndexIsMutable(); - shiftToIndex_.set(index, value); - onChanged(); + public Builder setShiftToIndex(int index, int value) { + result.shiftToIndex_.set(index, value); return this; } public Builder addShiftToIndex(int value) { - ensureShiftToIndexIsMutable(); - shiftToIndex_.add(value); - onChanged(); + if (result.shiftToIndex_.isEmpty()) { + result.shiftToIndex_ = new java.util.ArrayList(); + } + result.shiftToIndex_.add(value); return this; } public Builder addAllShiftToIndex( java.lang.Iterable values) { - ensureShiftToIndexIsMutable(); - super.addAll(values, shiftToIndex_); - onChanged(); + if (result.shiftToIndex_.isEmpty()) { + result.shiftToIndex_ = new java.util.ArrayList(); + } + super.addAll(values, result.shiftToIndex_); return this; } public Builder clearShiftToIndex() { - shiftToIndex_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); + result.shiftToIndex_ = java.util.Collections.emptyList(); return this; } // repeated fixed32 shiftToCityIndex = 6; - private java.util.List shiftToCityIndex_ = java.util.Collections.emptyList();; - private void ensureShiftToCityIndexIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - shiftToCityIndex_ = new java.util.ArrayList(shiftToCityIndex_); - bitField0_ |= 0x00000010; - } - } - public java.util.List - getShiftToCityIndexList() { - return java.util.Collections.unmodifiableList(shiftToCityIndex_); + public java.util.List getShiftToCityIndexList() { + return java.util.Collections.unmodifiableList(result.shiftToCityIndex_); } public int getShiftToCityIndexCount() { - return shiftToCityIndex_.size(); + return result.getShiftToCityIndexCount(); } public int getShiftToCityIndex(int index) { - return shiftToCityIndex_.get(index); + return result.getShiftToCityIndex(index); } - public Builder setShiftToCityIndex( - int index, int value) { - ensureShiftToCityIndexIsMutable(); - shiftToCityIndex_.set(index, value); - onChanged(); + public Builder setShiftToCityIndex(int index, int value) { + result.shiftToCityIndex_.set(index, value); return this; } public Builder addShiftToCityIndex(int value) { - ensureShiftToCityIndexIsMutable(); - shiftToCityIndex_.add(value); - onChanged(); + if (result.shiftToCityIndex_.isEmpty()) { + result.shiftToCityIndex_ = new java.util.ArrayList(); + } + result.shiftToCityIndex_.add(value); return this; } public Builder addAllShiftToCityIndex( java.lang.Iterable values) { - ensureShiftToCityIndexIsMutable(); - super.addAll(values, shiftToCityIndex_); - onChanged(); + if (result.shiftToCityIndex_.isEmpty()) { + result.shiftToCityIndex_ = new java.util.ArrayList(); + } + super.addAll(values, result.shiftToCityIndex_); return this; } public Builder clearShiftToCityIndex() { - shiftToCityIndex_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); + result.shiftToCityIndex_ = java.util.Collections.emptyList(); return this; } @@ -13871,49 +8373,18 @@ public final class OsmandOdb { static { defaultInstance = new AddressNameIndexDataAtom(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:AddressNameIndexDataAtom) } - public interface CityIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional uint32 city_type = 1; - boolean hasCityType(); - int getCityType(); - - // required string name = 2; - boolean hasName(); - String getName(); - - // optional string name_en = 3; - boolean hasNameEn(); - String getNameEn(); - - // optional uint64 id = 4; - boolean hasId(); - long getId(); - - // required uint32 x = 5; - boolean hasX(); - int getX(); - - // required uint32 y = 6; - boolean hasY(); - int getY(); - - // optional fixed32 shiftToCityBlockIndex = 10; - boolean hasShiftToCityBlockIndex(); - int getShiftToCityBlockIndex(); - } public static final class CityIndex extends - com.google.protobuf.GeneratedMessage - implements CityIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use CityIndex.newBuilder() to construct. - private CityIndex(Builder builder) { - super(builder); + private CityIndex() { + initFields(); } private CityIndex(boolean noInit) {} @@ -13922,7 +8393,8 @@ public final class OsmandOdb { return defaultInstance; } - public CityIndex getDefaultInstanceForType() { + @Override + public CityIndex getDefaultInstanceForType() { return defaultInstance; } @@ -13931,229 +8403,139 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_CityIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_CityIndex_fieldAccessorTable; } - private int bitField0_; // optional uint32 city_type = 1; public static final int CITY_TYPE_FIELD_NUMBER = 1; - private int cityType_; - public boolean hasCityType() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getCityType() { - return cityType_; - } + private boolean hasCityType; + private int cityType_ = 0; + public boolean hasCityType() { return hasCityType; } + public int getCityType() { return cityType_; } // required string name = 2; public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // optional string name_en = 3; public static final int NAME_EN_FIELD_NUMBER = 3; - private java.lang.Object nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nameEn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameEnBytes() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nameEn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNameEn; + private java.lang.String nameEn_ = ""; + public boolean hasNameEn() { return hasNameEn; } + public java.lang.String getNameEn() { return nameEn_; } // optional uint64 id = 4; public static final int ID_FIELD_NUMBER = 4; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public long getId() { - return id_; - } + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } // required uint32 x = 5; public static final int X_FIELD_NUMBER = 5; - private int x_; - public boolean hasX() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getX() { - return x_; - } + private boolean hasX; + private int x_ = 0; + public boolean hasX() { return hasX; } + public int getX() { return x_; } // required uint32 y = 6; public static final int Y_FIELD_NUMBER = 6; - private int y_; - public boolean hasY() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public int getY() { - return y_; - } + private boolean hasY; + private int y_ = 0; + public boolean hasY() { return hasY; } + public int getY() { return y_; } // optional fixed32 shiftToCityBlockIndex = 10; public static final int SHIFTTOCITYBLOCKINDEX_FIELD_NUMBER = 10; - private int shiftToCityBlockIndex_; - public boolean hasShiftToCityBlockIndex() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public int getShiftToCityBlockIndex() { - return shiftToCityBlockIndex_; - } + private boolean hasShiftToCityBlockIndex; + private int shiftToCityBlockIndex_ = 0; + public boolean hasShiftToCityBlockIndex() { return hasShiftToCityBlockIndex; } + public int getShiftToCityBlockIndex() { return shiftToCityBlockIndex_; } private void initFields() { - cityType_ = 0; - name_ = ""; - nameEn_ = ""; - id_ = 0L; - x_ = 0; - y_ = 0; - shiftToCityBlockIndex_ = 0; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasX()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasY()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasName) return false; + if (!hasX) return false; + if (!hasY) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, cityType_); + if (hasCityType()) { + output.writeUInt32(1, getCityType()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getNameBytes()); + if (hasName()) { + output.writeString(2, getName()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getNameEnBytes()); + if (hasNameEn()) { + output.writeString(3, getNameEn()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt64(4, id_); + if (hasId()) { + output.writeUInt64(4, getId()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(5, x_); + if (hasX()) { + output.writeUInt32(5, getX()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeUInt32(6, y_); + if (hasY()) { + output.writeUInt32(6, getY()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeFixed32(10, shiftToCityBlockIndex_); + if (hasShiftToCityBlockIndex()) { + output.writeFixed32(10, getShiftToCityBlockIndex()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasCityType()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, cityType_); + .computeUInt32Size(1, getCityType()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameBytes()); + .computeStringSize(2, getName()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getNameEnBytes()); + .computeStringSize(3, getNameEn()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(4, id_); + .computeUInt64Size(4, getId()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasX()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(5, x_); + .computeUInt32Size(5, getX()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (hasY()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, y_); + .computeUInt32Size(6, getY()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (hasShiftToCityBlockIndex()) { size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(10, shiftToCityBlockIndex_); + .computeFixed32Size(10, getShiftToCityBlockIndex()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.CityIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -14222,136 +8604,92 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.CityIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.CityIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_CityIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_CityIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.CityIndex result; // Construct using net.osmand.binary.OsmandOdb.CityIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.CityIndex(); + return builder; } - public Builder clear() { - super.clear(); - cityType_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - nameEn_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000008); - x_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - y_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - shiftToCityBlockIndex_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); + @Override + protected net.osmand.binary.OsmandOdb.CityIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.CityIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.CityIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.CityIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.CityIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.CityIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.CityIndex build() { - net.osmand.binary.OsmandOdb.CityIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.CityIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.CityIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.CityIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.CityIndex buildPartial() { - net.osmand.binary.OsmandOdb.CityIndex result = new net.osmand.binary.OsmandOdb.CityIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.CityIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.cityType_ = cityType_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.nameEn_ = nameEn_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.id_ = id_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.x_ = x_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.y_ = y_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.shiftToCityBlockIndex_ = shiftToCityBlockIndex_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.CityIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.CityIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.CityIndex)other); } else { @@ -14387,23 +8725,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasName()) { - - return false; - } - if (!hasX()) { - - return false; - } - if (!hasY()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -14415,232 +8738,177 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - cityType_ = input.readUInt32(); + setCityType(input.readUInt32()); break; } case 18: { - bitField0_ |= 0x00000002; - name_ = input.readBytes(); + setName(input.readString()); break; } case 26: { - bitField0_ |= 0x00000004; - nameEn_ = input.readBytes(); + setNameEn(input.readString()); break; } case 32: { - bitField0_ |= 0x00000008; - id_ = input.readUInt64(); + setId(input.readUInt64()); break; } case 40: { - bitField0_ |= 0x00000010; - x_ = input.readUInt32(); + setX(input.readUInt32()); break; } case 48: { - bitField0_ |= 0x00000020; - y_ = input.readUInt32(); + setY(input.readUInt32()); break; } case 85: { - bitField0_ |= 0x00000040; - shiftToCityBlockIndex_ = input.readFixed32(); + setShiftToCityBlockIndex(input.readFixed32()); break; } } } } - private int bitField0_; // optional uint32 city_type = 1; - private int cityType_ ; public boolean hasCityType() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasCityType(); } public int getCityType() { - return cityType_; + return result.getCityType(); } public Builder setCityType(int value) { - bitField0_ |= 0x00000001; - cityType_ = value; - onChanged(); + result.hasCityType = true; + result.cityType_ = value; return this; } public Builder clearCityType() { - bitField0_ = (bitField0_ & ~0x00000001); - cityType_ = 0; - onChanged(); + result.hasCityType = false; + result.cityType_ = 0; return this; } // required string name = 2; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000002); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - name_ = value; - onChanged(); - } // optional string name_en = 3; - private java.lang.Object nameEn_ = ""; public boolean hasNameEn() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasNameEn(); } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nameEn_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNameEn() { + return result.getNameEn(); } - public Builder setNameEn(String value) { + public Builder setNameEn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000004); - nameEn_ = getDefaultInstance().getNameEn(); - onChanged(); + result.hasNameEn = false; + result.nameEn_ = getDefaultInstance().getNameEn(); return this; } - void setNameEn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - nameEn_ = value; - onChanged(); - } // optional uint64 id = 4; - private long id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasId(); } public long getId() { - return id_; + return result.getId(); } public Builder setId(long value) { - bitField0_ |= 0x00000008; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000008); - id_ = 0L; - onChanged(); + result.hasId = false; + result.id_ = 0L; return this; } // required uint32 x = 5; - private int x_ ; public boolean hasX() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasX(); } public int getX() { - return x_; + return result.getX(); } public Builder setX(int value) { - bitField0_ |= 0x00000010; - x_ = value; - onChanged(); + result.hasX = true; + result.x_ = value; return this; } public Builder clearX() { - bitField0_ = (bitField0_ & ~0x00000010); - x_ = 0; - onChanged(); + result.hasX = false; + result.x_ = 0; return this; } // required uint32 y = 6; - private int y_ ; public boolean hasY() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return result.hasY(); } public int getY() { - return y_; + return result.getY(); } public Builder setY(int value) { - bitField0_ |= 0x00000020; - y_ = value; - onChanged(); + result.hasY = true; + result.y_ = value; return this; } public Builder clearY() { - bitField0_ = (bitField0_ & ~0x00000020); - y_ = 0; - onChanged(); + result.hasY = false; + result.y_ = 0; return this; } // optional fixed32 shiftToCityBlockIndex = 10; - private int shiftToCityBlockIndex_ ; public boolean hasShiftToCityBlockIndex() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return result.hasShiftToCityBlockIndex(); } public int getShiftToCityBlockIndex() { - return shiftToCityBlockIndex_; + return result.getShiftToCityBlockIndex(); } public Builder setShiftToCityBlockIndex(int value) { - bitField0_ |= 0x00000040; - shiftToCityBlockIndex_ = value; - onChanged(); + result.hasShiftToCityBlockIndex = true; + result.shiftToCityBlockIndex_ = value; return this; } public Builder clearShiftToCityBlockIndex() { - bitField0_ = (bitField0_ & ~0x00000040); - shiftToCityBlockIndex_ = 0; - onChanged(); + result.hasShiftToCityBlockIndex = false; + result.shiftToCityBlockIndex_ = 0; return this; } @@ -14649,45 +8917,18 @@ public final class OsmandOdb { static { defaultInstance = new CityIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:CityIndex) } - public interface CityBlockIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional fixed32 shiftToCityIndex = 4; - boolean hasShiftToCityIndex(); - int getShiftToCityIndex(); - - // repeated .BuildingIndex buildings = 16; - java.util.List - getBuildingsList(); - net.osmand.binary.OsmandOdb.BuildingIndex getBuildings(int index); - int getBuildingsCount(); - java.util.List - getBuildingsOrBuilderList(); - net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder getBuildingsOrBuilder( - int index); - - // repeated .StreetIndex streets = 18; - java.util.List - getStreetsList(); - net.osmand.binary.OsmandOdb.StreetIndex getStreets(int index); - int getStreetsCount(); - java.util.List - getStreetsOrBuilderList(); - net.osmand.binary.OsmandOdb.StreetIndexOrBuilder getStreetsOrBuilder( - int index); - } public static final class CityBlockIndex extends - com.google.protobuf.GeneratedMessage - implements CityBlockIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use CityBlockIndex.newBuilder() to construct. - private CityBlockIndex(Builder builder) { - super(builder); + private CityBlockIndex() { + initFields(); } private CityBlockIndex(boolean noInit) {} @@ -14696,7 +8937,8 @@ public final class OsmandOdb { return defaultInstance; } - public CityBlockIndex getDefaultInstanceForType() { + @Override + public CityBlockIndex getDefaultInstanceForType() { return defaultInstance; } @@ -14705,135 +8947,96 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_CityBlockIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_CityBlockIndex_fieldAccessorTable; } - private int bitField0_; // optional fixed32 shiftToCityIndex = 4; public static final int SHIFTTOCITYINDEX_FIELD_NUMBER = 4; - private int shiftToCityIndex_; - public boolean hasShiftToCityIndex() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getShiftToCityIndex() { - return shiftToCityIndex_; - } + private boolean hasShiftToCityIndex; + private int shiftToCityIndex_ = 0; + public boolean hasShiftToCityIndex() { return hasShiftToCityIndex; } + public int getShiftToCityIndex() { return shiftToCityIndex_; } // repeated .BuildingIndex buildings = 16; public static final int BUILDINGS_FIELD_NUMBER = 16; - private java.util.List buildings_; + private java.util.List buildings_ = + java.util.Collections.emptyList(); public java.util.List getBuildingsList() { return buildings_; } - public java.util.List - getBuildingsOrBuilderList() { - return buildings_; - } - public int getBuildingsCount() { - return buildings_.size(); - } + public int getBuildingsCount() { return buildings_.size(); } public net.osmand.binary.OsmandOdb.BuildingIndex getBuildings(int index) { return buildings_.get(index); } - public net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder getBuildingsOrBuilder( - int index) { - return buildings_.get(index); - } // repeated .StreetIndex streets = 18; public static final int STREETS_FIELD_NUMBER = 18; - private java.util.List streets_; + private java.util.List streets_ = + java.util.Collections.emptyList(); public java.util.List getStreetsList() { return streets_; } - public java.util.List - getStreetsOrBuilderList() { - return streets_; - } - public int getStreetsCount() { - return streets_.size(); - } + public int getStreetsCount() { return streets_.size(); } public net.osmand.binary.OsmandOdb.StreetIndex getStreets(int index) { return streets_.get(index); } - public net.osmand.binary.OsmandOdb.StreetIndexOrBuilder getStreetsOrBuilder( - int index) { - return streets_.get(index); - } private void initFields() { - shiftToCityIndex_ = 0; - buildings_ = java.util.Collections.emptyList(); - streets_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - for (int i = 0; i < getBuildingsCount(); i++) { - if (!getBuildings(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + for (net.osmand.binary.OsmandOdb.BuildingIndex element : getBuildingsList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getStreetsCount(); i++) { - if (!getStreets(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + for (net.osmand.binary.OsmandOdb.StreetIndex element : getStreetsList()) { + if (!element.isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeFixed32(4, shiftToCityIndex_); + if (hasShiftToCityIndex()) { + output.writeFixed32(4, getShiftToCityIndex()); } - for (int i = 0; i < buildings_.size(); i++) { - output.writeMessage(16, buildings_.get(i)); + for (net.osmand.binary.OsmandOdb.BuildingIndex element : getBuildingsList()) { + output.writeMessage(16, element); } - for (int i = 0; i < streets_.size(); i++) { - output.writeMessage(18, streets_.get(i)); + for (net.osmand.binary.OsmandOdb.StreetIndex element : getStreetsList()) { + output.writeMessage(18, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasShiftToCityIndex()) { size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(4, shiftToCityIndex_); + .computeFixed32Size(4, getShiftToCityIndex()); } - for (int i = 0; i < buildings_.size(); i++) { + for (net.osmand.binary.OsmandOdb.BuildingIndex element : getBuildingsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, buildings_.get(i)); + .computeMessageSize(16, element); } - for (int i = 0; i < streets_.size(); i++) { + for (net.osmand.binary.OsmandOdb.StreetIndex element : getStreetsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(18, streets_.get(i)); + .computeMessageSize(18, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.CityBlockIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -14902,132 +9105,100 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.CityBlockIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.CityBlockIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_CityBlockIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_CityBlockIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.CityBlockIndex result; // Construct using net.osmand.binary.OsmandOdb.CityBlockIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBuildingsFieldBuilder(); - getStreetsFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.CityBlockIndex(); + return builder; } - public Builder clear() { - super.clear(); - shiftToCityIndex_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - if (buildingsBuilder_ == null) { - buildings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - } else { - buildingsBuilder_.clear(); - } - if (streetsBuilder_ == null) { - streets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - streetsBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.CityBlockIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.CityBlockIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.CityBlockIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.CityBlockIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.CityBlockIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.CityBlockIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.CityBlockIndex build() { - net.osmand.binary.OsmandOdb.CityBlockIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.CityBlockIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.CityBlockIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.CityBlockIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.CityBlockIndex buildPartial() { - net.osmand.binary.OsmandOdb.CityBlockIndex result = new net.osmand.binary.OsmandOdb.CityBlockIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.CityBlockIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.shiftToCityIndex_ = shiftToCityIndex_; - if (buildingsBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002)) { - buildings_ = java.util.Collections.unmodifiableList(buildings_); - bitField0_ = (bitField0_ & ~0x00000002); - } - result.buildings_ = buildings_; - } else { - result.buildings_ = buildingsBuilder_.build(); + if (result.buildings_ != java.util.Collections.EMPTY_LIST) { + result.buildings_ = + java.util.Collections.unmodifiableList(result.buildings_); } - if (streetsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - streets_ = java.util.Collections.unmodifiableList(streets_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.streets_ = streets_; - } else { - result.streets_ = streetsBuilder_.build(); + if (result.streets_ != java.util.Collections.EMPTY_LIST) { + result.streets_ = + java.util.Collections.unmodifiableList(result.streets_); } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.CityBlockIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.CityBlockIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.CityBlockIndex)other); } else { @@ -15041,79 +9212,24 @@ public final class OsmandOdb { if (other.hasShiftToCityIndex()) { setShiftToCityIndex(other.getShiftToCityIndex()); } - if (buildingsBuilder_ == null) { - if (!other.buildings_.isEmpty()) { - if (buildings_.isEmpty()) { - buildings_ = other.buildings_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureBuildingsIsMutable(); - buildings_.addAll(other.buildings_); - } - onChanged(); - } - } else { - if (!other.buildings_.isEmpty()) { - if (buildingsBuilder_.isEmpty()) { - buildingsBuilder_.dispose(); - buildingsBuilder_ = null; - buildings_ = other.buildings_; - bitField0_ = (bitField0_ & ~0x00000002); - buildingsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBuildingsFieldBuilder() : null; - } else { - buildingsBuilder_.addAllMessages(other.buildings_); - } + if (!other.buildings_.isEmpty()) { + if (result.buildings_.isEmpty()) { + result.buildings_ = new java.util.ArrayList(); } + result.buildings_.addAll(other.buildings_); } - if (streetsBuilder_ == null) { - if (!other.streets_.isEmpty()) { - if (streets_.isEmpty()) { - streets_ = other.streets_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureStreetsIsMutable(); - streets_.addAll(other.streets_); - } - onChanged(); - } - } else { - if (!other.streets_.isEmpty()) { - if (streetsBuilder_.isEmpty()) { - streetsBuilder_.dispose(); - streetsBuilder_ = null; - streets_ = other.streets_; - bitField0_ = (bitField0_ & ~0x00000004); - streetsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getStreetsFieldBuilder() : null; - } else { - streetsBuilder_.addAllMessages(other.streets_); - } + if (!other.streets_.isEmpty()) { + if (result.streets_.isEmpty()) { + result.streets_ = new java.util.ArrayList(); } + result.streets_.addAll(other.streets_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - for (int i = 0; i < getBuildingsCount(); i++) { - if (!getBuildings(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getStreetsCount(); i++) { - if (!getStreets(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -15125,20 +9241,17 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 37: { - bitField0_ |= 0x00000001; - shiftToCityIndex_ = input.readFixed32(); + setShiftToCityIndex(input.readFixed32()); break; } case 130: { @@ -15157,461 +9270,144 @@ public final class OsmandOdb { } } - private int bitField0_; // optional fixed32 shiftToCityIndex = 4; - private int shiftToCityIndex_ ; public boolean hasShiftToCityIndex() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasShiftToCityIndex(); } public int getShiftToCityIndex() { - return shiftToCityIndex_; + return result.getShiftToCityIndex(); } public Builder setShiftToCityIndex(int value) { - bitField0_ |= 0x00000001; - shiftToCityIndex_ = value; - onChanged(); + result.hasShiftToCityIndex = true; + result.shiftToCityIndex_ = value; return this; } public Builder clearShiftToCityIndex() { - bitField0_ = (bitField0_ & ~0x00000001); - shiftToCityIndex_ = 0; - onChanged(); + result.hasShiftToCityIndex = false; + result.shiftToCityIndex_ = 0; return this; } // repeated .BuildingIndex buildings = 16; - private java.util.List buildings_ = - java.util.Collections.emptyList(); - private void ensureBuildingsIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - buildings_ = new java.util.ArrayList(buildings_); - bitField0_ |= 0x00000002; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.BuildingIndex, net.osmand.binary.OsmandOdb.BuildingIndex.Builder, net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder> buildingsBuilder_; - public java.util.List getBuildingsList() { - if (buildingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(buildings_); - } else { - return buildingsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.buildings_); } public int getBuildingsCount() { - if (buildingsBuilder_ == null) { - return buildings_.size(); - } else { - return buildingsBuilder_.getCount(); - } + return result.getBuildingsCount(); } public net.osmand.binary.OsmandOdb.BuildingIndex getBuildings(int index) { - if (buildingsBuilder_ == null) { - return buildings_.get(index); - } else { - return buildingsBuilder_.getMessage(index); - } + return result.getBuildings(index); } - public Builder setBuildings( - int index, net.osmand.binary.OsmandOdb.BuildingIndex value) { - if (buildingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuildingsIsMutable(); - buildings_.set(index, value); - onChanged(); - } else { - buildingsBuilder_.setMessage(index, value); + public Builder setBuildings(int index, net.osmand.binary.OsmandOdb.BuildingIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.buildings_.set(index, value); return this; } - public Builder setBuildings( - int index, net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - buildings_.set(index, builderForValue.build()); - onChanged(); - } else { - buildingsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBuildings(int index, net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { + result.buildings_.set(index, builderForValue.build()); return this; } public Builder addBuildings(net.osmand.binary.OsmandOdb.BuildingIndex value) { - if (buildingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuildingsIsMutable(); - buildings_.add(value); - onChanged(); - } else { - buildingsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.buildings_.isEmpty()) { + result.buildings_ = new java.util.ArrayList(); + } + result.buildings_.add(value); return this; } - public Builder addBuildings( - int index, net.osmand.binary.OsmandOdb.BuildingIndex value) { - if (buildingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuildingsIsMutable(); - buildings_.add(index, value); - onChanged(); - } else { - buildingsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBuildings( - net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - buildings_.add(builderForValue.build()); - onChanged(); - } else { - buildingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBuildings( - int index, net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - buildings_.add(index, builderForValue.build()); - onChanged(); - } else { - buildingsBuilder_.addMessage(index, builderForValue.build()); + public Builder addBuildings(net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { + if (result.buildings_.isEmpty()) { + result.buildings_ = new java.util.ArrayList(); } + result.buildings_.add(builderForValue.build()); return this; } public Builder addAllBuildings( java.lang.Iterable values) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - super.addAll(values, buildings_); - onChanged(); - } else { - buildingsBuilder_.addAllMessages(values); + if (result.buildings_.isEmpty()) { + result.buildings_ = new java.util.ArrayList(); } + super.addAll(values, result.buildings_); return this; } public Builder clearBuildings() { - if (buildingsBuilder_ == null) { - buildings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); - } else { - buildingsBuilder_.clear(); - } + result.buildings_ = java.util.Collections.emptyList(); return this; } - public Builder removeBuildings(int index) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - buildings_.remove(index); - onChanged(); - } else { - buildingsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.BuildingIndex.Builder getBuildingsBuilder( - int index) { - return getBuildingsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder getBuildingsOrBuilder( - int index) { - if (buildingsBuilder_ == null) { - return buildings_.get(index); } else { - return buildingsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBuildingsOrBuilderList() { - if (buildingsBuilder_ != null) { - return buildingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(buildings_); - } - } - public net.osmand.binary.OsmandOdb.BuildingIndex.Builder addBuildingsBuilder() { - return getBuildingsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.BuildingIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.BuildingIndex.Builder addBuildingsBuilder( - int index) { - return getBuildingsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.BuildingIndex.getDefaultInstance()); - } - public java.util.List - getBuildingsBuilderList() { - return getBuildingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.BuildingIndex, net.osmand.binary.OsmandOdb.BuildingIndex.Builder, net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder> - getBuildingsFieldBuilder() { - if (buildingsBuilder_ == null) { - buildingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.BuildingIndex, net.osmand.binary.OsmandOdb.BuildingIndex.Builder, net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder>( - buildings_, - ((bitField0_ & 0x00000002) == 0x00000002), - getParentForChildren(), - isClean()); - buildings_ = null; - } - return buildingsBuilder_; - } // repeated .StreetIndex streets = 18; - private java.util.List streets_ = - java.util.Collections.emptyList(); - private void ensureStreetsIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - streets_ = new java.util.ArrayList(streets_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.StreetIndex, net.osmand.binary.OsmandOdb.StreetIndex.Builder, net.osmand.binary.OsmandOdb.StreetIndexOrBuilder> streetsBuilder_; - public java.util.List getStreetsList() { - if (streetsBuilder_ == null) { - return java.util.Collections.unmodifiableList(streets_); - } else { - return streetsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.streets_); } public int getStreetsCount() { - if (streetsBuilder_ == null) { - return streets_.size(); - } else { - return streetsBuilder_.getCount(); - } + return result.getStreetsCount(); } public net.osmand.binary.OsmandOdb.StreetIndex getStreets(int index) { - if (streetsBuilder_ == null) { - return streets_.get(index); - } else { - return streetsBuilder_.getMessage(index); - } + return result.getStreets(index); } - public Builder setStreets( - int index, net.osmand.binary.OsmandOdb.StreetIndex value) { - if (streetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStreetsIsMutable(); - streets_.set(index, value); - onChanged(); - } else { - streetsBuilder_.setMessage(index, value); + public Builder setStreets(int index, net.osmand.binary.OsmandOdb.StreetIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.streets_.set(index, value); return this; } - public Builder setStreets( - int index, net.osmand.binary.OsmandOdb.StreetIndex.Builder builderForValue) { - if (streetsBuilder_ == null) { - ensureStreetsIsMutable(); - streets_.set(index, builderForValue.build()); - onChanged(); - } else { - streetsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setStreets(int index, net.osmand.binary.OsmandOdb.StreetIndex.Builder builderForValue) { + result.streets_.set(index, builderForValue.build()); return this; } public Builder addStreets(net.osmand.binary.OsmandOdb.StreetIndex value) { - if (streetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStreetsIsMutable(); - streets_.add(value); - onChanged(); - } else { - streetsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.streets_.isEmpty()) { + result.streets_ = new java.util.ArrayList(); + } + result.streets_.add(value); return this; } - public Builder addStreets( - int index, net.osmand.binary.OsmandOdb.StreetIndex value) { - if (streetsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureStreetsIsMutable(); - streets_.add(index, value); - onChanged(); - } else { - streetsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addStreets( - net.osmand.binary.OsmandOdb.StreetIndex.Builder builderForValue) { - if (streetsBuilder_ == null) { - ensureStreetsIsMutable(); - streets_.add(builderForValue.build()); - onChanged(); - } else { - streetsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addStreets( - int index, net.osmand.binary.OsmandOdb.StreetIndex.Builder builderForValue) { - if (streetsBuilder_ == null) { - ensureStreetsIsMutable(); - streets_.add(index, builderForValue.build()); - onChanged(); - } else { - streetsBuilder_.addMessage(index, builderForValue.build()); + public Builder addStreets(net.osmand.binary.OsmandOdb.StreetIndex.Builder builderForValue) { + if (result.streets_.isEmpty()) { + result.streets_ = new java.util.ArrayList(); } + result.streets_.add(builderForValue.build()); return this; } public Builder addAllStreets( java.lang.Iterable values) { - if (streetsBuilder_ == null) { - ensureStreetsIsMutable(); - super.addAll(values, streets_); - onChanged(); - } else { - streetsBuilder_.addAllMessages(values); + if (result.streets_.isEmpty()) { + result.streets_ = new java.util.ArrayList(); } + super.addAll(values, result.streets_); return this; } public Builder clearStreets() { - if (streetsBuilder_ == null) { - streets_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - streetsBuilder_.clear(); - } + result.streets_ = java.util.Collections.emptyList(); return this; } - public Builder removeStreets(int index) { - if (streetsBuilder_ == null) { - ensureStreetsIsMutable(); - streets_.remove(index); - onChanged(); - } else { - streetsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.StreetIndex.Builder getStreetsBuilder( - int index) { - return getStreetsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.StreetIndexOrBuilder getStreetsOrBuilder( - int index) { - if (streetsBuilder_ == null) { - return streets_.get(index); } else { - return streetsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getStreetsOrBuilderList() { - if (streetsBuilder_ != null) { - return streetsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(streets_); - } - } - public net.osmand.binary.OsmandOdb.StreetIndex.Builder addStreetsBuilder() { - return getStreetsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.StreetIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.StreetIndex.Builder addStreetsBuilder( - int index) { - return getStreetsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.StreetIndex.getDefaultInstance()); - } - public java.util.List - getStreetsBuilderList() { - return getStreetsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.StreetIndex, net.osmand.binary.OsmandOdb.StreetIndex.Builder, net.osmand.binary.OsmandOdb.StreetIndexOrBuilder> - getStreetsFieldBuilder() { - if (streetsBuilder_ == null) { - streetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.StreetIndex, net.osmand.binary.OsmandOdb.StreetIndex.Builder, net.osmand.binary.OsmandOdb.StreetIndexOrBuilder>( - streets_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - streets_ = null; - } - return streetsBuilder_; - } // @@protoc_insertion_point(builder_scope:CityBlockIndex) } static { defaultInstance = new CityBlockIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:CityBlockIndex) } - public interface StreetIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string name = 1; - boolean hasName(); - String getName(); - - // optional string name_en = 2; - boolean hasNameEn(); - String getNameEn(); - - // required sint32 x = 3; - boolean hasX(); - int getX(); - - // required sint32 y = 4; - boolean hasY(); - int getY(); - - // optional uint64 id = 6; - boolean hasId(); - long getId(); - - // repeated .BuildingIndex buildings = 12; - java.util.List - getBuildingsList(); - net.osmand.binary.OsmandOdb.BuildingIndex getBuildings(int index); - int getBuildingsCount(); - java.util.List - getBuildingsOrBuilderList(); - net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder getBuildingsOrBuilder( - int index); - - // repeated .StreetIntersection intersections = 5; - java.util.List - getIntersectionsList(); - net.osmand.binary.OsmandOdb.StreetIntersection getIntersections(int index); - int getIntersectionsCount(); - java.util.List - getIntersectionsOrBuilderList(); - net.osmand.binary.OsmandOdb.StreetIntersectionOrBuilder getIntersectionsOrBuilder( - int index); - } public static final class StreetIndex extends - com.google.protobuf.GeneratedMessage - implements StreetIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use StreetIndex.newBuilder() to construct. - private StreetIndex(Builder builder) { - super(builder); + private StreetIndex() { + initFields(); } private StreetIndex(boolean noInit) {} @@ -15620,7 +9416,8 @@ public final class OsmandOdb { return defaultInstance; } - public StreetIndex getDefaultInstanceForType() { + @Override + public StreetIndex getDefaultInstanceForType() { return defaultInstance; } @@ -15629,263 +9426,155 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_StreetIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_StreetIndex_fieldAccessorTable; } - private int bitField0_; // required string name = 1; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // optional string name_en = 2; public static final int NAME_EN_FIELD_NUMBER = 2; - private java.lang.Object nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nameEn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameEnBytes() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nameEn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNameEn; + private java.lang.String nameEn_ = ""; + public boolean hasNameEn() { return hasNameEn; } + public java.lang.String getNameEn() { return nameEn_; } // required sint32 x = 3; public static final int X_FIELD_NUMBER = 3; - private int x_; - public boolean hasX() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getX() { - return x_; - } + private boolean hasX; + private int x_ = 0; + public boolean hasX() { return hasX; } + public int getX() { return x_; } // required sint32 y = 4; public static final int Y_FIELD_NUMBER = 4; - private int y_; - public boolean hasY() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getY() { - return y_; - } + private boolean hasY; + private int y_ = 0; + public boolean hasY() { return hasY; } + public int getY() { return y_; } // optional uint64 id = 6; public static final int ID_FIELD_NUMBER = 6; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public long getId() { - return id_; - } + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } // repeated .BuildingIndex buildings = 12; public static final int BUILDINGS_FIELD_NUMBER = 12; - private java.util.List buildings_; + private java.util.List buildings_ = + java.util.Collections.emptyList(); public java.util.List getBuildingsList() { return buildings_; } - public java.util.List - getBuildingsOrBuilderList() { - return buildings_; - } - public int getBuildingsCount() { - return buildings_.size(); - } + public int getBuildingsCount() { return buildings_.size(); } public net.osmand.binary.OsmandOdb.BuildingIndex getBuildings(int index) { return buildings_.get(index); } - public net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder getBuildingsOrBuilder( - int index) { - return buildings_.get(index); - } // repeated .StreetIntersection intersections = 5; public static final int INTERSECTIONS_FIELD_NUMBER = 5; - private java.util.List intersections_; + private java.util.List intersections_ = + java.util.Collections.emptyList(); public java.util.List getIntersectionsList() { return intersections_; } - public java.util.List - getIntersectionsOrBuilderList() { - return intersections_; - } - public int getIntersectionsCount() { - return intersections_.size(); - } + public int getIntersectionsCount() { return intersections_.size(); } public net.osmand.binary.OsmandOdb.StreetIntersection getIntersections(int index) { return intersections_.get(index); } - public net.osmand.binary.OsmandOdb.StreetIntersectionOrBuilder getIntersectionsOrBuilder( - int index) { - return intersections_.get(index); - } private void initFields() { - name_ = ""; - nameEn_ = ""; - x_ = 0; - y_ = 0; - id_ = 0L; - buildings_ = java.util.Collections.emptyList(); - intersections_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasName()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasName) return false; + if (!hasX) return false; + if (!hasY) return false; + for (net.osmand.binary.OsmandOdb.BuildingIndex element : getBuildingsList()) { + if (!element.isInitialized()) return false; } - if (!hasX()) { - memoizedIsInitialized = 0; - return false; + for (net.osmand.binary.OsmandOdb.StreetIntersection element : getIntersectionsList()) { + if (!element.isInitialized()) return false; } - if (!hasY()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getBuildingsCount(); i++) { - if (!getBuildings(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getIntersectionsCount(); i++) { - if (!getIntersections(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + if (hasName()) { + output.writeString(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getNameEnBytes()); + if (hasNameEn()) { + output.writeString(2, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeSInt32(3, x_); + if (hasX()) { + output.writeSInt32(3, getX()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeSInt32(4, y_); + if (hasY()) { + output.writeSInt32(4, getY()); } - for (int i = 0; i < intersections_.size(); i++) { - output.writeMessage(5, intersections_.get(i)); + for (net.osmand.binary.OsmandOdb.StreetIntersection element : getIntersectionsList()) { + output.writeMessage(5, element); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt64(6, id_); + if (hasId()) { + output.writeUInt64(6, getId()); } - for (int i = 0; i < buildings_.size(); i++) { - output.writeMessage(12, buildings_.get(i)); + for (net.osmand.binary.OsmandOdb.BuildingIndex element : getBuildingsList()) { + output.writeMessage(12, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeStringSize(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameEnBytes()); + .computeStringSize(2, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasX()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(3, x_); + .computeSInt32Size(3, getX()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasY()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(4, y_); + .computeSInt32Size(4, getY()); } - for (int i = 0; i < intersections_.size(); i++) { + for (net.osmand.binary.OsmandOdb.StreetIntersection element : getIntersectionsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, intersections_.get(i)); + .computeMessageSize(5, element); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(6, id_); + .computeUInt64Size(6, getId()); } - for (int i = 0; i < buildings_.size(); i++) { + for (net.osmand.binary.OsmandOdb.BuildingIndex element : getBuildingsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(12, buildings_.get(i)); + .computeMessageSize(12, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.StreetIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -15954,156 +9643,100 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.StreetIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.StreetIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_StreetIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_StreetIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.StreetIndex result; // Construct using net.osmand.binary.OsmandOdb.StreetIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBuildingsFieldBuilder(); - getIntersectionsFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.StreetIndex(); + return builder; } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - nameEn_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - x_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - y_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000010); - if (buildingsBuilder_ == null) { - buildings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - buildingsBuilder_.clear(); - } - if (intersectionsBuilder_ == null) { - intersections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - intersectionsBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.StreetIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.StreetIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.StreetIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.StreetIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.StreetIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.StreetIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.StreetIndex build() { - net.osmand.binary.OsmandOdb.StreetIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.StreetIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.StreetIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.StreetIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.StreetIndex buildPartial() { - net.osmand.binary.OsmandOdb.StreetIndex result = new net.osmand.binary.OsmandOdb.StreetIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.StreetIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.buildings_ != java.util.Collections.EMPTY_LIST) { + result.buildings_ = + java.util.Collections.unmodifiableList(result.buildings_); } - result.nameEn_ = nameEn_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + if (result.intersections_ != java.util.Collections.EMPTY_LIST) { + result.intersections_ = + java.util.Collections.unmodifiableList(result.intersections_); } - result.x_ = x_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.y_ = y_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.id_ = id_; - if (buildingsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - buildings_ = java.util.Collections.unmodifiableList(buildings_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.buildings_ = buildings_; - } else { - result.buildings_ = buildingsBuilder_.build(); - } - if (intersectionsBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { - intersections_ = java.util.Collections.unmodifiableList(intersections_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.intersections_ = intersections_; - } else { - result.intersections_ = intersectionsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.StreetIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.StreetIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.StreetIndex)other); } else { @@ -16129,91 +9762,24 @@ public final class OsmandOdb { if (other.hasId()) { setId(other.getId()); } - if (buildingsBuilder_ == null) { - if (!other.buildings_.isEmpty()) { - if (buildings_.isEmpty()) { - buildings_ = other.buildings_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBuildingsIsMutable(); - buildings_.addAll(other.buildings_); - } - onChanged(); - } - } else { - if (!other.buildings_.isEmpty()) { - if (buildingsBuilder_.isEmpty()) { - buildingsBuilder_.dispose(); - buildingsBuilder_ = null; - buildings_ = other.buildings_; - bitField0_ = (bitField0_ & ~0x00000020); - buildingsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBuildingsFieldBuilder() : null; - } else { - buildingsBuilder_.addAllMessages(other.buildings_); - } + if (!other.buildings_.isEmpty()) { + if (result.buildings_.isEmpty()) { + result.buildings_ = new java.util.ArrayList(); } + result.buildings_.addAll(other.buildings_); } - if (intersectionsBuilder_ == null) { - if (!other.intersections_.isEmpty()) { - if (intersections_.isEmpty()) { - intersections_ = other.intersections_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensureIntersectionsIsMutable(); - intersections_.addAll(other.intersections_); - } - onChanged(); - } - } else { - if (!other.intersections_.isEmpty()) { - if (intersectionsBuilder_.isEmpty()) { - intersectionsBuilder_.dispose(); - intersectionsBuilder_ = null; - intersections_ = other.intersections_; - bitField0_ = (bitField0_ & ~0x00000040); - intersectionsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getIntersectionsFieldBuilder() : null; - } else { - intersectionsBuilder_.addAllMessages(other.intersections_); - } + if (!other.intersections_.isEmpty()) { + if (result.intersections_.isEmpty()) { + result.intersections_ = new java.util.ArrayList(); } + result.intersections_.addAll(other.intersections_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasName()) { - - return false; - } - if (!hasX()) { - - return false; - } - if (!hasY()) { - - return false; - } - for (int i = 0; i < getBuildingsCount(); i++) { - if (!getBuildings(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getIntersectionsCount(); i++) { - if (!getIntersections(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -16225,35 +9791,29 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + setName(input.readString()); break; } case 18: { - bitField0_ |= 0x00000002; - nameEn_ = input.readBytes(); + setNameEn(input.readString()); break; } case 24: { - bitField0_ |= 0x00000004; - x_ = input.readSInt32(); + setX(input.readSInt32()); break; } case 32: { - bitField0_ |= 0x00000008; - y_ = input.readSInt32(); + setY(input.readSInt32()); break; } case 42: { @@ -16263,8 +9823,7 @@ public final class OsmandOdb { break; } case 48: { - bitField0_ |= 0x00000010; - id_ = input.readUInt64(); + setId(input.readUInt64()); break; } case 98: { @@ -16277,551 +9836,222 @@ public final class OsmandOdb { } } - private int bitField0_; // required string name = 1; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - } // optional string name_en = 2; - private java.lang.Object nameEn_ = ""; public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasNameEn(); } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nameEn_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNameEn() { + return result.getNameEn(); } - public Builder setNameEn(String value) { + public Builder setNameEn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000002); - nameEn_ = getDefaultInstance().getNameEn(); - onChanged(); + result.hasNameEn = false; + result.nameEn_ = getDefaultInstance().getNameEn(); return this; } - void setNameEn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); - } // required sint32 x = 3; - private int x_ ; public boolean hasX() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasX(); } public int getX() { - return x_; + return result.getX(); } public Builder setX(int value) { - bitField0_ |= 0x00000004; - x_ = value; - onChanged(); + result.hasX = true; + result.x_ = value; return this; } public Builder clearX() { - bitField0_ = (bitField0_ & ~0x00000004); - x_ = 0; - onChanged(); + result.hasX = false; + result.x_ = 0; return this; } // required sint32 y = 4; - private int y_ ; public boolean hasY() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasY(); } public int getY() { - return y_; + return result.getY(); } public Builder setY(int value) { - bitField0_ |= 0x00000008; - y_ = value; - onChanged(); + result.hasY = true; + result.y_ = value; return this; } public Builder clearY() { - bitField0_ = (bitField0_ & ~0x00000008); - y_ = 0; - onChanged(); + result.hasY = false; + result.y_ = 0; return this; } // optional uint64 id = 6; - private long id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasId(); } public long getId() { - return id_; + return result.getId(); } public Builder setId(long value) { - bitField0_ |= 0x00000010; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000010); - id_ = 0L; - onChanged(); + result.hasId = false; + result.id_ = 0L; return this; } // repeated .BuildingIndex buildings = 12; - private java.util.List buildings_ = - java.util.Collections.emptyList(); - private void ensureBuildingsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - buildings_ = new java.util.ArrayList(buildings_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.BuildingIndex, net.osmand.binary.OsmandOdb.BuildingIndex.Builder, net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder> buildingsBuilder_; - public java.util.List getBuildingsList() { - if (buildingsBuilder_ == null) { - return java.util.Collections.unmodifiableList(buildings_); - } else { - return buildingsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.buildings_); } public int getBuildingsCount() { - if (buildingsBuilder_ == null) { - return buildings_.size(); - } else { - return buildingsBuilder_.getCount(); - } + return result.getBuildingsCount(); } public net.osmand.binary.OsmandOdb.BuildingIndex getBuildings(int index) { - if (buildingsBuilder_ == null) { - return buildings_.get(index); - } else { - return buildingsBuilder_.getMessage(index); - } + return result.getBuildings(index); } - public Builder setBuildings( - int index, net.osmand.binary.OsmandOdb.BuildingIndex value) { - if (buildingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuildingsIsMutable(); - buildings_.set(index, value); - onChanged(); - } else { - buildingsBuilder_.setMessage(index, value); + public Builder setBuildings(int index, net.osmand.binary.OsmandOdb.BuildingIndex value) { + if (value == null) { + throw new NullPointerException(); } + result.buildings_.set(index, value); return this; } - public Builder setBuildings( - int index, net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - buildings_.set(index, builderForValue.build()); - onChanged(); - } else { - buildingsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBuildings(int index, net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { + result.buildings_.set(index, builderForValue.build()); return this; } public Builder addBuildings(net.osmand.binary.OsmandOdb.BuildingIndex value) { - if (buildingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuildingsIsMutable(); - buildings_.add(value); - onChanged(); - } else { - buildingsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.buildings_.isEmpty()) { + result.buildings_ = new java.util.ArrayList(); + } + result.buildings_.add(value); return this; } - public Builder addBuildings( - int index, net.osmand.binary.OsmandOdb.BuildingIndex value) { - if (buildingsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBuildingsIsMutable(); - buildings_.add(index, value); - onChanged(); - } else { - buildingsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBuildings( - net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - buildings_.add(builderForValue.build()); - onChanged(); - } else { - buildingsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBuildings( - int index, net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - buildings_.add(index, builderForValue.build()); - onChanged(); - } else { - buildingsBuilder_.addMessage(index, builderForValue.build()); + public Builder addBuildings(net.osmand.binary.OsmandOdb.BuildingIndex.Builder builderForValue) { + if (result.buildings_.isEmpty()) { + result.buildings_ = new java.util.ArrayList(); } + result.buildings_.add(builderForValue.build()); return this; } public Builder addAllBuildings( java.lang.Iterable values) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - super.addAll(values, buildings_); - onChanged(); - } else { - buildingsBuilder_.addAllMessages(values); + if (result.buildings_.isEmpty()) { + result.buildings_ = new java.util.ArrayList(); } + super.addAll(values, result.buildings_); return this; } public Builder clearBuildings() { - if (buildingsBuilder_ == null) { - buildings_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - buildingsBuilder_.clear(); - } + result.buildings_ = java.util.Collections.emptyList(); return this; } - public Builder removeBuildings(int index) { - if (buildingsBuilder_ == null) { - ensureBuildingsIsMutable(); - buildings_.remove(index); - onChanged(); - } else { - buildingsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.BuildingIndex.Builder getBuildingsBuilder( - int index) { - return getBuildingsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder getBuildingsOrBuilder( - int index) { - if (buildingsBuilder_ == null) { - return buildings_.get(index); } else { - return buildingsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBuildingsOrBuilderList() { - if (buildingsBuilder_ != null) { - return buildingsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(buildings_); - } - } - public net.osmand.binary.OsmandOdb.BuildingIndex.Builder addBuildingsBuilder() { - return getBuildingsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.BuildingIndex.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.BuildingIndex.Builder addBuildingsBuilder( - int index) { - return getBuildingsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.BuildingIndex.getDefaultInstance()); - } - public java.util.List - getBuildingsBuilderList() { - return getBuildingsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.BuildingIndex, net.osmand.binary.OsmandOdb.BuildingIndex.Builder, net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder> - getBuildingsFieldBuilder() { - if (buildingsBuilder_ == null) { - buildingsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.BuildingIndex, net.osmand.binary.OsmandOdb.BuildingIndex.Builder, net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder>( - buildings_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - buildings_ = null; - } - return buildingsBuilder_; - } // repeated .StreetIntersection intersections = 5; - private java.util.List intersections_ = - java.util.Collections.emptyList(); - private void ensureIntersectionsIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - intersections_ = new java.util.ArrayList(intersections_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.StreetIntersection, net.osmand.binary.OsmandOdb.StreetIntersection.Builder, net.osmand.binary.OsmandOdb.StreetIntersectionOrBuilder> intersectionsBuilder_; - public java.util.List getIntersectionsList() { - if (intersectionsBuilder_ == null) { - return java.util.Collections.unmodifiableList(intersections_); - } else { - return intersectionsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.intersections_); } public int getIntersectionsCount() { - if (intersectionsBuilder_ == null) { - return intersections_.size(); - } else { - return intersectionsBuilder_.getCount(); - } + return result.getIntersectionsCount(); } public net.osmand.binary.OsmandOdb.StreetIntersection getIntersections(int index) { - if (intersectionsBuilder_ == null) { - return intersections_.get(index); - } else { - return intersectionsBuilder_.getMessage(index); - } + return result.getIntersections(index); } - public Builder setIntersections( - int index, net.osmand.binary.OsmandOdb.StreetIntersection value) { - if (intersectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntersectionsIsMutable(); - intersections_.set(index, value); - onChanged(); - } else { - intersectionsBuilder_.setMessage(index, value); + public Builder setIntersections(int index, net.osmand.binary.OsmandOdb.StreetIntersection value) { + if (value == null) { + throw new NullPointerException(); } + result.intersections_.set(index, value); return this; } - public Builder setIntersections( - int index, net.osmand.binary.OsmandOdb.StreetIntersection.Builder builderForValue) { - if (intersectionsBuilder_ == null) { - ensureIntersectionsIsMutable(); - intersections_.set(index, builderForValue.build()); - onChanged(); - } else { - intersectionsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setIntersections(int index, net.osmand.binary.OsmandOdb.StreetIntersection.Builder builderForValue) { + result.intersections_.set(index, builderForValue.build()); return this; } public Builder addIntersections(net.osmand.binary.OsmandOdb.StreetIntersection value) { - if (intersectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntersectionsIsMutable(); - intersections_.add(value); - onChanged(); - } else { - intersectionsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.intersections_.isEmpty()) { + result.intersections_ = new java.util.ArrayList(); + } + result.intersections_.add(value); return this; } - public Builder addIntersections( - int index, net.osmand.binary.OsmandOdb.StreetIntersection value) { - if (intersectionsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureIntersectionsIsMutable(); - intersections_.add(index, value); - onChanged(); - } else { - intersectionsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addIntersections( - net.osmand.binary.OsmandOdb.StreetIntersection.Builder builderForValue) { - if (intersectionsBuilder_ == null) { - ensureIntersectionsIsMutable(); - intersections_.add(builderForValue.build()); - onChanged(); - } else { - intersectionsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addIntersections( - int index, net.osmand.binary.OsmandOdb.StreetIntersection.Builder builderForValue) { - if (intersectionsBuilder_ == null) { - ensureIntersectionsIsMutable(); - intersections_.add(index, builderForValue.build()); - onChanged(); - } else { - intersectionsBuilder_.addMessage(index, builderForValue.build()); + public Builder addIntersections(net.osmand.binary.OsmandOdb.StreetIntersection.Builder builderForValue) { + if (result.intersections_.isEmpty()) { + result.intersections_ = new java.util.ArrayList(); } + result.intersections_.add(builderForValue.build()); return this; } public Builder addAllIntersections( java.lang.Iterable values) { - if (intersectionsBuilder_ == null) { - ensureIntersectionsIsMutable(); - super.addAll(values, intersections_); - onChanged(); - } else { - intersectionsBuilder_.addAllMessages(values); + if (result.intersections_.isEmpty()) { + result.intersections_ = new java.util.ArrayList(); } + super.addAll(values, result.intersections_); return this; } public Builder clearIntersections() { - if (intersectionsBuilder_ == null) { - intersections_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - intersectionsBuilder_.clear(); - } + result.intersections_ = java.util.Collections.emptyList(); return this; } - public Builder removeIntersections(int index) { - if (intersectionsBuilder_ == null) { - ensureIntersectionsIsMutable(); - intersections_.remove(index); - onChanged(); - } else { - intersectionsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.StreetIntersection.Builder getIntersectionsBuilder( - int index) { - return getIntersectionsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.StreetIntersectionOrBuilder getIntersectionsOrBuilder( - int index) { - if (intersectionsBuilder_ == null) { - return intersections_.get(index); } else { - return intersectionsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getIntersectionsOrBuilderList() { - if (intersectionsBuilder_ != null) { - return intersectionsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(intersections_); - } - } - public net.osmand.binary.OsmandOdb.StreetIntersection.Builder addIntersectionsBuilder() { - return getIntersectionsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.StreetIntersection.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.StreetIntersection.Builder addIntersectionsBuilder( - int index) { - return getIntersectionsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.StreetIntersection.getDefaultInstance()); - } - public java.util.List - getIntersectionsBuilderList() { - return getIntersectionsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.StreetIntersection, net.osmand.binary.OsmandOdb.StreetIntersection.Builder, net.osmand.binary.OsmandOdb.StreetIntersectionOrBuilder> - getIntersectionsFieldBuilder() { - if (intersectionsBuilder_ == null) { - intersectionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.StreetIntersection, net.osmand.binary.OsmandOdb.StreetIntersection.Builder, net.osmand.binary.OsmandOdb.StreetIntersectionOrBuilder>( - intersections_, - ((bitField0_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - intersections_ = null; - } - return intersectionsBuilder_; - } // @@protoc_insertion_point(builder_scope:StreetIndex) } static { defaultInstance = new StreetIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:StreetIndex) } - public interface StreetIntersectionOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string name = 2; - boolean hasName(); - String getName(); - - // optional string name_en = 3; - boolean hasNameEn(); - String getNameEn(); - - // required sint32 intersectedX = 4; - boolean hasIntersectedX(); - int getIntersectedX(); - - // required sint32 intersectedY = 5; - boolean hasIntersectedY(); - int getIntersectedY(); - } public static final class StreetIntersection extends - com.google.protobuf.GeneratedMessage - implements StreetIntersectionOrBuilder { + com.google.protobuf.GeneratedMessage { // Use StreetIntersection.newBuilder() to construct. - private StreetIntersection(Builder builder) { - super(builder); + private StreetIntersection() { + initFields(); } private StreetIntersection(boolean noInit) {} @@ -16830,7 +10060,8 @@ public final class OsmandOdb { return defaultInstance; } - public StreetIntersection getDefaultInstanceForType() { + @Override + public StreetIntersection getDefaultInstanceForType() { return defaultInstance; } @@ -16839,175 +10070,97 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_StreetIntersection_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_StreetIntersection_fieldAccessorTable; } - private int bitField0_; // required string name = 2; public static final int NAME_FIELD_NUMBER = 2; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // optional string name_en = 3; public static final int NAME_EN_FIELD_NUMBER = 3; - private java.lang.Object nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nameEn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameEnBytes() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nameEn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNameEn; + private java.lang.String nameEn_ = ""; + public boolean hasNameEn() { return hasNameEn; } + public java.lang.String getNameEn() { return nameEn_; } // required sint32 intersectedX = 4; public static final int INTERSECTEDX_FIELD_NUMBER = 4; - private int intersectedX_; - public boolean hasIntersectedX() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getIntersectedX() { - return intersectedX_; - } + private boolean hasIntersectedX; + private int intersectedX_ = 0; + public boolean hasIntersectedX() { return hasIntersectedX; } + public int getIntersectedX() { return intersectedX_; } // required sint32 intersectedY = 5; public static final int INTERSECTEDY_FIELD_NUMBER = 5; - private int intersectedY_; - public boolean hasIntersectedY() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getIntersectedY() { - return intersectedY_; - } + private boolean hasIntersectedY; + private int intersectedY_ = 0; + public boolean hasIntersectedY() { return hasIntersectedY; } + public int getIntersectedY() { return intersectedY_; } private void initFields() { - name_ = ""; - nameEn_ = ""; - intersectedX_ = 0; - intersectedY_ = 0; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasIntersectedX()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasIntersectedY()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasName) return false; + if (!hasIntersectedX) return false; + if (!hasIntersectedY) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(2, getNameBytes()); + if (hasName()) { + output.writeString(2, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(3, getNameEnBytes()); + if (hasNameEn()) { + output.writeString(3, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeSInt32(4, intersectedX_); + if (hasIntersectedX()) { + output.writeSInt32(4, getIntersectedX()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeSInt32(5, intersectedY_); + if (hasIntersectedY()) { + output.writeSInt32(5, getIntersectedY()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameBytes()); + .computeStringSize(2, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getNameEnBytes()); + .computeStringSize(3, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasIntersectedX()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(4, intersectedX_); + .computeSInt32Size(4, getIntersectedX()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasIntersectedY()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(5, intersectedY_); + .computeSInt32Size(5, getIntersectedY()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.StreetIntersection parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -17076,118 +10229,92 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.StreetIntersection prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.StreetIntersectionOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_StreetIntersection_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_StreetIntersection_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.StreetIntersection result; // Construct using net.osmand.binary.OsmandOdb.StreetIntersection.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.StreetIntersection(); + return builder; } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - nameEn_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - intersectedX_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - intersectedY_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); + @Override + protected net.osmand.binary.OsmandOdb.StreetIntersection internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.StreetIntersection(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.StreetIntersection.getDescriptor(); } - public net.osmand.binary.OsmandOdb.StreetIntersection getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.StreetIntersection getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.StreetIntersection.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.StreetIntersection build() { - net.osmand.binary.OsmandOdb.StreetIntersection result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.StreetIntersection build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.StreetIntersection buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.StreetIntersection result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.StreetIntersection buildPartial() { - net.osmand.binary.OsmandOdb.StreetIntersection result = new net.osmand.binary.OsmandOdb.StreetIntersection(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.StreetIntersection buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.nameEn_ = nameEn_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.intersectedX_ = intersectedX_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.intersectedY_ = intersectedY_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.StreetIntersection returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.StreetIntersection) { return mergeFrom((net.osmand.binary.OsmandOdb.StreetIntersection)other); } else { @@ -17214,23 +10341,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasName()) { - - return false; - } - if (!hasIntersectedX()) { - - return false; - } - if (!hasIntersectedY()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -17242,154 +10354,111 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 18: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + setName(input.readString()); break; } case 26: { - bitField0_ |= 0x00000002; - nameEn_ = input.readBytes(); + setNameEn(input.readString()); break; } case 32: { - bitField0_ |= 0x00000004; - intersectedX_ = input.readSInt32(); + setIntersectedX(input.readSInt32()); break; } case 40: { - bitField0_ |= 0x00000008; - intersectedY_ = input.readSInt32(); + setIntersectedY(input.readSInt32()); break; } } } } - private int bitField0_; // required string name = 2; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - } // optional string name_en = 3; - private java.lang.Object nameEn_ = ""; public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasNameEn(); } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nameEn_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNameEn() { + return result.getNameEn(); } - public Builder setNameEn(String value) { + public Builder setNameEn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000002); - nameEn_ = getDefaultInstance().getNameEn(); - onChanged(); + result.hasNameEn = false; + result.nameEn_ = getDefaultInstance().getNameEn(); return this; } - void setNameEn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); - } // required sint32 intersectedX = 4; - private int intersectedX_ ; public boolean hasIntersectedX() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasIntersectedX(); } public int getIntersectedX() { - return intersectedX_; + return result.getIntersectedX(); } public Builder setIntersectedX(int value) { - bitField0_ |= 0x00000004; - intersectedX_ = value; - onChanged(); + result.hasIntersectedX = true; + result.intersectedX_ = value; return this; } public Builder clearIntersectedX() { - bitField0_ = (bitField0_ & ~0x00000004); - intersectedX_ = 0; - onChanged(); + result.hasIntersectedX = false; + result.intersectedX_ = 0; return this; } // required sint32 intersectedY = 5; - private int intersectedY_ ; public boolean hasIntersectedY() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasIntersectedY(); } public int getIntersectedY() { - return intersectedY_; + return result.getIntersectedY(); } public Builder setIntersectedY(int value) { - bitField0_ |= 0x00000008; - intersectedY_ = value; - onChanged(); + result.hasIntersectedY = true; + result.intersectedY_ = value; return this; } public Builder clearIntersectedY() { - bitField0_ = (bitField0_ & ~0x00000008); - intersectedY_ = 0; - onChanged(); + result.hasIntersectedY = false; + result.intersectedY_ = 0; return this; } @@ -17398,65 +10467,18 @@ public final class OsmandOdb { static { defaultInstance = new StreetIntersection(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:StreetIntersection) } - public interface BuildingIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string name = 1; - boolean hasName(); - String getName(); - - // optional string name_en = 2; - boolean hasNameEn(); - String getNameEn(); - - // optional string name2 = 3; - boolean hasName2(); - String getName2(); - - // optional string name_en2 = 4; - boolean hasNameEn2(); - String getNameEn2(); - - // optional sint32 interpolation = 5; - boolean hasInterpolation(); - int getInterpolation(); - - // required sint32 x = 7; - boolean hasX(); - int getX(); - - // required sint32 y = 8; - boolean hasY(); - int getY(); - - // optional sint32 x2 = 9; - boolean hasX2(); - int getX2(); - - // optional sint32 y2 = 10; - boolean hasY2(); - int getY2(); - - // optional uint64 id = 13; - boolean hasId(); - long getId(); - - // optional string postcode = 14; - boolean hasPostcode(); - String getPostcode(); - } public static final class BuildingIndex extends - com.google.protobuf.GeneratedMessage - implements BuildingIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use BuildingIndex.newBuilder() to construct. - private BuildingIndex(Builder builder) { - super(builder); + private BuildingIndex() { + initFields(); } private BuildingIndex(boolean noInit) {} @@ -17465,7 +10487,8 @@ public final class OsmandOdb { return defaultInstance; } - public BuildingIndex getDefaultInstanceForType() { + @Override + public BuildingIndex getDefaultInstanceForType() { return defaultInstance; } @@ -17474,367 +10497,195 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_BuildingIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_BuildingIndex_fieldAccessorTable; } - private int bitField0_; // required string name = 1; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // optional string name_en = 2; public static final int NAME_EN_FIELD_NUMBER = 2; - private java.lang.Object nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nameEn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameEnBytes() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nameEn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNameEn; + private java.lang.String nameEn_ = ""; + public boolean hasNameEn() { return hasNameEn; } + public java.lang.String getNameEn() { return nameEn_; } // optional string name2 = 3; public static final int NAME2_FIELD_NUMBER = 3; - private java.lang.Object name2_; - public boolean hasName2() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getName2() { - java.lang.Object ref = name2_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name2_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getName2Bytes() { - java.lang.Object ref = name2_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name2_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName2; + private java.lang.String name2_ = ""; + public boolean hasName2() { return hasName2; } + public java.lang.String getName2() { return name2_; } // optional string name_en2 = 4; public static final int NAME_EN2_FIELD_NUMBER = 4; - private java.lang.Object nameEn2_; - public boolean hasNameEn2() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getNameEn2() { - java.lang.Object ref = nameEn2_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nameEn2_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameEn2Bytes() { - java.lang.Object ref = nameEn2_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nameEn2_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNameEn2; + private java.lang.String nameEn2_ = ""; + public boolean hasNameEn2() { return hasNameEn2; } + public java.lang.String getNameEn2() { return nameEn2_; } // optional sint32 interpolation = 5; public static final int INTERPOLATION_FIELD_NUMBER = 5; - private int interpolation_; - public boolean hasInterpolation() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getInterpolation() { - return interpolation_; - } + private boolean hasInterpolation; + private int interpolation_ = 0; + public boolean hasInterpolation() { return hasInterpolation; } + public int getInterpolation() { return interpolation_; } // required sint32 x = 7; public static final int X_FIELD_NUMBER = 7; - private int x_; - public boolean hasX() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public int getX() { - return x_; - } + private boolean hasX; + private int x_ = 0; + public boolean hasX() { return hasX; } + public int getX() { return x_; } // required sint32 y = 8; public static final int Y_FIELD_NUMBER = 8; - private int y_; - public boolean hasY() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public int getY() { - return y_; - } + private boolean hasY; + private int y_ = 0; + public boolean hasY() { return hasY; } + public int getY() { return y_; } // optional sint32 x2 = 9; public static final int X2_FIELD_NUMBER = 9; - private int x2_; - public boolean hasX2() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - public int getX2() { - return x2_; - } + private boolean hasX2; + private int x2_ = 0; + public boolean hasX2() { return hasX2; } + public int getX2() { return x2_; } // optional sint32 y2 = 10; public static final int Y2_FIELD_NUMBER = 10; - private int y2_; - public boolean hasY2() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - public int getY2() { - return y2_; - } + private boolean hasY2; + private int y2_ = 0; + public boolean hasY2() { return hasY2; } + public int getY2() { return y2_; } // optional uint64 id = 13; public static final int ID_FIELD_NUMBER = 13; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000200) == 0x00000200); - } - public long getId() { - return id_; - } + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } // optional string postcode = 14; public static final int POSTCODE_FIELD_NUMBER = 14; - private java.lang.Object postcode_; - public boolean hasPostcode() { - return ((bitField0_ & 0x00000400) == 0x00000400); - } - public String getPostcode() { - java.lang.Object ref = postcode_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - postcode_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getPostcodeBytes() { - java.lang.Object ref = postcode_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - postcode_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasPostcode; + private java.lang.String postcode_ = ""; + public boolean hasPostcode() { return hasPostcode; } + public java.lang.String getPostcode() { return postcode_; } private void initFields() { - name_ = ""; - nameEn_ = ""; - name2_ = ""; - nameEn2_ = ""; - interpolation_ = 0; - x_ = 0; - y_ = 0; - x2_ = 0; - y2_ = 0; - id_ = 0L; - postcode_ = ""; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasX()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasY()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasName) return false; + if (!hasX) return false; + if (!hasY) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + if (hasName()) { + output.writeString(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeBytes(2, getNameEnBytes()); + if (hasNameEn()) { + output.writeString(2, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(3, getName2Bytes()); + if (hasName2()) { + output.writeString(3, getName2()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(4, getNameEn2Bytes()); + if (hasNameEn2()) { + output.writeString(4, getNameEn2()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeSInt32(5, interpolation_); + if (hasInterpolation()) { + output.writeSInt32(5, getInterpolation()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeSInt32(7, x_); + if (hasX()) { + output.writeSInt32(7, getX()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeSInt32(8, y_); + if (hasY()) { + output.writeSInt32(8, getY()); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeSInt32(9, x2_); + if (hasX2()) { + output.writeSInt32(9, getX2()); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeSInt32(10, y2_); + if (hasY2()) { + output.writeSInt32(10, getY2()); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { - output.writeUInt64(13, id_); + if (hasId()) { + output.writeUInt64(13, getId()); } - if (((bitField0_ & 0x00000400) == 0x00000400)) { - output.writeBytes(14, getPostcodeBytes()); + if (hasPostcode()) { + output.writeString(14, getPostcode()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeStringSize(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(2, getNameEnBytes()); + .computeStringSize(2, getNameEn()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasName2()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(3, getName2Bytes()); + .computeStringSize(3, getName2()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasNameEn2()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(4, getNameEn2Bytes()); + .computeStringSize(4, getNameEn2()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasInterpolation()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(5, interpolation_); + .computeSInt32Size(5, getInterpolation()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (hasX()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(7, x_); + .computeSInt32Size(7, getX()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (hasY()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(8, y_); + .computeSInt32Size(8, getY()); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (hasX2()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(9, x2_); + .computeSInt32Size(9, getX2()); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (hasY2()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(10, y2_); + .computeSInt32Size(10, getY2()); } - if (((bitField0_ & 0x00000200) == 0x00000200)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(13, id_); + .computeUInt64Size(13, getId()); } - if (((bitField0_ & 0x00000400) == 0x00000400)) { + if (hasPostcode()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(14, getPostcodeBytes()); + .computeStringSize(14, getPostcode()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.BuildingIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -17903,160 +10754,92 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.BuildingIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.BuildingIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_BuildingIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_BuildingIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.BuildingIndex result; // Construct using net.osmand.binary.OsmandOdb.BuildingIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.BuildingIndex(); + return builder; } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - nameEn_ = ""; - bitField0_ = (bitField0_ & ~0x00000002); - name2_ = ""; - bitField0_ = (bitField0_ & ~0x00000004); - nameEn2_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - interpolation_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - x_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - y_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - x2_ = 0; - bitField0_ = (bitField0_ & ~0x00000080); - y2_ = 0; - bitField0_ = (bitField0_ & ~0x00000100); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000200); - postcode_ = ""; - bitField0_ = (bitField0_ & ~0x00000400); + @Override + protected net.osmand.binary.OsmandOdb.BuildingIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.BuildingIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.BuildingIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.BuildingIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.BuildingIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.BuildingIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.BuildingIndex build() { - net.osmand.binary.OsmandOdb.BuildingIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.BuildingIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.BuildingIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.BuildingIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.BuildingIndex buildPartial() { - net.osmand.binary.OsmandOdb.BuildingIndex result = new net.osmand.binary.OsmandOdb.BuildingIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.BuildingIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.nameEn_ = nameEn_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.name2_ = name2_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.nameEn2_ = nameEn2_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.interpolation_ = interpolation_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.x_ = x_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.y_ = y_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000080; - } - result.x2_ = x2_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000100; - } - result.y2_ = y2_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000200; - } - result.id_ = id_; - if (((from_bitField0_ & 0x00000400) == 0x00000400)) { - to_bitField0_ |= 0x00000400; - } - result.postcode_ = postcode_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.BuildingIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.BuildingIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.BuildingIndex)other); } else { @@ -18104,23 +10887,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasName()) { - - return false; - } - if (!hasX()) { - - return false; - } - if (!hasY()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18132,414 +10900,294 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + setName(input.readString()); break; } case 18: { - bitField0_ |= 0x00000002; - nameEn_ = input.readBytes(); + setNameEn(input.readString()); break; } case 26: { - bitField0_ |= 0x00000004; - name2_ = input.readBytes(); + setName2(input.readString()); break; } case 34: { - bitField0_ |= 0x00000008; - nameEn2_ = input.readBytes(); + setNameEn2(input.readString()); break; } case 40: { - bitField0_ |= 0x00000010; - interpolation_ = input.readSInt32(); + setInterpolation(input.readSInt32()); break; } case 56: { - bitField0_ |= 0x00000020; - x_ = input.readSInt32(); + setX(input.readSInt32()); break; } case 64: { - bitField0_ |= 0x00000040; - y_ = input.readSInt32(); + setY(input.readSInt32()); break; } case 72: { - bitField0_ |= 0x00000080; - x2_ = input.readSInt32(); + setX2(input.readSInt32()); break; } case 80: { - bitField0_ |= 0x00000100; - y2_ = input.readSInt32(); + setY2(input.readSInt32()); break; } case 104: { - bitField0_ |= 0x00000200; - id_ = input.readUInt64(); + setId(input.readUInt64()); break; } case 114: { - bitField0_ |= 0x00000400; - postcode_ = input.readBytes(); + setPostcode(input.readString()); break; } } } } - private int bitField0_; // required string name = 1; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - } // optional string name_en = 2; - private java.lang.Object nameEn_ = ""; public boolean hasNameEn() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasNameEn(); } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nameEn_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNameEn() { + return result.getNameEn(); } - public Builder setNameEn(String value) { + public Builder setNameEn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000002); - nameEn_ = getDefaultInstance().getNameEn(); - onChanged(); + result.hasNameEn = false; + result.nameEn_ = getDefaultInstance().getNameEn(); return this; } - void setNameEn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000002; - nameEn_ = value; - onChanged(); - } // optional string name2 = 3; - private java.lang.Object name2_ = ""; public boolean hasName2() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasName2(); } - public String getName2() { - java.lang.Object ref = name2_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name2_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName2() { + return result.getName2(); } - public Builder setName2(String value) { + public Builder setName2(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000004; - name2_ = value; - onChanged(); + result.hasName2 = true; + result.name2_ = value; return this; } public Builder clearName2() { - bitField0_ = (bitField0_ & ~0x00000004); - name2_ = getDefaultInstance().getName2(); - onChanged(); + result.hasName2 = false; + result.name2_ = getDefaultInstance().getName2(); return this; } - void setName2(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000004; - name2_ = value; - onChanged(); - } // optional string name_en2 = 4; - private java.lang.Object nameEn2_ = ""; public boolean hasNameEn2() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasNameEn2(); } - public String getNameEn2() { - java.lang.Object ref = nameEn2_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nameEn2_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNameEn2() { + return result.getNameEn2(); } - public Builder setNameEn2(String value) { + public Builder setNameEn2(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000008; - nameEn2_ = value; - onChanged(); + result.hasNameEn2 = true; + result.nameEn2_ = value; return this; } public Builder clearNameEn2() { - bitField0_ = (bitField0_ & ~0x00000008); - nameEn2_ = getDefaultInstance().getNameEn2(); - onChanged(); + result.hasNameEn2 = false; + result.nameEn2_ = getDefaultInstance().getNameEn2(); return this; } - void setNameEn2(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000008; - nameEn2_ = value; - onChanged(); - } // optional sint32 interpolation = 5; - private int interpolation_ ; public boolean hasInterpolation() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasInterpolation(); } public int getInterpolation() { - return interpolation_; + return result.getInterpolation(); } public Builder setInterpolation(int value) { - bitField0_ |= 0x00000010; - interpolation_ = value; - onChanged(); + result.hasInterpolation = true; + result.interpolation_ = value; return this; } public Builder clearInterpolation() { - bitField0_ = (bitField0_ & ~0x00000010); - interpolation_ = 0; - onChanged(); + result.hasInterpolation = false; + result.interpolation_ = 0; return this; } // required sint32 x = 7; - private int x_ ; public boolean hasX() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return result.hasX(); } public int getX() { - return x_; + return result.getX(); } public Builder setX(int value) { - bitField0_ |= 0x00000020; - x_ = value; - onChanged(); + result.hasX = true; + result.x_ = value; return this; } public Builder clearX() { - bitField0_ = (bitField0_ & ~0x00000020); - x_ = 0; - onChanged(); + result.hasX = false; + result.x_ = 0; return this; } // required sint32 y = 8; - private int y_ ; public boolean hasY() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return result.hasY(); } public int getY() { - return y_; + return result.getY(); } public Builder setY(int value) { - bitField0_ |= 0x00000040; - y_ = value; - onChanged(); + result.hasY = true; + result.y_ = value; return this; } public Builder clearY() { - bitField0_ = (bitField0_ & ~0x00000040); - y_ = 0; - onChanged(); + result.hasY = false; + result.y_ = 0; return this; } // optional sint32 x2 = 9; - private int x2_ ; public boolean hasX2() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return result.hasX2(); } public int getX2() { - return x2_; + return result.getX2(); } public Builder setX2(int value) { - bitField0_ |= 0x00000080; - x2_ = value; - onChanged(); + result.hasX2 = true; + result.x2_ = value; return this; } public Builder clearX2() { - bitField0_ = (bitField0_ & ~0x00000080); - x2_ = 0; - onChanged(); + result.hasX2 = false; + result.x2_ = 0; return this; } // optional sint32 y2 = 10; - private int y2_ ; public boolean hasY2() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return result.hasY2(); } public int getY2() { - return y2_; + return result.getY2(); } public Builder setY2(int value) { - bitField0_ |= 0x00000100; - y2_ = value; - onChanged(); + result.hasY2 = true; + result.y2_ = value; return this; } public Builder clearY2() { - bitField0_ = (bitField0_ & ~0x00000100); - y2_ = 0; - onChanged(); + result.hasY2 = false; + result.y2_ = 0; return this; } // optional uint64 id = 13; - private long id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000200) == 0x00000200); + return result.hasId(); } public long getId() { - return id_; + return result.getId(); } public Builder setId(long value) { - bitField0_ |= 0x00000200; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000200); - id_ = 0L; - onChanged(); + result.hasId = false; + result.id_ = 0L; return this; } // optional string postcode = 14; - private java.lang.Object postcode_ = ""; public boolean hasPostcode() { - return ((bitField0_ & 0x00000400) == 0x00000400); + return result.hasPostcode(); } - public String getPostcode() { - java.lang.Object ref = postcode_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - postcode_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getPostcode() { + return result.getPostcode(); } - public Builder setPostcode(String value) { + public Builder setPostcode(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000400; - postcode_ = value; - onChanged(); + result.hasPostcode = true; + result.postcode_ = value; return this; } public Builder clearPostcode() { - bitField0_ = (bitField0_ & ~0x00000400); - postcode_ = getDefaultInstance().getPostcode(); - onChanged(); + result.hasPostcode = false; + result.postcode_ = getDefaultInstance().getPostcode(); return this; } - void setPostcode(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000400; - postcode_ = value; - onChanged(); - } // @@protoc_insertion_point(builder_scope:BuildingIndex) } static { defaultInstance = new BuildingIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:BuildingIndex) } - public interface TransportRoutesOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .TransportRoute routes = 6; - java.util.List - getRoutesList(); - net.osmand.binary.OsmandOdb.TransportRoute getRoutes(int index); - int getRoutesCount(); - java.util.List - getRoutesOrBuilderList(); - net.osmand.binary.OsmandOdb.TransportRouteOrBuilder getRoutesOrBuilder( - int index); - } public static final class TransportRoutes extends - com.google.protobuf.GeneratedMessage - implements TransportRoutesOrBuilder { + com.google.protobuf.GeneratedMessage { // Use TransportRoutes.newBuilder() to construct. - private TransportRoutes(Builder builder) { - super(builder); + private TransportRoutes() { + initFields(); } private TransportRoutes(boolean noInit) {} @@ -18548,7 +11196,8 @@ public final class OsmandOdb { return defaultInstance; } - public TransportRoutes getDefaultInstanceForType() { + @Override + public TransportRoutes getDefaultInstanceForType() { return defaultInstance; } @@ -18557,81 +11206,60 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_TransportRoutes_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_TransportRoutes_fieldAccessorTable; } // repeated .TransportRoute routes = 6; public static final int ROUTES_FIELD_NUMBER = 6; - private java.util.List routes_; + private java.util.List routes_ = + java.util.Collections.emptyList(); public java.util.List getRoutesList() { return routes_; } - public java.util.List - getRoutesOrBuilderList() { - return routes_; - } - public int getRoutesCount() { - return routes_.size(); - } + public int getRoutesCount() { return routes_.size(); } public net.osmand.binary.OsmandOdb.TransportRoute getRoutes(int index) { return routes_.get(index); } - public net.osmand.binary.OsmandOdb.TransportRouteOrBuilder getRoutesOrBuilder( - int index) { - return routes_.get(index); - } private void initFields() { - routes_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - for (int i = 0; i < getRoutesCount(); i++) { - if (!getRoutes(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + for (net.osmand.binary.OsmandOdb.TransportRoute element : getRoutesList()) { + if (!element.isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < routes_.size(); i++) { - output.writeMessage(6, routes_.get(i)); + for (net.osmand.binary.OsmandOdb.TransportRoute element : getRoutesList()) { + output.writeMessage(6, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - for (int i = 0; i < routes_.size(); i++) { + for (net.osmand.binary.OsmandOdb.TransportRoute element : getRoutesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, routes_.get(i)); + .computeMessageSize(6, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.TransportRoutes parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -18700,108 +11328,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.TransportRoutes prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.TransportRoutesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_TransportRoutes_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_TransportRoutes_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.TransportRoutes result; // Construct using net.osmand.binary.OsmandOdb.TransportRoutes.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRoutesFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.TransportRoutes(); + return builder; } - public Builder clear() { - super.clear(); - if (routesBuilder_ == null) { - routes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - routesBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.TransportRoutes internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.TransportRoutes(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.TransportRoutes.getDescriptor(); } - public net.osmand.binary.OsmandOdb.TransportRoutes getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.TransportRoutes getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.TransportRoutes build() { - net.osmand.binary.OsmandOdb.TransportRoutes result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.TransportRoutes build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.TransportRoutes buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.TransportRoutes result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.TransportRoutes buildPartial() { - net.osmand.binary.OsmandOdb.TransportRoutes result = new net.osmand.binary.OsmandOdb.TransportRoutes(this); - int from_bitField0_ = bitField0_; - if (routesBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - routes_ = java.util.Collections.unmodifiableList(routes_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.routes_ = routes_; - } else { - result.routes_ = routesBuilder_.build(); + @Override + public net.osmand.binary.OsmandOdb.TransportRoutes buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - onBuilt(); - return result; + if (result.routes_ != java.util.Collections.EMPTY_LIST) { + result.routes_ = + java.util.Collections.unmodifiableList(result.routes_); + } + net.osmand.binary.OsmandOdb.TransportRoutes returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.TransportRoutes) { return mergeFrom((net.osmand.binary.OsmandOdb.TransportRoutes)other); } else { @@ -18812,47 +11428,18 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.TransportRoutes other) { if (other == net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance()) return this; - if (routesBuilder_ == null) { - if (!other.routes_.isEmpty()) { - if (routes_.isEmpty()) { - routes_ = other.routes_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureRoutesIsMutable(); - routes_.addAll(other.routes_); - } - onChanged(); - } - } else { - if (!other.routes_.isEmpty()) { - if (routesBuilder_.isEmpty()) { - routesBuilder_.dispose(); - routesBuilder_ = null; - routes_ = other.routes_; - bitField0_ = (bitField0_ & ~0x00000001); - routesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getRoutesFieldBuilder() : null; - } else { - routesBuilder_.addAllMessages(other.routes_); - } + if (!other.routes_.isEmpty()) { + if (result.routes_.isEmpty()) { + result.routes_ = new java.util.ArrayList(); } + result.routes_.addAll(other.routes_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - for (int i = 0; i < getRoutesCount(); i++) { - if (!getRoutes(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -18864,13 +11451,11 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; @@ -18885,262 +11470,75 @@ public final class OsmandOdb { } } - private int bitField0_; // repeated .TransportRoute routes = 6; - private java.util.List routes_ = - java.util.Collections.emptyList(); - private void ensureRoutesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - routes_ = new java.util.ArrayList(routes_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRoute, net.osmand.binary.OsmandOdb.TransportRoute.Builder, net.osmand.binary.OsmandOdb.TransportRouteOrBuilder> routesBuilder_; - public java.util.List getRoutesList() { - if (routesBuilder_ == null) { - return java.util.Collections.unmodifiableList(routes_); - } else { - return routesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.routes_); } public int getRoutesCount() { - if (routesBuilder_ == null) { - return routes_.size(); - } else { - return routesBuilder_.getCount(); - } + return result.getRoutesCount(); } public net.osmand.binary.OsmandOdb.TransportRoute getRoutes(int index) { - if (routesBuilder_ == null) { - return routes_.get(index); - } else { - return routesBuilder_.getMessage(index); - } + return result.getRoutes(index); } - public Builder setRoutes( - int index, net.osmand.binary.OsmandOdb.TransportRoute value) { - if (routesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRoutesIsMutable(); - routes_.set(index, value); - onChanged(); - } else { - routesBuilder_.setMessage(index, value); + public Builder setRoutes(int index, net.osmand.binary.OsmandOdb.TransportRoute value) { + if (value == null) { + throw new NullPointerException(); } + result.routes_.set(index, value); return this; } - public Builder setRoutes( - int index, net.osmand.binary.OsmandOdb.TransportRoute.Builder builderForValue) { - if (routesBuilder_ == null) { - ensureRoutesIsMutable(); - routes_.set(index, builderForValue.build()); - onChanged(); - } else { - routesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setRoutes(int index, net.osmand.binary.OsmandOdb.TransportRoute.Builder builderForValue) { + result.routes_.set(index, builderForValue.build()); return this; } public Builder addRoutes(net.osmand.binary.OsmandOdb.TransportRoute value) { - if (routesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRoutesIsMutable(); - routes_.add(value); - onChanged(); - } else { - routesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.routes_.isEmpty()) { + result.routes_ = new java.util.ArrayList(); + } + result.routes_.add(value); return this; } - public Builder addRoutes( - int index, net.osmand.binary.OsmandOdb.TransportRoute value) { - if (routesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureRoutesIsMutable(); - routes_.add(index, value); - onChanged(); - } else { - routesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addRoutes( - net.osmand.binary.OsmandOdb.TransportRoute.Builder builderForValue) { - if (routesBuilder_ == null) { - ensureRoutesIsMutable(); - routes_.add(builderForValue.build()); - onChanged(); - } else { - routesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addRoutes( - int index, net.osmand.binary.OsmandOdb.TransportRoute.Builder builderForValue) { - if (routesBuilder_ == null) { - ensureRoutesIsMutable(); - routes_.add(index, builderForValue.build()); - onChanged(); - } else { - routesBuilder_.addMessage(index, builderForValue.build()); + public Builder addRoutes(net.osmand.binary.OsmandOdb.TransportRoute.Builder builderForValue) { + if (result.routes_.isEmpty()) { + result.routes_ = new java.util.ArrayList(); } + result.routes_.add(builderForValue.build()); return this; } public Builder addAllRoutes( java.lang.Iterable values) { - if (routesBuilder_ == null) { - ensureRoutesIsMutable(); - super.addAll(values, routes_); - onChanged(); - } else { - routesBuilder_.addAllMessages(values); + if (result.routes_.isEmpty()) { + result.routes_ = new java.util.ArrayList(); } + super.addAll(values, result.routes_); return this; } public Builder clearRoutes() { - if (routesBuilder_ == null) { - routes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - routesBuilder_.clear(); - } + result.routes_ = java.util.Collections.emptyList(); return this; } - public Builder removeRoutes(int index) { - if (routesBuilder_ == null) { - ensureRoutesIsMutable(); - routes_.remove(index); - onChanged(); - } else { - routesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.TransportRoute.Builder getRoutesBuilder( - int index) { - return getRoutesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.TransportRouteOrBuilder getRoutesOrBuilder( - int index) { - if (routesBuilder_ == null) { - return routes_.get(index); } else { - return routesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getRoutesOrBuilderList() { - if (routesBuilder_ != null) { - return routesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(routes_); - } - } - public net.osmand.binary.OsmandOdb.TransportRoute.Builder addRoutesBuilder() { - return getRoutesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.TransportRoute.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.TransportRoute.Builder addRoutesBuilder( - int index) { - return getRoutesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.TransportRoute.getDefaultInstance()); - } - public java.util.List - getRoutesBuilderList() { - return getRoutesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRoute, net.osmand.binary.OsmandOdb.TransportRoute.Builder, net.osmand.binary.OsmandOdb.TransportRouteOrBuilder> - getRoutesFieldBuilder() { - if (routesBuilder_ == null) { - routesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRoute, net.osmand.binary.OsmandOdb.TransportRoute.Builder, net.osmand.binary.OsmandOdb.TransportRouteOrBuilder>( - routes_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - routes_ = null; - } - return routesBuilder_; - } // @@protoc_insertion_point(builder_scope:TransportRoutes) } static { defaultInstance = new TransportRoutes(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TransportRoutes) } - public interface TransportRouteOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required uint64 id = 1; - boolean hasId(); - long getId(); - - // optional uint32 type = 3; - boolean hasType(); - int getType(); - - // optional uint32 operator = 4; - boolean hasOperator(); - int getOperator(); - - // optional string ref = 5; - boolean hasRef(); - String getRef(); - - // optional uint32 name = 6; - boolean hasName(); - int getName(); - - // optional uint32 name_en = 7; - boolean hasNameEn(); - int getNameEn(); - - // optional uint32 distance = 8; - boolean hasDistance(); - int getDistance(); - - // repeated .TransportRouteStop directStops = 15; - java.util.List - getDirectStopsList(); - net.osmand.binary.OsmandOdb.TransportRouteStop getDirectStops(int index); - int getDirectStopsCount(); - java.util.List - getDirectStopsOrBuilderList(); - net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder getDirectStopsOrBuilder( - int index); - - // repeated .TransportRouteStop reverseStops = 16; - java.util.List - getReverseStopsList(); - net.osmand.binary.OsmandOdb.TransportRouteStop getReverseStops(int index); - int getReverseStopsCount(); - java.util.List - getReverseStopsOrBuilderList(); - net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder getReverseStopsOrBuilder( - int index); - } public static final class TransportRoute extends - com.google.protobuf.GeneratedMessage - implements TransportRouteOrBuilder { + com.google.protobuf.GeneratedMessage { // Use TransportRoute.newBuilder() to construct. - private TransportRoute(Builder builder) { - super(builder); + private TransportRoute() { + initFields(); } private TransportRoute(boolean noInit) {} @@ -19149,7 +11547,8 @@ public final class OsmandOdb { return defaultInstance; } - public TransportRoute getDefaultInstanceForType() { + @Override + public TransportRoute getDefaultInstanceForType() { return defaultInstance; } @@ -19158,269 +11557,181 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_TransportRoute_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_TransportRoute_fieldAccessorTable; } - private int bitField0_; // required uint64 id = 1; public static final int ID_FIELD_NUMBER = 1; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public long getId() { - return id_; - } + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } // optional uint32 type = 3; public static final int TYPE_FIELD_NUMBER = 3; - private int type_; - public boolean hasType() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getType() { - return type_; - } + private boolean hasType; + private int type_ = 0; + public boolean hasType() { return hasType; } + public int getType() { return type_; } // optional uint32 operator = 4; public static final int OPERATOR_FIELD_NUMBER = 4; - private int operator_; - public boolean hasOperator() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getOperator() { - return operator_; - } + private boolean hasOperator; + private int operator_ = 0; + public boolean hasOperator() { return hasOperator; } + public int getOperator() { return operator_; } // optional string ref = 5; public static final int REF_FIELD_NUMBER = 5; - private java.lang.Object ref_; - public boolean hasRef() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getRef() { - java.lang.Object ref = ref_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - ref_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getRefBytes() { - java.lang.Object ref = ref_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - ref_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasRef; + private java.lang.String ref_ = ""; + public boolean hasRef() { return hasRef; } + public java.lang.String getRef() { return ref_; } // optional uint32 name = 6; public static final int NAME_FIELD_NUMBER = 6; - private int name_; - public boolean hasName() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getName() { - return name_; - } + private boolean hasName; + private int name_ = 0; + public boolean hasName() { return hasName; } + public int getName() { return name_; } // optional uint32 name_en = 7; public static final int NAME_EN_FIELD_NUMBER = 7; - private int nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public int getNameEn() { - return nameEn_; - } + private boolean hasNameEn; + private int nameEn_ = 0; + public boolean hasNameEn() { return hasNameEn; } + public int getNameEn() { return nameEn_; } // optional uint32 distance = 8; public static final int DISTANCE_FIELD_NUMBER = 8; - private int distance_; - public boolean hasDistance() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public int getDistance() { - return distance_; - } + private boolean hasDistance; + private int distance_ = 0; + public boolean hasDistance() { return hasDistance; } + public int getDistance() { return distance_; } // repeated .TransportRouteStop directStops = 15; public static final int DIRECTSTOPS_FIELD_NUMBER = 15; - private java.util.List directStops_; + private java.util.List directStops_ = + java.util.Collections.emptyList(); public java.util.List getDirectStopsList() { return directStops_; } - public java.util.List - getDirectStopsOrBuilderList() { - return directStops_; - } - public int getDirectStopsCount() { - return directStops_.size(); - } + public int getDirectStopsCount() { return directStops_.size(); } public net.osmand.binary.OsmandOdb.TransportRouteStop getDirectStops(int index) { return directStops_.get(index); } - public net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder getDirectStopsOrBuilder( - int index) { - return directStops_.get(index); - } // repeated .TransportRouteStop reverseStops = 16; public static final int REVERSESTOPS_FIELD_NUMBER = 16; - private java.util.List reverseStops_; + private java.util.List reverseStops_ = + java.util.Collections.emptyList(); public java.util.List getReverseStopsList() { return reverseStops_; } - public java.util.List - getReverseStopsOrBuilderList() { - return reverseStops_; - } - public int getReverseStopsCount() { - return reverseStops_.size(); - } + public int getReverseStopsCount() { return reverseStops_.size(); } public net.osmand.binary.OsmandOdb.TransportRouteStop getReverseStops(int index) { return reverseStops_.get(index); } - public net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder getReverseStopsOrBuilder( - int index) { - return reverseStops_.get(index); - } private void initFields() { - id_ = 0L; - type_ = 0; - operator_ = 0; - ref_ = ""; - name_ = 0; - nameEn_ = 0; - distance_ = 0; - directStops_ = java.util.Collections.emptyList(); - reverseStops_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasId) return false; + for (net.osmand.binary.OsmandOdb.TransportRouteStop element : getDirectStopsList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getDirectStopsCount(); i++) { - if (!getDirectStops(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + for (net.osmand.binary.OsmandOdb.TransportRouteStop element : getReverseStopsList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getReverseStopsCount(); i++) { - if (!getReverseStops(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt64(1, id_); + if (hasId()) { + output.writeUInt64(1, getId()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(3, type_); + if (hasType()) { + output.writeUInt32(3, getType()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(4, operator_); + if (hasOperator()) { + output.writeUInt32(4, getOperator()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(5, getRefBytes()); + if (hasRef()) { + output.writeString(5, getRef()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(6, name_); + if (hasName()) { + output.writeUInt32(6, getName()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeUInt32(7, nameEn_); + if (hasNameEn()) { + output.writeUInt32(7, getNameEn()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeUInt32(8, distance_); + if (hasDistance()) { + output.writeUInt32(8, getDistance()); } - for (int i = 0; i < directStops_.size(); i++) { - output.writeMessage(15, directStops_.get(i)); + for (net.osmand.binary.OsmandOdb.TransportRouteStop element : getDirectStopsList()) { + output.writeMessage(15, element); } - for (int i = 0; i < reverseStops_.size(); i++) { - output.writeMessage(16, reverseStops_.get(i)); + for (net.osmand.binary.OsmandOdb.TransportRouteStop element : getReverseStopsList()) { + output.writeMessage(16, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(1, id_); + .computeUInt64Size(1, getId()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasType()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, type_); + .computeUInt32Size(3, getType()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasOperator()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, operator_); + .computeUInt32Size(4, getOperator()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasRef()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(5, getRefBytes()); + .computeStringSize(5, getRef()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, name_); + .computeUInt32Size(6, getName()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, nameEn_); + .computeUInt32Size(7, getNameEn()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (hasDistance()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(8, distance_); + .computeUInt32Size(8, getDistance()); } - for (int i = 0; i < directStops_.size(); i++) { + for (net.osmand.binary.OsmandOdb.TransportRouteStop element : getDirectStopsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(15, directStops_.get(i)); + .computeMessageSize(15, element); } - for (int i = 0; i < reverseStops_.size(); i++) { + for (net.osmand.binary.OsmandOdb.TransportRouteStop element : getReverseStopsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(16, reverseStops_.get(i)); + .computeMessageSize(16, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.TransportRoute parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -19489,168 +11800,100 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.TransportRoute prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.TransportRouteOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_TransportRoute_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_TransportRoute_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.TransportRoute result; // Construct using net.osmand.binary.OsmandOdb.TransportRoute.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDirectStopsFieldBuilder(); - getReverseStopsFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.TransportRoute(); + return builder; } - public Builder clear() { - super.clear(); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - type_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - operator_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - ref_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - name_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - nameEn_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); - distance_ = 0; - bitField0_ = (bitField0_ & ~0x00000040); - if (directStopsBuilder_ == null) { - directStops_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - } else { - directStopsBuilder_.clear(); - } - if (reverseStopsBuilder_ == null) { - reverseStops_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - } else { - reverseStopsBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.TransportRoute internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.TransportRoute(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.TransportRoute.getDescriptor(); } - public net.osmand.binary.OsmandOdb.TransportRoute getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.TransportRoute getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.TransportRoute.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.TransportRoute build() { - net.osmand.binary.OsmandOdb.TransportRoute result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.TransportRoute build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.TransportRoute buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.TransportRoute result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.TransportRoute buildPartial() { - net.osmand.binary.OsmandOdb.TransportRoute result = new net.osmand.binary.OsmandOdb.TransportRoute(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.TransportRoute buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.id_ = id_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.directStops_ != java.util.Collections.EMPTY_LIST) { + result.directStops_ = + java.util.Collections.unmodifiableList(result.directStops_); } - result.type_ = type_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + if (result.reverseStops_ != java.util.Collections.EMPTY_LIST) { + result.reverseStops_ = + java.util.Collections.unmodifiableList(result.reverseStops_); } - result.operator_ = operator_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.ref_ = ref_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000020; - } - result.nameEn_ = nameEn_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000040; - } - result.distance_ = distance_; - if (directStopsBuilder_ == null) { - if (((bitField0_ & 0x00000080) == 0x00000080)) { - directStops_ = java.util.Collections.unmodifiableList(directStops_); - bitField0_ = (bitField0_ & ~0x00000080); - } - result.directStops_ = directStops_; - } else { - result.directStops_ = directStopsBuilder_.build(); - } - if (reverseStopsBuilder_ == null) { - if (((bitField0_ & 0x00000100) == 0x00000100)) { - reverseStops_ = java.util.Collections.unmodifiableList(reverseStops_); - bitField0_ = (bitField0_ & ~0x00000100); - } - result.reverseStops_ = reverseStops_; - } else { - result.reverseStops_ = reverseStopsBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.TransportRoute returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.TransportRoute) { return mergeFrom((net.osmand.binary.OsmandOdb.TransportRoute)other); } else { @@ -19682,83 +11925,24 @@ public final class OsmandOdb { if (other.hasDistance()) { setDistance(other.getDistance()); } - if (directStopsBuilder_ == null) { - if (!other.directStops_.isEmpty()) { - if (directStops_.isEmpty()) { - directStops_ = other.directStops_; - bitField0_ = (bitField0_ & ~0x00000080); - } else { - ensureDirectStopsIsMutable(); - directStops_.addAll(other.directStops_); - } - onChanged(); - } - } else { - if (!other.directStops_.isEmpty()) { - if (directStopsBuilder_.isEmpty()) { - directStopsBuilder_.dispose(); - directStopsBuilder_ = null; - directStops_ = other.directStops_; - bitField0_ = (bitField0_ & ~0x00000080); - directStopsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDirectStopsFieldBuilder() : null; - } else { - directStopsBuilder_.addAllMessages(other.directStops_); - } + if (!other.directStops_.isEmpty()) { + if (result.directStops_.isEmpty()) { + result.directStops_ = new java.util.ArrayList(); } + result.directStops_.addAll(other.directStops_); } - if (reverseStopsBuilder_ == null) { - if (!other.reverseStops_.isEmpty()) { - if (reverseStops_.isEmpty()) { - reverseStops_ = other.reverseStops_; - bitField0_ = (bitField0_ & ~0x00000100); - } else { - ensureReverseStopsIsMutable(); - reverseStops_.addAll(other.reverseStops_); - } - onChanged(); - } - } else { - if (!other.reverseStops_.isEmpty()) { - if (reverseStopsBuilder_.isEmpty()) { - reverseStopsBuilder_.dispose(); - reverseStopsBuilder_ = null; - reverseStops_ = other.reverseStops_; - bitField0_ = (bitField0_ & ~0x00000100); - reverseStopsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getReverseStopsFieldBuilder() : null; - } else { - reverseStopsBuilder_.addAllMessages(other.reverseStops_); - } + if (!other.reverseStops_.isEmpty()) { + if (result.reverseStops_.isEmpty()) { + result.reverseStops_ = new java.util.ArrayList(); } + result.reverseStops_.addAll(other.reverseStops_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasId()) { - - return false; - } - for (int i = 0; i < getDirectStopsCount(); i++) { - if (!getDirectStops(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getReverseStopsCount(); i++) { - if (!getReverseStops(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -19770,50 +11954,41 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - id_ = input.readUInt64(); + setId(input.readUInt64()); break; } case 24: { - bitField0_ |= 0x00000002; - type_ = input.readUInt32(); + setType(input.readUInt32()); break; } case 32: { - bitField0_ |= 0x00000004; - operator_ = input.readUInt32(); + setOperator(input.readUInt32()); break; } case 42: { - bitField0_ |= 0x00000008; - ref_ = input.readBytes(); + setRef(input.readString()); break; } case 48: { - bitField0_ |= 0x00000010; - name_ = input.readUInt32(); + setName(input.readUInt32()); break; } case 56: { - bitField0_ |= 0x00000020; - nameEn_ = input.readUInt32(); + setNameEn(input.readUInt32()); break; } case 64: { - bitField0_ |= 0x00000040; - distance_ = input.readUInt32(); + setDistance(input.readUInt32()); break; } case 122: { @@ -19832,582 +12007,255 @@ public final class OsmandOdb { } } - private int bitField0_; // required uint64 id = 1; - private long id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasId(); } public long getId() { - return id_; + return result.getId(); } public Builder setId(long value) { - bitField0_ |= 0x00000001; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0L; - onChanged(); + result.hasId = false; + result.id_ = 0L; return this; } // optional uint32 type = 3; - private int type_ ; public boolean hasType() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasType(); } public int getType() { - return type_; + return result.getType(); } public Builder setType(int value) { - bitField0_ |= 0x00000002; - type_ = value; - onChanged(); + result.hasType = true; + result.type_ = value; return this; } public Builder clearType() { - bitField0_ = (bitField0_ & ~0x00000002); - type_ = 0; - onChanged(); + result.hasType = false; + result.type_ = 0; return this; } // optional uint32 operator = 4; - private int operator_ ; public boolean hasOperator() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasOperator(); } public int getOperator() { - return operator_; + return result.getOperator(); } public Builder setOperator(int value) { - bitField0_ |= 0x00000004; - operator_ = value; - onChanged(); + result.hasOperator = true; + result.operator_ = value; return this; } public Builder clearOperator() { - bitField0_ = (bitField0_ & ~0x00000004); - operator_ = 0; - onChanged(); + result.hasOperator = false; + result.operator_ = 0; return this; } // optional string ref = 5; - private java.lang.Object ref_ = ""; public boolean hasRef() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasRef(); } - public String getRef() { - java.lang.Object ref = ref_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - ref_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getRef() { + return result.getRef(); } - public Builder setRef(String value) { + public Builder setRef(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000008; - ref_ = value; - onChanged(); + result.hasRef = true; + result.ref_ = value; return this; } public Builder clearRef() { - bitField0_ = (bitField0_ & ~0x00000008); - ref_ = getDefaultInstance().getRef(); - onChanged(); + result.hasRef = false; + result.ref_ = getDefaultInstance().getRef(); return this; } - void setRef(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000008; - ref_ = value; - onChanged(); - } // optional uint32 name = 6; - private int name_ ; public boolean hasName() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasName(); } public int getName() { - return name_; + return result.getName(); } public Builder setName(int value) { - bitField0_ |= 0x00000010; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000010); - name_ = 0; - onChanged(); + result.hasName = false; + result.name_ = 0; return this; } // optional uint32 name_en = 7; - private int nameEn_ ; public boolean hasNameEn() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return result.hasNameEn(); } public int getNameEn() { - return nameEn_; + return result.getNameEn(); } public Builder setNameEn(int value) { - bitField0_ |= 0x00000020; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000020); - nameEn_ = 0; - onChanged(); + result.hasNameEn = false; + result.nameEn_ = 0; return this; } // optional uint32 distance = 8; - private int distance_ ; public boolean hasDistance() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return result.hasDistance(); } public int getDistance() { - return distance_; + return result.getDistance(); } public Builder setDistance(int value) { - bitField0_ |= 0x00000040; - distance_ = value; - onChanged(); + result.hasDistance = true; + result.distance_ = value; return this; } public Builder clearDistance() { - bitField0_ = (bitField0_ & ~0x00000040); - distance_ = 0; - onChanged(); + result.hasDistance = false; + result.distance_ = 0; return this; } // repeated .TransportRouteStop directStops = 15; - private java.util.List directStops_ = - java.util.Collections.emptyList(); - private void ensureDirectStopsIsMutable() { - if (!((bitField0_ & 0x00000080) == 0x00000080)) { - directStops_ = new java.util.ArrayList(directStops_); - bitField0_ |= 0x00000080; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRouteStop, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder, net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder> directStopsBuilder_; - public java.util.List getDirectStopsList() { - if (directStopsBuilder_ == null) { - return java.util.Collections.unmodifiableList(directStops_); - } else { - return directStopsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.directStops_); } public int getDirectStopsCount() { - if (directStopsBuilder_ == null) { - return directStops_.size(); - } else { - return directStopsBuilder_.getCount(); - } + return result.getDirectStopsCount(); } public net.osmand.binary.OsmandOdb.TransportRouteStop getDirectStops(int index) { - if (directStopsBuilder_ == null) { - return directStops_.get(index); - } else { - return directStopsBuilder_.getMessage(index); - } + return result.getDirectStops(index); } - public Builder setDirectStops( - int index, net.osmand.binary.OsmandOdb.TransportRouteStop value) { - if (directStopsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDirectStopsIsMutable(); - directStops_.set(index, value); - onChanged(); - } else { - directStopsBuilder_.setMessage(index, value); + public Builder setDirectStops(int index, net.osmand.binary.OsmandOdb.TransportRouteStop value) { + if (value == null) { + throw new NullPointerException(); } + result.directStops_.set(index, value); return this; } - public Builder setDirectStops( - int index, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { - if (directStopsBuilder_ == null) { - ensureDirectStopsIsMutable(); - directStops_.set(index, builderForValue.build()); - onChanged(); - } else { - directStopsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setDirectStops(int index, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { + result.directStops_.set(index, builderForValue.build()); return this; } public Builder addDirectStops(net.osmand.binary.OsmandOdb.TransportRouteStop value) { - if (directStopsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDirectStopsIsMutable(); - directStops_.add(value); - onChanged(); - } else { - directStopsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.directStops_.isEmpty()) { + result.directStops_ = new java.util.ArrayList(); + } + result.directStops_.add(value); return this; } - public Builder addDirectStops( - int index, net.osmand.binary.OsmandOdb.TransportRouteStop value) { - if (directStopsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDirectStopsIsMutable(); - directStops_.add(index, value); - onChanged(); - } else { - directStopsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addDirectStops( - net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { - if (directStopsBuilder_ == null) { - ensureDirectStopsIsMutable(); - directStops_.add(builderForValue.build()); - onChanged(); - } else { - directStopsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addDirectStops( - int index, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { - if (directStopsBuilder_ == null) { - ensureDirectStopsIsMutable(); - directStops_.add(index, builderForValue.build()); - onChanged(); - } else { - directStopsBuilder_.addMessage(index, builderForValue.build()); + public Builder addDirectStops(net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { + if (result.directStops_.isEmpty()) { + result.directStops_ = new java.util.ArrayList(); } + result.directStops_.add(builderForValue.build()); return this; } public Builder addAllDirectStops( java.lang.Iterable values) { - if (directStopsBuilder_ == null) { - ensureDirectStopsIsMutable(); - super.addAll(values, directStops_); - onChanged(); - } else { - directStopsBuilder_.addAllMessages(values); + if (result.directStops_.isEmpty()) { + result.directStops_ = new java.util.ArrayList(); } + super.addAll(values, result.directStops_); return this; } public Builder clearDirectStops() { - if (directStopsBuilder_ == null) { - directStops_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000080); - onChanged(); - } else { - directStopsBuilder_.clear(); - } + result.directStops_ = java.util.Collections.emptyList(); return this; } - public Builder removeDirectStops(int index) { - if (directStopsBuilder_ == null) { - ensureDirectStopsIsMutable(); - directStops_.remove(index); - onChanged(); - } else { - directStopsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.TransportRouteStop.Builder getDirectStopsBuilder( - int index) { - return getDirectStopsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder getDirectStopsOrBuilder( - int index) { - if (directStopsBuilder_ == null) { - return directStops_.get(index); } else { - return directStopsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getDirectStopsOrBuilderList() { - if (directStopsBuilder_ != null) { - return directStopsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(directStops_); - } - } - public net.osmand.binary.OsmandOdb.TransportRouteStop.Builder addDirectStopsBuilder() { - return getDirectStopsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.TransportRouteStop.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.TransportRouteStop.Builder addDirectStopsBuilder( - int index) { - return getDirectStopsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.TransportRouteStop.getDefaultInstance()); - } - public java.util.List - getDirectStopsBuilderList() { - return getDirectStopsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRouteStop, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder, net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder> - getDirectStopsFieldBuilder() { - if (directStopsBuilder_ == null) { - directStopsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRouteStop, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder, net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder>( - directStops_, - ((bitField0_ & 0x00000080) == 0x00000080), - getParentForChildren(), - isClean()); - directStops_ = null; - } - return directStopsBuilder_; - } // repeated .TransportRouteStop reverseStops = 16; - private java.util.List reverseStops_ = - java.util.Collections.emptyList(); - private void ensureReverseStopsIsMutable() { - if (!((bitField0_ & 0x00000100) == 0x00000100)) { - reverseStops_ = new java.util.ArrayList(reverseStops_); - bitField0_ |= 0x00000100; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRouteStop, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder, net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder> reverseStopsBuilder_; - public java.util.List getReverseStopsList() { - if (reverseStopsBuilder_ == null) { - return java.util.Collections.unmodifiableList(reverseStops_); - } else { - return reverseStopsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.reverseStops_); } public int getReverseStopsCount() { - if (reverseStopsBuilder_ == null) { - return reverseStops_.size(); - } else { - return reverseStopsBuilder_.getCount(); - } + return result.getReverseStopsCount(); } public net.osmand.binary.OsmandOdb.TransportRouteStop getReverseStops(int index) { - if (reverseStopsBuilder_ == null) { - return reverseStops_.get(index); - } else { - return reverseStopsBuilder_.getMessage(index); - } + return result.getReverseStops(index); } - public Builder setReverseStops( - int index, net.osmand.binary.OsmandOdb.TransportRouteStop value) { - if (reverseStopsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReverseStopsIsMutable(); - reverseStops_.set(index, value); - onChanged(); - } else { - reverseStopsBuilder_.setMessage(index, value); + public Builder setReverseStops(int index, net.osmand.binary.OsmandOdb.TransportRouteStop value) { + if (value == null) { + throw new NullPointerException(); } + result.reverseStops_.set(index, value); return this; } - public Builder setReverseStops( - int index, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { - if (reverseStopsBuilder_ == null) { - ensureReverseStopsIsMutable(); - reverseStops_.set(index, builderForValue.build()); - onChanged(); - } else { - reverseStopsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setReverseStops(int index, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { + result.reverseStops_.set(index, builderForValue.build()); return this; } public Builder addReverseStops(net.osmand.binary.OsmandOdb.TransportRouteStop value) { - if (reverseStopsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReverseStopsIsMutable(); - reverseStops_.add(value); - onChanged(); - } else { - reverseStopsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.reverseStops_.isEmpty()) { + result.reverseStops_ = new java.util.ArrayList(); + } + result.reverseStops_.add(value); return this; } - public Builder addReverseStops( - int index, net.osmand.binary.OsmandOdb.TransportRouteStop value) { - if (reverseStopsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureReverseStopsIsMutable(); - reverseStops_.add(index, value); - onChanged(); - } else { - reverseStopsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addReverseStops( - net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { - if (reverseStopsBuilder_ == null) { - ensureReverseStopsIsMutable(); - reverseStops_.add(builderForValue.build()); - onChanged(); - } else { - reverseStopsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addReverseStops( - int index, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { - if (reverseStopsBuilder_ == null) { - ensureReverseStopsIsMutable(); - reverseStops_.add(index, builderForValue.build()); - onChanged(); - } else { - reverseStopsBuilder_.addMessage(index, builderForValue.build()); + public Builder addReverseStops(net.osmand.binary.OsmandOdb.TransportRouteStop.Builder builderForValue) { + if (result.reverseStops_.isEmpty()) { + result.reverseStops_ = new java.util.ArrayList(); } + result.reverseStops_.add(builderForValue.build()); return this; } public Builder addAllReverseStops( java.lang.Iterable values) { - if (reverseStopsBuilder_ == null) { - ensureReverseStopsIsMutable(); - super.addAll(values, reverseStops_); - onChanged(); - } else { - reverseStopsBuilder_.addAllMessages(values); + if (result.reverseStops_.isEmpty()) { + result.reverseStops_ = new java.util.ArrayList(); } + super.addAll(values, result.reverseStops_); return this; } public Builder clearReverseStops() { - if (reverseStopsBuilder_ == null) { - reverseStops_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000100); - onChanged(); - } else { - reverseStopsBuilder_.clear(); - } + result.reverseStops_ = java.util.Collections.emptyList(); return this; } - public Builder removeReverseStops(int index) { - if (reverseStopsBuilder_ == null) { - ensureReverseStopsIsMutable(); - reverseStops_.remove(index); - onChanged(); - } else { - reverseStopsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.TransportRouteStop.Builder getReverseStopsBuilder( - int index) { - return getReverseStopsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder getReverseStopsOrBuilder( - int index) { - if (reverseStopsBuilder_ == null) { - return reverseStops_.get(index); } else { - return reverseStopsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getReverseStopsOrBuilderList() { - if (reverseStopsBuilder_ != null) { - return reverseStopsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(reverseStops_); - } - } - public net.osmand.binary.OsmandOdb.TransportRouteStop.Builder addReverseStopsBuilder() { - return getReverseStopsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.TransportRouteStop.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.TransportRouteStop.Builder addReverseStopsBuilder( - int index) { - return getReverseStopsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.TransportRouteStop.getDefaultInstance()); - } - public java.util.List - getReverseStopsBuilderList() { - return getReverseStopsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRouteStop, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder, net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder> - getReverseStopsFieldBuilder() { - if (reverseStopsBuilder_ == null) { - reverseStopsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRouteStop, net.osmand.binary.OsmandOdb.TransportRouteStop.Builder, net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder>( - reverseStops_, - ((bitField0_ & 0x00000100) == 0x00000100), - getParentForChildren(), - isClean()); - reverseStops_ = null; - } - return reverseStopsBuilder_; - } // @@protoc_insertion_point(builder_scope:TransportRoute) } static { defaultInstance = new TransportRoute(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TransportRoute) } - public interface TransportRouteStopOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required sint64 id = 1; - boolean hasId(); - long getId(); - - // required sint32 dx = 2; - boolean hasDx(); - int getDx(); - - // required sint32 dy = 3; - boolean hasDy(); - int getDy(); - - // required uint32 name = 6; - boolean hasName(); - int getName(); - - // optional uint32 name_en = 7; - boolean hasNameEn(); - int getNameEn(); - } public static final class TransportRouteStop extends - com.google.protobuf.GeneratedMessage - implements TransportRouteStopOrBuilder { + com.google.protobuf.GeneratedMessage { // Use TransportRouteStop.newBuilder() to construct. - private TransportRouteStop(Builder builder) { - super(builder); + private TransportRouteStop() { + initFields(); } private TransportRouteStop(boolean noInit) {} @@ -20416,7 +12264,8 @@ public final class OsmandOdb { return defaultInstance; } - public TransportRouteStop getDefaultInstanceForType() { + @Override + public TransportRouteStop getDefaultInstanceForType() { return defaultInstance; } @@ -20425,153 +12274,112 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_TransportRouteStop_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_TransportRouteStop_fieldAccessorTable; } - private int bitField0_; // required sint64 id = 1; public static final int ID_FIELD_NUMBER = 1; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public long getId() { - return id_; - } + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } // required sint32 dx = 2; public static final int DX_FIELD_NUMBER = 2; - private int dx_; - public boolean hasDx() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getDx() { - return dx_; - } + private boolean hasDx; + private int dx_ = 0; + public boolean hasDx() { return hasDx; } + public int getDx() { return dx_; } // required sint32 dy = 3; public static final int DY_FIELD_NUMBER = 3; - private int dy_; - public boolean hasDy() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getDy() { - return dy_; - } + private boolean hasDy; + private int dy_ = 0; + public boolean hasDy() { return hasDy; } + public int getDy() { return dy_; } // required uint32 name = 6; public static final int NAME_FIELD_NUMBER = 6; - private int name_; - public boolean hasName() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getName() { - return name_; - } + private boolean hasName; + private int name_ = 0; + public boolean hasName() { return hasName; } + public int getName() { return name_; } // optional uint32 name_en = 7; public static final int NAME_EN_FIELD_NUMBER = 7; - private int nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getNameEn() { - return nameEn_; - } + private boolean hasNameEn; + private int nameEn_ = 0; + public boolean hasNameEn() { return hasNameEn; } + public int getNameEn() { return nameEn_; } private void initFields() { - id_ = 0L; - dx_ = 0; - dy_ = 0; - name_ = 0; - nameEn_ = 0; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasDx()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasDy()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasId) return false; + if (!hasDx) return false; + if (!hasDy) return false; + if (!hasName) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeSInt64(1, id_); + if (hasId()) { + output.writeSInt64(1, getId()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeSInt32(2, dx_); + if (hasDx()) { + output.writeSInt32(2, getDx()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeSInt32(3, dy_); + if (hasDy()) { + output.writeSInt32(3, getDy()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt32(6, name_); + if (hasName()) { + output.writeUInt32(6, getName()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(7, nameEn_); + if (hasNameEn()) { + output.writeUInt32(7, getNameEn()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(1, id_); + .computeSInt64Size(1, getId()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasDx()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(2, dx_); + .computeSInt32Size(2, getDx()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasDy()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(3, dy_); + .computeSInt32Size(3, getDy()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, name_); + .computeUInt32Size(6, getName()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, nameEn_); + .computeUInt32Size(7, getNameEn()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.TransportRouteStop parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -20640,124 +12448,92 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.TransportRouteStop prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.TransportRouteStopOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_TransportRouteStop_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_TransportRouteStop_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.TransportRouteStop result; // Construct using net.osmand.binary.OsmandOdb.TransportRouteStop.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.TransportRouteStop(); + return builder; } - public Builder clear() { - super.clear(); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000001); - dx_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - dy_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - name_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - nameEn_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); + @Override + protected net.osmand.binary.OsmandOdb.TransportRouteStop internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.TransportRouteStop(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.TransportRouteStop.getDescriptor(); } - public net.osmand.binary.OsmandOdb.TransportRouteStop getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.TransportRouteStop getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.TransportRouteStop.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.TransportRouteStop build() { - net.osmand.binary.OsmandOdb.TransportRouteStop result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.TransportRouteStop build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.TransportRouteStop buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.TransportRouteStop result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.TransportRouteStop buildPartial() { - net.osmand.binary.OsmandOdb.TransportRouteStop result = new net.osmand.binary.OsmandOdb.TransportRouteStop(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.TransportRouteStop buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.id_ = id_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.dx_ = dx_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.dy_ = dy_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.nameEn_ = nameEn_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.TransportRouteStop returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.TransportRouteStop) { return mergeFrom((net.osmand.binary.OsmandOdb.TransportRouteStop)other); } else { @@ -20787,27 +12563,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasId()) { - - return false; - } - if (!hasDx()) { - - return false; - } - if (!hasDy()) { - - return false; - } - if (!hasName()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -20819,150 +12576,127 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - id_ = input.readSInt64(); + setId(input.readSInt64()); break; } case 16: { - bitField0_ |= 0x00000002; - dx_ = input.readSInt32(); + setDx(input.readSInt32()); break; } case 24: { - bitField0_ |= 0x00000004; - dy_ = input.readSInt32(); + setDy(input.readSInt32()); break; } case 48: { - bitField0_ |= 0x00000008; - name_ = input.readUInt32(); + setName(input.readUInt32()); break; } case 56: { - bitField0_ |= 0x00000010; - nameEn_ = input.readUInt32(); + setNameEn(input.readUInt32()); break; } } } } - private int bitField0_; // required sint64 id = 1; - private long id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasId(); } public long getId() { - return id_; + return result.getId(); } public Builder setId(long value) { - bitField0_ |= 0x00000001; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000001); - id_ = 0L; - onChanged(); + result.hasId = false; + result.id_ = 0L; return this; } // required sint32 dx = 2; - private int dx_ ; public boolean hasDx() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasDx(); } public int getDx() { - return dx_; + return result.getDx(); } public Builder setDx(int value) { - bitField0_ |= 0x00000002; - dx_ = value; - onChanged(); + result.hasDx = true; + result.dx_ = value; return this; } public Builder clearDx() { - bitField0_ = (bitField0_ & ~0x00000002); - dx_ = 0; - onChanged(); + result.hasDx = false; + result.dx_ = 0; return this; } // required sint32 dy = 3; - private int dy_ ; public boolean hasDy() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasDy(); } public int getDy() { - return dy_; + return result.getDy(); } public Builder setDy(int value) { - bitField0_ |= 0x00000004; - dy_ = value; - onChanged(); + result.hasDy = true; + result.dy_ = value; return this; } public Builder clearDy() { - bitField0_ = (bitField0_ & ~0x00000004); - dy_ = 0; - onChanged(); + result.hasDy = false; + result.dy_ = 0; return this; } // required uint32 name = 6; - private int name_ ; public boolean hasName() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasName(); } public int getName() { - return name_; + return result.getName(); } public Builder setName(int value) { - bitField0_ |= 0x00000008; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000008); - name_ = 0; - onChanged(); + result.hasName = false; + result.name_ = 0; return this; } // optional uint32 name_en = 7; - private int nameEn_ ; public boolean hasNameEn() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasNameEn(); } public int getNameEn() { - return nameEn_; + return result.getNameEn(); } public Builder setNameEn(int value) { - bitField0_ |= 0x00000010; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000010); - nameEn_ = 0; - onChanged(); + result.hasNameEn = false; + result.nameEn_ = 0; return this; } @@ -20971,46 +12705,18 @@ public final class OsmandOdb { static { defaultInstance = new TransportRouteStop(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TransportRouteStop) } - public interface TransportStopOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required sint32 dx = 1; - boolean hasDx(); - int getDx(); - - // required sint32 dy = 2; - boolean hasDy(); - int getDy(); - - // required sint64 id = 5; - boolean hasId(); - long getId(); - - // required uint32 name = 6; - boolean hasName(); - int getName(); - - // optional uint32 name_en = 7; - boolean hasNameEn(); - int getNameEn(); - - // repeated uint32 routes = 16; - java.util.List getRoutesList(); - int getRoutesCount(); - int getRoutes(int index); - } public static final class TransportStop extends - com.google.protobuf.GeneratedMessage - implements TransportStopOrBuilder { + com.google.protobuf.GeneratedMessage { // Use TransportStop.newBuilder() to construct. - private TransportStop(Builder builder) { - super(builder); + private TransportStop() { + initFields(); } private TransportStop(boolean noInit) {} @@ -21019,7 +12725,8 @@ public final class OsmandOdb { return defaultInstance; } - public TransportStop getDefaultInstanceForType() { + @Override + public TransportStop getDefaultInstanceForType() { return defaultInstance; } @@ -21028,164 +12735,127 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_TransportStop_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_TransportStop_fieldAccessorTable; } - private int bitField0_; // required sint32 dx = 1; public static final int DX_FIELD_NUMBER = 1; - private int dx_; - public boolean hasDx() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getDx() { - return dx_; - } + private boolean hasDx; + private int dx_ = 0; + public boolean hasDx() { return hasDx; } + public int getDx() { return dx_; } // required sint32 dy = 2; public static final int DY_FIELD_NUMBER = 2; - private int dy_; - public boolean hasDy() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getDy() { - return dy_; - } + private boolean hasDy; + private int dy_ = 0; + public boolean hasDy() { return hasDy; } + public int getDy() { return dy_; } // required sint64 id = 5; public static final int ID_FIELD_NUMBER = 5; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public long getId() { - return id_; - } + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } // required uint32 name = 6; public static final int NAME_FIELD_NUMBER = 6; - private int name_; - public boolean hasName() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getName() { - return name_; - } + private boolean hasName; + private int name_ = 0; + public boolean hasName() { return hasName; } + public int getName() { return name_; } // optional uint32 name_en = 7; public static final int NAME_EN_FIELD_NUMBER = 7; - private int nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getNameEn() { - return nameEn_; - } + private boolean hasNameEn; + private int nameEn_ = 0; + public boolean hasNameEn() { return hasNameEn; } + public int getNameEn() { return nameEn_; } // repeated uint32 routes = 16; public static final int ROUTES_FIELD_NUMBER = 16; - private java.util.List routes_; - public java.util.List - getRoutesList() { + private java.util.List routes_ = + java.util.Collections.emptyList(); + public java.util.List getRoutesList() { return routes_; } - public int getRoutesCount() { - return routes_.size(); - } + public int getRoutesCount() { return routes_.size(); } public int getRoutes(int index) { return routes_.get(index); } private void initFields() { - dx_ = 0; - dy_ = 0; - id_ = 0L; - name_ = 0; - nameEn_ = 0; - routes_ = java.util.Collections.emptyList();; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasDx()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasDy()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasId()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasName()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasDx) return false; + if (!hasDy) return false; + if (!hasId) return false; + if (!hasName) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeSInt32(1, dx_); + if (hasDx()) { + output.writeSInt32(1, getDx()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeSInt32(2, dy_); + if (hasDy()) { + output.writeSInt32(2, getDy()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeSInt64(5, id_); + if (hasId()) { + output.writeSInt64(5, getId()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeUInt32(6, name_); + if (hasName()) { + output.writeUInt32(6, getName()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt32(7, nameEn_); + if (hasNameEn()) { + output.writeUInt32(7, getNameEn()); } - for (int i = 0; i < routes_.size(); i++) { - output.writeUInt32(16, routes_.get(i)); + for (int element : getRoutesList()) { + output.writeUInt32(16, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasDx()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, dx_); + .computeSInt32Size(1, getDx()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasDy()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(2, dy_); + .computeSInt32Size(2, getDy()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeSInt64Size(5, id_); + .computeSInt64Size(5, getId()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(6, name_); + .computeUInt32Size(6, getName()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(7, nameEn_); + .computeUInt32Size(7, getNameEn()); } { int dataSize = 0; - for (int i = 0; i < routes_.size(); i++) { + for (int element : getRoutesList()) { dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(routes_.get(i)); + .computeUInt32SizeNoTag(element); } size += dataSize; size += 2 * getRoutesList().size(); @@ -21195,13 +12865,6 @@ public final class OsmandOdb { return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.TransportStop parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -21270,131 +12933,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.TransportStop prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.TransportStopOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_TransportStop_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_TransportStop_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.TransportStop result; // Construct using net.osmand.binary.OsmandOdb.TransportStop.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.TransportStop(); + return builder; } - public Builder clear() { - super.clear(); - dx_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - dy_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000004); - name_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - nameEn_ = 0; - bitField0_ = (bitField0_ & ~0x00000010); - routes_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000020); + @Override + protected net.osmand.binary.OsmandOdb.TransportStop internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.TransportStop(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.TransportStop.getDescriptor(); } - public net.osmand.binary.OsmandOdb.TransportStop getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.TransportStop getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.TransportStop.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.TransportStop build() { - net.osmand.binary.OsmandOdb.TransportStop result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.TransportStop build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.TransportStop buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.TransportStop result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.TransportStop buildPartial() { - net.osmand.binary.OsmandOdb.TransportStop result = new net.osmand.binary.OsmandOdb.TransportStop(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.TransportStop buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.dx_ = dx_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.routes_ != java.util.Collections.EMPTY_LIST) { + result.routes_ = + java.util.Collections.unmodifiableList(result.routes_); } - result.dy_ = dy_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.id_ = id_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000010; - } - result.nameEn_ = nameEn_; - if (((bitField0_ & 0x00000020) == 0x00000020)) { - routes_ = java.util.Collections.unmodifiableList(routes_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.routes_ = routes_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.TransportStop returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.TransportStop) { return mergeFrom((net.osmand.binary.OsmandOdb.TransportStop)other); } else { @@ -21421,40 +13049,17 @@ public final class OsmandOdb { setNameEn(other.getNameEn()); } if (!other.routes_.isEmpty()) { - if (routes_.isEmpty()) { - routes_ = other.routes_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureRoutesIsMutable(); - routes_.addAll(other.routes_); + if (result.routes_.isEmpty()) { + result.routes_ = new java.util.ArrayList(); } - onChanged(); + result.routes_.addAll(other.routes_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasDx()) { - - return false; - } - if (!hasDy()) { - - return false; - } - if (!hasId()) { - - return false; - } - if (!hasName()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -21466,45 +13071,37 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - dx_ = input.readSInt32(); + setDx(input.readSInt32()); break; } case 16: { - bitField0_ |= 0x00000002; - dy_ = input.readSInt32(); + setDy(input.readSInt32()); break; } case 40: { - bitField0_ |= 0x00000004; - id_ = input.readSInt64(); + setId(input.readSInt64()); break; } case 48: { - bitField0_ |= 0x00000008; - name_ = input.readUInt32(); + setName(input.readUInt32()); break; } case 56: { - bitField0_ |= 0x00000010; - nameEn_ = input.readUInt32(); + setNameEn(input.readUInt32()); break; } case 128: { - ensureRoutesIsMutable(); - routes_.add(input.readUInt32()); + addRoutes(input.readUInt32()); break; } case 130: { @@ -21520,155 +13117,128 @@ public final class OsmandOdb { } } - private int bitField0_; // required sint32 dx = 1; - private int dx_ ; public boolean hasDx() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasDx(); } public int getDx() { - return dx_; + return result.getDx(); } public Builder setDx(int value) { - bitField0_ |= 0x00000001; - dx_ = value; - onChanged(); + result.hasDx = true; + result.dx_ = value; return this; } public Builder clearDx() { - bitField0_ = (bitField0_ & ~0x00000001); - dx_ = 0; - onChanged(); + result.hasDx = false; + result.dx_ = 0; return this; } // required sint32 dy = 2; - private int dy_ ; public boolean hasDy() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasDy(); } public int getDy() { - return dy_; + return result.getDy(); } public Builder setDy(int value) { - bitField0_ |= 0x00000002; - dy_ = value; - onChanged(); + result.hasDy = true; + result.dy_ = value; return this; } public Builder clearDy() { - bitField0_ = (bitField0_ & ~0x00000002); - dy_ = 0; - onChanged(); + result.hasDy = false; + result.dy_ = 0; return this; } // required sint64 id = 5; - private long id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasId(); } public long getId() { - return id_; + return result.getId(); } public Builder setId(long value) { - bitField0_ |= 0x00000004; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000004); - id_ = 0L; - onChanged(); + result.hasId = false; + result.id_ = 0L; return this; } // required uint32 name = 6; - private int name_ ; public boolean hasName() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasName(); } public int getName() { - return name_; + return result.getName(); } public Builder setName(int value) { - bitField0_ |= 0x00000008; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000008); - name_ = 0; - onChanged(); + result.hasName = false; + result.name_ = 0; return this; } // optional uint32 name_en = 7; - private int nameEn_ ; public boolean hasNameEn() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasNameEn(); } public int getNameEn() { - return nameEn_; + return result.getNameEn(); } public Builder setNameEn(int value) { - bitField0_ |= 0x00000010; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000010); - nameEn_ = 0; - onChanged(); + result.hasNameEn = false; + result.nameEn_ = 0; return this; } // repeated uint32 routes = 16; - private java.util.List routes_ = java.util.Collections.emptyList();; - private void ensureRoutesIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - routes_ = new java.util.ArrayList(routes_); - bitField0_ |= 0x00000020; - } - } - public java.util.List - getRoutesList() { - return java.util.Collections.unmodifiableList(routes_); + public java.util.List getRoutesList() { + return java.util.Collections.unmodifiableList(result.routes_); } public int getRoutesCount() { - return routes_.size(); + return result.getRoutesCount(); } public int getRoutes(int index) { - return routes_.get(index); + return result.getRoutes(index); } - public Builder setRoutes( - int index, int value) { - ensureRoutesIsMutable(); - routes_.set(index, value); - onChanged(); + public Builder setRoutes(int index, int value) { + result.routes_.set(index, value); return this; } public Builder addRoutes(int value) { - ensureRoutesIsMutable(); - routes_.add(value); - onChanged(); + if (result.routes_.isEmpty()) { + result.routes_ = new java.util.ArrayList(); + } + result.routes_.add(value); return this; } public Builder addAllRoutes( java.lang.Iterable values) { - ensureRoutesIsMutable(); - super.addAll(values, routes_); - onChanged(); + if (result.routes_.isEmpty()) { + result.routes_ = new java.util.ArrayList(); + } + super.addAll(values, result.routes_); return this; } public Builder clearRoutes() { - routes_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); + result.routes_ = java.util.Collections.emptyList(); return this; } @@ -21677,61 +13247,18 @@ public final class OsmandOdb { static { defaultInstance = new TransportStop(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TransportStop) } - public interface TransportStopsTreeOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required sint32 left = 1; - boolean hasLeft(); - int getLeft(); - - // required sint32 right = 2; - boolean hasRight(); - int getRight(); - - // required sint32 top = 3; - boolean hasTop(); - int getTop(); - - // required sint32 bottom = 4; - boolean hasBottom(); - int getBottom(); - - // repeated .TransportStopsTree subtrees = 7; - java.util.List - getSubtreesList(); - net.osmand.binary.OsmandOdb.TransportStopsTree getSubtrees(int index); - int getSubtreesCount(); - java.util.List - getSubtreesOrBuilderList(); - net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder getSubtreesOrBuilder( - int index); - - // repeated .TransportStop leafs = 8; - java.util.List - getLeafsList(); - net.osmand.binary.OsmandOdb.TransportStop getLeafs(int index); - int getLeafsCount(); - java.util.List - getLeafsOrBuilderList(); - net.osmand.binary.OsmandOdb.TransportStopOrBuilder getLeafsOrBuilder( - int index); - - // optional uint64 baseId = 16; - boolean hasBaseId(); - long getBaseId(); - } public static final class TransportStopsTree extends - com.google.protobuf.GeneratedMessage - implements TransportStopsTreeOrBuilder { + com.google.protobuf.GeneratedMessage { // Use TransportStopsTree.newBuilder() to construct. - private TransportStopsTree(Builder builder) { - super(builder); + private TransportStopsTree() { + initFields(); } private TransportStopsTree(boolean noInit) {} @@ -21740,7 +13267,8 @@ public final class OsmandOdb { return defaultInstance; } - public TransportStopsTree getDefaultInstanceForType() { + @Override + public TransportStopsTree getDefaultInstanceForType() { return defaultInstance; } @@ -21749,223 +13277,156 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_TransportStopsTree_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_TransportStopsTree_fieldAccessorTable; } - private int bitField0_; // required sint32 left = 1; public static final int LEFT_FIELD_NUMBER = 1; - private int left_; - public boolean hasLeft() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getLeft() { - return left_; - } + private boolean hasLeft; + private int left_ = 0; + public boolean hasLeft() { return hasLeft; } + public int getLeft() { return left_; } // required sint32 right = 2; public static final int RIGHT_FIELD_NUMBER = 2; - private int right_; - public boolean hasRight() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getRight() { - return right_; - } + private boolean hasRight; + private int right_ = 0; + public boolean hasRight() { return hasRight; } + public int getRight() { return right_; } // required sint32 top = 3; public static final int TOP_FIELD_NUMBER = 3; - private int top_; - public boolean hasTop() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getTop() { - return top_; - } + private boolean hasTop; + private int top_ = 0; + public boolean hasTop() { return hasTop; } + public int getTop() { return top_; } // required sint32 bottom = 4; public static final int BOTTOM_FIELD_NUMBER = 4; - private int bottom_; - public boolean hasBottom() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getBottom() { - return bottom_; - } + private boolean hasBottom; + private int bottom_ = 0; + public boolean hasBottom() { return hasBottom; } + public int getBottom() { return bottom_; } // repeated .TransportStopsTree subtrees = 7; public static final int SUBTREES_FIELD_NUMBER = 7; - private java.util.List subtrees_; + private java.util.List subtrees_ = + java.util.Collections.emptyList(); public java.util.List getSubtreesList() { return subtrees_; } - public java.util.List - getSubtreesOrBuilderList() { - return subtrees_; - } - public int getSubtreesCount() { - return subtrees_.size(); - } + public int getSubtreesCount() { return subtrees_.size(); } public net.osmand.binary.OsmandOdb.TransportStopsTree getSubtrees(int index) { return subtrees_.get(index); } - public net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder getSubtreesOrBuilder( - int index) { - return subtrees_.get(index); - } // repeated .TransportStop leafs = 8; public static final int LEAFS_FIELD_NUMBER = 8; - private java.util.List leafs_; + private java.util.List leafs_ = + java.util.Collections.emptyList(); public java.util.List getLeafsList() { return leafs_; } - public java.util.List - getLeafsOrBuilderList() { - return leafs_; - } - public int getLeafsCount() { - return leafs_.size(); - } + public int getLeafsCount() { return leafs_.size(); } public net.osmand.binary.OsmandOdb.TransportStop getLeafs(int index) { return leafs_.get(index); } - public net.osmand.binary.OsmandOdb.TransportStopOrBuilder getLeafsOrBuilder( - int index) { - return leafs_.get(index); - } // optional uint64 baseId = 16; public static final int BASEID_FIELD_NUMBER = 16; - private long baseId_; - public boolean hasBaseId() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public long getBaseId() { - return baseId_; - } + private boolean hasBaseId; + private long baseId_ = 0L; + public boolean hasBaseId() { return hasBaseId; } + public long getBaseId() { return baseId_; } private void initFields() { - left_ = 0; - right_ = 0; - top_ = 0; - bottom_ = 0; - subtrees_ = java.util.Collections.emptyList(); - leafs_ = java.util.Collections.emptyList(); - baseId_ = 0L; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasLeft()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasLeft) return false; + if (!hasRight) return false; + if (!hasTop) return false; + if (!hasBottom) return false; + for (net.osmand.binary.OsmandOdb.TransportStopsTree element : getSubtreesList()) { + if (!element.isInitialized()) return false; } - if (!hasRight()) { - memoizedIsInitialized = 0; - return false; + for (net.osmand.binary.OsmandOdb.TransportStop element : getLeafsList()) { + if (!element.isInitialized()) return false; } - if (!hasTop()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasBottom()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getSubtreesCount(); i++) { - if (!getSubtrees(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getLeafsCount(); i++) { - if (!getLeafs(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeSInt32(1, left_); + if (hasLeft()) { + output.writeSInt32(1, getLeft()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeSInt32(2, right_); + if (hasRight()) { + output.writeSInt32(2, getRight()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeSInt32(3, top_); + if (hasTop()) { + output.writeSInt32(3, getTop()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeSInt32(4, bottom_); + if (hasBottom()) { + output.writeSInt32(4, getBottom()); } - for (int i = 0; i < subtrees_.size(); i++) { - output.writeMessage(7, subtrees_.get(i)); + for (net.osmand.binary.OsmandOdb.TransportStopsTree element : getSubtreesList()) { + output.writeMessage(7, element); } - for (int i = 0; i < leafs_.size(); i++) { - output.writeMessage(8, leafs_.get(i)); + for (net.osmand.binary.OsmandOdb.TransportStop element : getLeafsList()) { + output.writeMessage(8, element); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt64(16, baseId_); + if (hasBaseId()) { + output.writeUInt64(16, getBaseId()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasLeft()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(1, left_); + .computeSInt32Size(1, getLeft()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasRight()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(2, right_); + .computeSInt32Size(2, getRight()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasTop()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(3, top_); + .computeSInt32Size(3, getTop()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasBottom()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(4, bottom_); + .computeSInt32Size(4, getBottom()); } - for (int i = 0; i < subtrees_.size(); i++) { + for (net.osmand.binary.OsmandOdb.TransportStopsTree element : getSubtreesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(7, subtrees_.get(i)); + .computeMessageSize(7, element); } - for (int i = 0; i < leafs_.size(); i++) { + for (net.osmand.binary.OsmandOdb.TransportStop element : getLeafsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(8, leafs_.get(i)); + .computeMessageSize(8, element); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasBaseId()) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(16, baseId_); + .computeUInt64Size(16, getBaseId()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.TransportStopsTree parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -22034,156 +13495,100 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.TransportStopsTree prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_TransportStopsTree_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_TransportStopsTree_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.TransportStopsTree result; // Construct using net.osmand.binary.OsmandOdb.TransportStopsTree.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getSubtreesFieldBuilder(); - getLeafsFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.TransportStopsTree(); + return builder; } - public Builder clear() { - super.clear(); - left_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - right_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - top_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - bottom_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); - if (subtreesBuilder_ == null) { - subtrees_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - subtreesBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.TransportStopsTree internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } - if (leafsBuilder_ == null) { - leafs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - leafsBuilder_.clear(); - } - baseId_ = 0L; - bitField0_ = (bitField0_ & ~0x00000040); + result = new net.osmand.binary.OsmandOdb.TransportStopsTree(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.TransportStopsTree.getDescriptor(); } - public net.osmand.binary.OsmandOdb.TransportStopsTree getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.TransportStopsTree getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.TransportStopsTree build() { - net.osmand.binary.OsmandOdb.TransportStopsTree result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.TransportStopsTree build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.TransportStopsTree buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.TransportStopsTree result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.TransportStopsTree buildPartial() { - net.osmand.binary.OsmandOdb.TransportStopsTree result = new net.osmand.binary.OsmandOdb.TransportStopsTree(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.TransportStopsTree buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.left_ = left_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.subtrees_ != java.util.Collections.EMPTY_LIST) { + result.subtrees_ = + java.util.Collections.unmodifiableList(result.subtrees_); } - result.right_ = right_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; + if (result.leafs_ != java.util.Collections.EMPTY_LIST) { + result.leafs_ = + java.util.Collections.unmodifiableList(result.leafs_); } - result.top_ = top_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.bottom_ = bottom_; - if (subtreesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subtrees_ = java.util.Collections.unmodifiableList(subtrees_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.subtrees_ = subtrees_; - } else { - result.subtrees_ = subtreesBuilder_.build(); - } - if (leafsBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - leafs_ = java.util.Collections.unmodifiableList(leafs_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.leafs_ = leafs_; - } else { - result.leafs_ = leafsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000010; - } - result.baseId_ = baseId_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.TransportStopsTree returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.TransportStopsTree) { return mergeFrom((net.osmand.binary.OsmandOdb.TransportStopsTree)other); } else { @@ -22206,57 +13611,17 @@ public final class OsmandOdb { if (other.hasBottom()) { setBottom(other.getBottom()); } - if (subtreesBuilder_ == null) { - if (!other.subtrees_.isEmpty()) { - if (subtrees_.isEmpty()) { - subtrees_ = other.subtrees_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureSubtreesIsMutable(); - subtrees_.addAll(other.subtrees_); - } - onChanged(); - } - } else { - if (!other.subtrees_.isEmpty()) { - if (subtreesBuilder_.isEmpty()) { - subtreesBuilder_.dispose(); - subtreesBuilder_ = null; - subtrees_ = other.subtrees_; - bitField0_ = (bitField0_ & ~0x00000010); - subtreesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSubtreesFieldBuilder() : null; - } else { - subtreesBuilder_.addAllMessages(other.subtrees_); - } + if (!other.subtrees_.isEmpty()) { + if (result.subtrees_.isEmpty()) { + result.subtrees_ = new java.util.ArrayList(); } + result.subtrees_.addAll(other.subtrees_); } - if (leafsBuilder_ == null) { - if (!other.leafs_.isEmpty()) { - if (leafs_.isEmpty()) { - leafs_ = other.leafs_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureLeafsIsMutable(); - leafs_.addAll(other.leafs_); - } - onChanged(); - } - } else { - if (!other.leafs_.isEmpty()) { - if (leafsBuilder_.isEmpty()) { - leafsBuilder_.dispose(); - leafsBuilder_ = null; - leafs_ = other.leafs_; - bitField0_ = (bitField0_ & ~0x00000020); - leafsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getLeafsFieldBuilder() : null; - } else { - leafsBuilder_.addAllMessages(other.leafs_); - } + if (!other.leafs_.isEmpty()) { + if (result.leafs_.isEmpty()) { + result.leafs_ = new java.util.ArrayList(); } + result.leafs_.addAll(other.leafs_); } if (other.hasBaseId()) { setBaseId(other.getBaseId()); @@ -22265,39 +13630,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasLeft()) { - - return false; - } - if (!hasRight()) { - - return false; - } - if (!hasTop()) { - - return false; - } - if (!hasBottom()) { - - return false; - } - for (int i = 0; i < getSubtreesCount(); i++) { - if (!getSubtrees(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getLeafsCount(); i++) { - if (!getLeafs(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -22309,35 +13643,29 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - left_ = input.readSInt32(); + setLeft(input.readSInt32()); break; } case 16: { - bitField0_ |= 0x00000002; - right_ = input.readSInt32(); + setRight(input.readSInt32()); break; } case 24: { - bitField0_ |= 0x00000004; - top_ = input.readSInt32(); + setTop(input.readSInt32()); break; } case 32: { - bitField0_ |= 0x00000008; - bottom_ = input.readSInt32(); + setBottom(input.readSInt32()); break; } case 58: { @@ -22353,490 +13681,203 @@ public final class OsmandOdb { break; } case 128: { - bitField0_ |= 0x00000040; - baseId_ = input.readUInt64(); + setBaseId(input.readUInt64()); break; } } } } - private int bitField0_; // required sint32 left = 1; - private int left_ ; public boolean hasLeft() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasLeft(); } public int getLeft() { - return left_; + return result.getLeft(); } public Builder setLeft(int value) { - bitField0_ |= 0x00000001; - left_ = value; - onChanged(); + result.hasLeft = true; + result.left_ = value; return this; } public Builder clearLeft() { - bitField0_ = (bitField0_ & ~0x00000001); - left_ = 0; - onChanged(); + result.hasLeft = false; + result.left_ = 0; return this; } // required sint32 right = 2; - private int right_ ; public boolean hasRight() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasRight(); } public int getRight() { - return right_; + return result.getRight(); } public Builder setRight(int value) { - bitField0_ |= 0x00000002; - right_ = value; - onChanged(); + result.hasRight = true; + result.right_ = value; return this; } public Builder clearRight() { - bitField0_ = (bitField0_ & ~0x00000002); - right_ = 0; - onChanged(); + result.hasRight = false; + result.right_ = 0; return this; } // required sint32 top = 3; - private int top_ ; public boolean hasTop() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasTop(); } public int getTop() { - return top_; + return result.getTop(); } public Builder setTop(int value) { - bitField0_ |= 0x00000004; - top_ = value; - onChanged(); + result.hasTop = true; + result.top_ = value; return this; } public Builder clearTop() { - bitField0_ = (bitField0_ & ~0x00000004); - top_ = 0; - onChanged(); + result.hasTop = false; + result.top_ = 0; return this; } // required sint32 bottom = 4; - private int bottom_ ; public boolean hasBottom() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasBottom(); } public int getBottom() { - return bottom_; + return result.getBottom(); } public Builder setBottom(int value) { - bitField0_ |= 0x00000008; - bottom_ = value; - onChanged(); + result.hasBottom = true; + result.bottom_ = value; return this; } public Builder clearBottom() { - bitField0_ = (bitField0_ & ~0x00000008); - bottom_ = 0; - onChanged(); + result.hasBottom = false; + result.bottom_ = 0; return this; } // repeated .TransportStopsTree subtrees = 7; - private java.util.List subtrees_ = - java.util.Collections.emptyList(); - private void ensureSubtreesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - subtrees_ = new java.util.ArrayList(subtrees_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStopsTree, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder, net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder> subtreesBuilder_; - public java.util.List getSubtreesList() { - if (subtreesBuilder_ == null) { - return java.util.Collections.unmodifiableList(subtrees_); - } else { - return subtreesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.subtrees_); } public int getSubtreesCount() { - if (subtreesBuilder_ == null) { - return subtrees_.size(); - } else { - return subtreesBuilder_.getCount(); - } + return result.getSubtreesCount(); } public net.osmand.binary.OsmandOdb.TransportStopsTree getSubtrees(int index) { - if (subtreesBuilder_ == null) { - return subtrees_.get(index); - } else { - return subtreesBuilder_.getMessage(index); - } + return result.getSubtrees(index); } - public Builder setSubtrees( - int index, net.osmand.binary.OsmandOdb.TransportStopsTree value) { - if (subtreesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubtreesIsMutable(); - subtrees_.set(index, value); - onChanged(); - } else { - subtreesBuilder_.setMessage(index, value); + public Builder setSubtrees(int index, net.osmand.binary.OsmandOdb.TransportStopsTree value) { + if (value == null) { + throw new NullPointerException(); } + result.subtrees_.set(index, value); return this; } - public Builder setSubtrees( - int index, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder builderForValue) { - if (subtreesBuilder_ == null) { - ensureSubtreesIsMutable(); - subtrees_.set(index, builderForValue.build()); - onChanged(); - } else { - subtreesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setSubtrees(int index, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder builderForValue) { + result.subtrees_.set(index, builderForValue.build()); return this; } public Builder addSubtrees(net.osmand.binary.OsmandOdb.TransportStopsTree value) { - if (subtreesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubtreesIsMutable(); - subtrees_.add(value); - onChanged(); - } else { - subtreesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.subtrees_.isEmpty()) { + result.subtrees_ = new java.util.ArrayList(); + } + result.subtrees_.add(value); return this; } - public Builder addSubtrees( - int index, net.osmand.binary.OsmandOdb.TransportStopsTree value) { - if (subtreesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubtreesIsMutable(); - subtrees_.add(index, value); - onChanged(); - } else { - subtreesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addSubtrees( - net.osmand.binary.OsmandOdb.TransportStopsTree.Builder builderForValue) { - if (subtreesBuilder_ == null) { - ensureSubtreesIsMutable(); - subtrees_.add(builderForValue.build()); - onChanged(); - } else { - subtreesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addSubtrees( - int index, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder builderForValue) { - if (subtreesBuilder_ == null) { - ensureSubtreesIsMutable(); - subtrees_.add(index, builderForValue.build()); - onChanged(); - } else { - subtreesBuilder_.addMessage(index, builderForValue.build()); + public Builder addSubtrees(net.osmand.binary.OsmandOdb.TransportStopsTree.Builder builderForValue) { + if (result.subtrees_.isEmpty()) { + result.subtrees_ = new java.util.ArrayList(); } + result.subtrees_.add(builderForValue.build()); return this; } public Builder addAllSubtrees( java.lang.Iterable values) { - if (subtreesBuilder_ == null) { - ensureSubtreesIsMutable(); - super.addAll(values, subtrees_); - onChanged(); - } else { - subtreesBuilder_.addAllMessages(values); + if (result.subtrees_.isEmpty()) { + result.subtrees_ = new java.util.ArrayList(); } + super.addAll(values, result.subtrees_); return this; } public Builder clearSubtrees() { - if (subtreesBuilder_ == null) { - subtrees_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - subtreesBuilder_.clear(); - } + result.subtrees_ = java.util.Collections.emptyList(); return this; } - public Builder removeSubtrees(int index) { - if (subtreesBuilder_ == null) { - ensureSubtreesIsMutable(); - subtrees_.remove(index); - onChanged(); - } else { - subtreesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.TransportStopsTree.Builder getSubtreesBuilder( - int index) { - return getSubtreesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder getSubtreesOrBuilder( - int index) { - if (subtreesBuilder_ == null) { - return subtrees_.get(index); } else { - return subtreesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getSubtreesOrBuilderList() { - if (subtreesBuilder_ != null) { - return subtreesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subtrees_); - } - } - public net.osmand.binary.OsmandOdb.TransportStopsTree.Builder addSubtreesBuilder() { - return getSubtreesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.TransportStopsTree.Builder addSubtreesBuilder( - int index) { - return getSubtreesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance()); - } - public java.util.List - getSubtreesBuilderList() { - return getSubtreesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStopsTree, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder, net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder> - getSubtreesFieldBuilder() { - if (subtreesBuilder_ == null) { - subtreesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStopsTree, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder, net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder>( - subtrees_, - ((bitField0_ & 0x00000010) == 0x00000010), - getParentForChildren(), - isClean()); - subtrees_ = null; - } - return subtreesBuilder_; - } // repeated .TransportStop leafs = 8; - private java.util.List leafs_ = - java.util.Collections.emptyList(); - private void ensureLeafsIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - leafs_ = new java.util.ArrayList(leafs_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStop, net.osmand.binary.OsmandOdb.TransportStop.Builder, net.osmand.binary.OsmandOdb.TransportStopOrBuilder> leafsBuilder_; - public java.util.List getLeafsList() { - if (leafsBuilder_ == null) { - return java.util.Collections.unmodifiableList(leafs_); - } else { - return leafsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.leafs_); } public int getLeafsCount() { - if (leafsBuilder_ == null) { - return leafs_.size(); - } else { - return leafsBuilder_.getCount(); - } + return result.getLeafsCount(); } public net.osmand.binary.OsmandOdb.TransportStop getLeafs(int index) { - if (leafsBuilder_ == null) { - return leafs_.get(index); - } else { - return leafsBuilder_.getMessage(index); - } + return result.getLeafs(index); } - public Builder setLeafs( - int index, net.osmand.binary.OsmandOdb.TransportStop value) { - if (leafsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLeafsIsMutable(); - leafs_.set(index, value); - onChanged(); - } else { - leafsBuilder_.setMessage(index, value); + public Builder setLeafs(int index, net.osmand.binary.OsmandOdb.TransportStop value) { + if (value == null) { + throw new NullPointerException(); } + result.leafs_.set(index, value); return this; } - public Builder setLeafs( - int index, net.osmand.binary.OsmandOdb.TransportStop.Builder builderForValue) { - if (leafsBuilder_ == null) { - ensureLeafsIsMutable(); - leafs_.set(index, builderForValue.build()); - onChanged(); - } else { - leafsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setLeafs(int index, net.osmand.binary.OsmandOdb.TransportStop.Builder builderForValue) { + result.leafs_.set(index, builderForValue.build()); return this; } public Builder addLeafs(net.osmand.binary.OsmandOdb.TransportStop value) { - if (leafsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLeafsIsMutable(); - leafs_.add(value); - onChanged(); - } else { - leafsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.leafs_.isEmpty()) { + result.leafs_ = new java.util.ArrayList(); + } + result.leafs_.add(value); return this; } - public Builder addLeafs( - int index, net.osmand.binary.OsmandOdb.TransportStop value) { - if (leafsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureLeafsIsMutable(); - leafs_.add(index, value); - onChanged(); - } else { - leafsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addLeafs( - net.osmand.binary.OsmandOdb.TransportStop.Builder builderForValue) { - if (leafsBuilder_ == null) { - ensureLeafsIsMutable(); - leafs_.add(builderForValue.build()); - onChanged(); - } else { - leafsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addLeafs( - int index, net.osmand.binary.OsmandOdb.TransportStop.Builder builderForValue) { - if (leafsBuilder_ == null) { - ensureLeafsIsMutable(); - leafs_.add(index, builderForValue.build()); - onChanged(); - } else { - leafsBuilder_.addMessage(index, builderForValue.build()); + public Builder addLeafs(net.osmand.binary.OsmandOdb.TransportStop.Builder builderForValue) { + if (result.leafs_.isEmpty()) { + result.leafs_ = new java.util.ArrayList(); } + result.leafs_.add(builderForValue.build()); return this; } public Builder addAllLeafs( java.lang.Iterable values) { - if (leafsBuilder_ == null) { - ensureLeafsIsMutable(); - super.addAll(values, leafs_); - onChanged(); - } else { - leafsBuilder_.addAllMessages(values); + if (result.leafs_.isEmpty()) { + result.leafs_ = new java.util.ArrayList(); } + super.addAll(values, result.leafs_); return this; } public Builder clearLeafs() { - if (leafsBuilder_ == null) { - leafs_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - leafsBuilder_.clear(); - } + result.leafs_ = java.util.Collections.emptyList(); return this; } - public Builder removeLeafs(int index) { - if (leafsBuilder_ == null) { - ensureLeafsIsMutable(); - leafs_.remove(index); - onChanged(); - } else { - leafsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.TransportStop.Builder getLeafsBuilder( - int index) { - return getLeafsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.TransportStopOrBuilder getLeafsOrBuilder( - int index) { - if (leafsBuilder_ == null) { - return leafs_.get(index); } else { - return leafsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getLeafsOrBuilderList() { - if (leafsBuilder_ != null) { - return leafsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(leafs_); - } - } - public net.osmand.binary.OsmandOdb.TransportStop.Builder addLeafsBuilder() { - return getLeafsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.TransportStop.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.TransportStop.Builder addLeafsBuilder( - int index) { - return getLeafsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.TransportStop.getDefaultInstance()); - } - public java.util.List - getLeafsBuilderList() { - return getLeafsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStop, net.osmand.binary.OsmandOdb.TransportStop.Builder, net.osmand.binary.OsmandOdb.TransportStopOrBuilder> - getLeafsFieldBuilder() { - if (leafsBuilder_ == null) { - leafsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStop, net.osmand.binary.OsmandOdb.TransportStop.Builder, net.osmand.binary.OsmandOdb.TransportStopOrBuilder>( - leafs_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - leafs_ = null; - } - return leafsBuilder_; - } // optional uint64 baseId = 16; - private long baseId_ ; public boolean hasBaseId() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return result.hasBaseId(); } public long getBaseId() { - return baseId_; + return result.getBaseId(); } public Builder setBaseId(long value) { - bitField0_ |= 0x00000040; - baseId_ = value; - onChanged(); + result.hasBaseId = true; + result.baseId_ = value; return this; } public Builder clearBaseId() { - bitField0_ = (bitField0_ & ~0x00000040); - baseId_ = 0L; - onChanged(); + result.hasBaseId = false; + result.baseId_ = 0L; return this; } @@ -22845,40 +13886,18 @@ public final class OsmandOdb { static { defaultInstance = new TransportStopsTree(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:TransportStopsTree) } - public interface OsmAndTransportIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional string name = 1; - boolean hasName(); - String getName(); - - // optional .TransportRoutes routes = 3; - boolean hasRoutes(); - net.osmand.binary.OsmandOdb.TransportRoutes getRoutes(); - net.osmand.binary.OsmandOdb.TransportRoutesOrBuilder getRoutesOrBuilder(); - - // optional .TransportStopsTree stops = 6; - boolean hasStops(); - net.osmand.binary.OsmandOdb.TransportStopsTree getStops(); - net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder getStopsOrBuilder(); - - // required .StringTable stringTable = 9; - boolean hasStringTable(); - net.osmand.binary.OsmandOdb.StringTable getStringTable(); - net.osmand.binary.OsmandOdb.StringTableOrBuilder getStringTableOrBuilder(); - } public static final class OsmAndTransportIndex extends - com.google.protobuf.GeneratedMessage - implements OsmAndTransportIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndTransportIndex.newBuilder() to construct. - private OsmAndTransportIndex(Builder builder) { - super(builder); + private OsmAndTransportIndex() { + initFields(); } private OsmAndTransportIndex(boolean noInit) {} @@ -22887,7 +13906,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndTransportIndex getDefaultInstanceForType() { + @Override + public OsmAndTransportIndex getDefaultInstanceForType() { return defaultInstance; } @@ -22896,166 +13916,104 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndTransportIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndTransportIndex_fieldAccessorTable; } - private int bitField0_; // optional string name = 1; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // optional .TransportRoutes routes = 3; public static final int ROUTES_FIELD_NUMBER = 3; + private boolean hasRoutes; private net.osmand.binary.OsmandOdb.TransportRoutes routes_; - public boolean hasRoutes() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public net.osmand.binary.OsmandOdb.TransportRoutes getRoutes() { - return routes_; - } - public net.osmand.binary.OsmandOdb.TransportRoutesOrBuilder getRoutesOrBuilder() { - return routes_; - } + public boolean hasRoutes() { return hasRoutes; } + public net.osmand.binary.OsmandOdb.TransportRoutes getRoutes() { return routes_; } // optional .TransportStopsTree stops = 6; public static final int STOPS_FIELD_NUMBER = 6; + private boolean hasStops; private net.osmand.binary.OsmandOdb.TransportStopsTree stops_; - public boolean hasStops() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public net.osmand.binary.OsmandOdb.TransportStopsTree getStops() { - return stops_; - } - public net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder getStopsOrBuilder() { - return stops_; - } + public boolean hasStops() { return hasStops; } + public net.osmand.binary.OsmandOdb.TransportStopsTree getStops() { return stops_; } // required .StringTable stringTable = 9; public static final int STRINGTABLE_FIELD_NUMBER = 9; + private boolean hasStringTable; private net.osmand.binary.OsmandOdb.StringTable stringTable_; - public boolean hasStringTable() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public net.osmand.binary.OsmandOdb.StringTable getStringTable() { - return stringTable_; - } - public net.osmand.binary.OsmandOdb.StringTableOrBuilder getStringTableOrBuilder() { - return stringTable_; - } + public boolean hasStringTable() { return hasStringTable; } + public net.osmand.binary.OsmandOdb.StringTable getStringTable() { return stringTable_; } private void initFields() { - name_ = ""; routes_ = net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance(); stops_ = net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance(); stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasStringTable()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + if (!hasStringTable) return false; if (hasRoutes()) { - if (!getRoutes().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + if (!getRoutes().isInitialized()) return false; } if (hasStops()) { - if (!getStops().isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + if (!getStops().isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + if (hasName()) { + output.writeString(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(3, routes_); + if (hasRoutes()) { + output.writeMessage(3, getRoutes()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(6, stops_); + if (hasStops()) { + output.writeMessage(6, getStops()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(9, stringTable_); + if (hasStringTable()) { + output.writeMessage(9, getStringTable()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeStringSize(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasRoutes()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, routes_); + .computeMessageSize(3, getRoutes()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasStops()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, stops_); + .computeMessageSize(6, getStops()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasStringTable()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, stringTable_); + .computeMessageSize(9, getStringTable()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndTransportIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -23124,145 +14082,92 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndTransportIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndTransportIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndTransportIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndTransportIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndTransportIndex result; // Construct using net.osmand.binary.OsmandOdb.OsmAndTransportIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getRoutesFieldBuilder(); - getStopsFieldBuilder(); - getStringTableFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndTransportIndex(); + return builder; } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (routesBuilder_ == null) { - routes_ = net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance(); - } else { - routesBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndTransportIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } - bitField0_ = (bitField0_ & ~0x00000002); - if (stopsBuilder_ == null) { - stops_ = net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance(); - } else { - stopsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); - if (stringTableBuilder_ == null) { - stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); - } else { - stringTableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); + result = new net.osmand.binary.OsmandOdb.OsmAndTransportIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndTransportIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndTransportIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndTransportIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndTransportIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndTransportIndex build() { - net.osmand.binary.OsmandOdb.OsmAndTransportIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndTransportIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndTransportIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndTransportIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndTransportIndex buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndTransportIndex result = new net.osmand.binary.OsmandOdb.OsmAndTransportIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndTransportIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - if (routesBuilder_ == null) { - result.routes_ = routes_; - } else { - result.routes_ = routesBuilder_.build(); - } - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - if (stopsBuilder_ == null) { - result.stops_ = stops_; - } else { - result.stops_ = stopsBuilder_.build(); - } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (stringTableBuilder_ == null) { - result.stringTable_ = stringTable_; - } else { - result.stringTable_ = stringTableBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndTransportIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndTransportIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndTransportIndex)other); } else { @@ -23289,27 +14194,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasStringTable()) { - - return false; - } - if (hasRoutes()) { - if (!getRoutes().isInitialized()) { - - return false; - } - } - if (hasStops()) { - if (!getStops().isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -23321,20 +14207,17 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + setName(input.readString()); break; } case 26: { @@ -23368,383 +14251,156 @@ public final class OsmandOdb { } } - private int bitField0_; // optional string name = 1; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - } // optional .TransportRoutes routes = 3; - private net.osmand.binary.OsmandOdb.TransportRoutes routes_ = net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRoutes, net.osmand.binary.OsmandOdb.TransportRoutes.Builder, net.osmand.binary.OsmandOdb.TransportRoutesOrBuilder> routesBuilder_; public boolean hasRoutes() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasRoutes(); } public net.osmand.binary.OsmandOdb.TransportRoutes getRoutes() { - if (routesBuilder_ == null) { - return routes_; - } else { - return routesBuilder_.getMessage(); - } + return result.getRoutes(); } public Builder setRoutes(net.osmand.binary.OsmandOdb.TransportRoutes value) { - if (routesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - routes_ = value; - onChanged(); - } else { - routesBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000002; + result.hasRoutes = true; + result.routes_ = value; return this; } - public Builder setRoutes( - net.osmand.binary.OsmandOdb.TransportRoutes.Builder builderForValue) { - if (routesBuilder_ == null) { - routes_ = builderForValue.build(); - onChanged(); - } else { - routesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; + public Builder setRoutes(net.osmand.binary.OsmandOdb.TransportRoutes.Builder builderForValue) { + result.hasRoutes = true; + result.routes_ = builderForValue.build(); return this; } public Builder mergeRoutes(net.osmand.binary.OsmandOdb.TransportRoutes value) { - if (routesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - routes_ != net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance()) { - routes_ = - net.osmand.binary.OsmandOdb.TransportRoutes.newBuilder(routes_).mergeFrom(value).buildPartial(); - } else { - routes_ = value; - } - onChanged(); + if (result.hasRoutes() && + result.routes_ != net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance()) { + result.routes_ = + net.osmand.binary.OsmandOdb.TransportRoutes.newBuilder(result.routes_).mergeFrom(value).buildPartial(); } else { - routesBuilder_.mergeFrom(value); + result.routes_ = value; } - bitField0_ |= 0x00000002; + result.hasRoutes = true; return this; } public Builder clearRoutes() { - if (routesBuilder_ == null) { - routes_ = net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance(); - onChanged(); - } else { - routesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); + result.hasRoutes = false; + result.routes_ = net.osmand.binary.OsmandOdb.TransportRoutes.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.TransportRoutes.Builder getRoutesBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getRoutesFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.TransportRoutesOrBuilder getRoutesOrBuilder() { - if (routesBuilder_ != null) { - return routesBuilder_.getMessageOrBuilder(); - } else { - return routes_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRoutes, net.osmand.binary.OsmandOdb.TransportRoutes.Builder, net.osmand.binary.OsmandOdb.TransportRoutesOrBuilder> - getRoutesFieldBuilder() { - if (routesBuilder_ == null) { - routesBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.TransportRoutes, net.osmand.binary.OsmandOdb.TransportRoutes.Builder, net.osmand.binary.OsmandOdb.TransportRoutesOrBuilder>( - routes_, - getParentForChildren(), - isClean()); - routes_ = null; - } - return routesBuilder_; - } // optional .TransportStopsTree stops = 6; - private net.osmand.binary.OsmandOdb.TransportStopsTree stops_ = net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStopsTree, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder, net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder> stopsBuilder_; public boolean hasStops() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasStops(); } public net.osmand.binary.OsmandOdb.TransportStopsTree getStops() { - if (stopsBuilder_ == null) { - return stops_; - } else { - return stopsBuilder_.getMessage(); - } + return result.getStops(); } public Builder setStops(net.osmand.binary.OsmandOdb.TransportStopsTree value) { - if (stopsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stops_ = value; - onChanged(); - } else { - stopsBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000004; + result.hasStops = true; + result.stops_ = value; return this; } - public Builder setStops( - net.osmand.binary.OsmandOdb.TransportStopsTree.Builder builderForValue) { - if (stopsBuilder_ == null) { - stops_ = builderForValue.build(); - onChanged(); - } else { - stopsBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000004; + public Builder setStops(net.osmand.binary.OsmandOdb.TransportStopsTree.Builder builderForValue) { + result.hasStops = true; + result.stops_ = builderForValue.build(); return this; } public Builder mergeStops(net.osmand.binary.OsmandOdb.TransportStopsTree value) { - if (stopsBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004) && - stops_ != net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance()) { - stops_ = - net.osmand.binary.OsmandOdb.TransportStopsTree.newBuilder(stops_).mergeFrom(value).buildPartial(); - } else { - stops_ = value; - } - onChanged(); + if (result.hasStops() && + result.stops_ != net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance()) { + result.stops_ = + net.osmand.binary.OsmandOdb.TransportStopsTree.newBuilder(result.stops_).mergeFrom(value).buildPartial(); } else { - stopsBuilder_.mergeFrom(value); + result.stops_ = value; } - bitField0_ |= 0x00000004; + result.hasStops = true; return this; } public Builder clearStops() { - if (stopsBuilder_ == null) { - stops_ = net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance(); - onChanged(); - } else { - stopsBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000004); + result.hasStops = false; + result.stops_ = net.osmand.binary.OsmandOdb.TransportStopsTree.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.TransportStopsTree.Builder getStopsBuilder() { - bitField0_ |= 0x00000004; - onChanged(); - return getStopsFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder getStopsOrBuilder() { - if (stopsBuilder_ != null) { - return stopsBuilder_.getMessageOrBuilder(); - } else { - return stops_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStopsTree, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder, net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder> - getStopsFieldBuilder() { - if (stopsBuilder_ == null) { - stopsBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.TransportStopsTree, net.osmand.binary.OsmandOdb.TransportStopsTree.Builder, net.osmand.binary.OsmandOdb.TransportStopsTreeOrBuilder>( - stops_, - getParentForChildren(), - isClean()); - stops_ = null; - } - return stopsBuilder_; - } // required .StringTable stringTable = 9; - private net.osmand.binary.OsmandOdb.StringTable stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.StringTable, net.osmand.binary.OsmandOdb.StringTable.Builder, net.osmand.binary.OsmandOdb.StringTableOrBuilder> stringTableBuilder_; public boolean hasStringTable() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasStringTable(); } public net.osmand.binary.OsmandOdb.StringTable getStringTable() { - if (stringTableBuilder_ == null) { - return stringTable_; - } else { - return stringTableBuilder_.getMessage(); - } + return result.getStringTable(); } public Builder setStringTable(net.osmand.binary.OsmandOdb.StringTable value) { - if (stringTableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - stringTable_ = value; - onChanged(); - } else { - stringTableBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000008; + result.hasStringTable = true; + result.stringTable_ = value; return this; } - public Builder setStringTable( - net.osmand.binary.OsmandOdb.StringTable.Builder builderForValue) { - if (stringTableBuilder_ == null) { - stringTable_ = builderForValue.build(); - onChanged(); - } else { - stringTableBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; + public Builder setStringTable(net.osmand.binary.OsmandOdb.StringTable.Builder builderForValue) { + result.hasStringTable = true; + result.stringTable_ = builderForValue.build(); return this; } public Builder mergeStringTable(net.osmand.binary.OsmandOdb.StringTable value) { - if (stringTableBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - stringTable_ != net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance()) { - stringTable_ = - net.osmand.binary.OsmandOdb.StringTable.newBuilder(stringTable_).mergeFrom(value).buildPartial(); - } else { - stringTable_ = value; - } - onChanged(); + if (result.hasStringTable() && + result.stringTable_ != net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance()) { + result.stringTable_ = + net.osmand.binary.OsmandOdb.StringTable.newBuilder(result.stringTable_).mergeFrom(value).buildPartial(); } else { - stringTableBuilder_.mergeFrom(value); + result.stringTable_ = value; } - bitField0_ |= 0x00000008; + result.hasStringTable = true; return this; } public Builder clearStringTable() { - if (stringTableBuilder_ == null) { - stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); - onChanged(); - } else { - stringTableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); + result.hasStringTable = false; + result.stringTable_ = net.osmand.binary.OsmandOdb.StringTable.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.StringTable.Builder getStringTableBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getStringTableFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.StringTableOrBuilder getStringTableOrBuilder() { - if (stringTableBuilder_ != null) { - return stringTableBuilder_.getMessageOrBuilder(); - } else { - return stringTable_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.StringTable, net.osmand.binary.OsmandOdb.StringTable.Builder, net.osmand.binary.OsmandOdb.StringTableOrBuilder> - getStringTableFieldBuilder() { - if (stringTableBuilder_ == null) { - stringTableBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.StringTable, net.osmand.binary.OsmandOdb.StringTable.Builder, net.osmand.binary.OsmandOdb.StringTableOrBuilder>( - stringTable_, - getParentForChildren(), - isClean()); - stringTable_ = null; - } - return stringTableBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndTransportIndex) } static { defaultInstance = new OsmAndTransportIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndTransportIndex) } - public interface OsmAndPoiIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string name = 1; - boolean hasName(); - String getName(); - - // required .OsmAndTileBox boundaries = 2; - boolean hasBoundaries(); - net.osmand.binary.OsmandOdb.OsmAndTileBox getBoundaries(); - net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder getBoundariesOrBuilder(); - - // repeated .OsmAndCategoryTable categoriesTable = 3; - java.util.List - getCategoriesTableList(); - net.osmand.binary.OsmandOdb.OsmAndCategoryTable getCategoriesTable(int index); - int getCategoriesTableCount(); - java.util.List - getCategoriesTableOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndCategoryTableOrBuilder getCategoriesTableOrBuilder( - int index); - - // optional .OsmAndPoiNameIndex nameIndex = 4; - boolean hasNameIndex(); - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex getNameIndex(); - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexOrBuilder getNameIndexOrBuilder(); - - // optional .IndexedStringTable table = 5; - boolean hasTable(); - net.osmand.binary.OsmandOdb.IndexedStringTable getTable(); - net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getTableOrBuilder(); - - // repeated .OsmAndPoiBox boxes = 6; - java.util.List - getBoxesList(); - net.osmand.binary.OsmandOdb.OsmAndPoiBox getBoxes(int index); - int getBoxesCount(); - java.util.List - getBoxesOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder getBoxesOrBuilder( - int index); - - // repeated .OsmAndPoiBoxData poiData = 9; - java.util.List - getPoiDataList(); - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData getPoiData(int index); - int getPoiDataCount(); - java.util.List - getPoiDataOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataOrBuilder getPoiDataOrBuilder( - int index); - } public static final class OsmAndPoiIndex extends - com.google.protobuf.GeneratedMessage - implements OsmAndPoiIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndPoiIndex.newBuilder() to construct. - private OsmAndPoiIndex(Builder builder) { - super(builder); + private OsmAndPoiIndex() { + initFields(); } private OsmAndPoiIndex(boolean noInit) {} @@ -23753,7 +14409,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndPoiIndex getDefaultInstanceForType() { + @Override + public OsmAndPoiIndex getDefaultInstanceForType() { return defaultInstance; } @@ -23762,267 +14419,166 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiIndex_fieldAccessorTable; } - private int bitField0_; // required string name = 1; public static final int NAME_FIELD_NUMBER = 1; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // required .OsmAndTileBox boundaries = 2; public static final int BOUNDARIES_FIELD_NUMBER = 2; + private boolean hasBoundaries; private net.osmand.binary.OsmandOdb.OsmAndTileBox boundaries_; - public boolean hasBoundaries() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public net.osmand.binary.OsmandOdb.OsmAndTileBox getBoundaries() { - return boundaries_; - } - public net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder getBoundariesOrBuilder() { - return boundaries_; - } + public boolean hasBoundaries() { return hasBoundaries; } + public net.osmand.binary.OsmandOdb.OsmAndTileBox getBoundaries() { return boundaries_; } // repeated .OsmAndCategoryTable categoriesTable = 3; public static final int CATEGORIESTABLE_FIELD_NUMBER = 3; - private java.util.List categoriesTable_; + private java.util.List categoriesTable_ = + java.util.Collections.emptyList(); public java.util.List getCategoriesTableList() { return categoriesTable_; } - public java.util.List - getCategoriesTableOrBuilderList() { - return categoriesTable_; - } - public int getCategoriesTableCount() { - return categoriesTable_.size(); - } + public int getCategoriesTableCount() { return categoriesTable_.size(); } public net.osmand.binary.OsmandOdb.OsmAndCategoryTable getCategoriesTable(int index) { return categoriesTable_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndCategoryTableOrBuilder getCategoriesTableOrBuilder( - int index) { - return categoriesTable_.get(index); - } // optional .OsmAndPoiNameIndex nameIndex = 4; public static final int NAMEINDEX_FIELD_NUMBER = 4; + private boolean hasNameIndex; private net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex nameIndex_; - public boolean hasNameIndex() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex getNameIndex() { - return nameIndex_; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexOrBuilder getNameIndexOrBuilder() { - return nameIndex_; - } + public boolean hasNameIndex() { return hasNameIndex; } + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex getNameIndex() { return nameIndex_; } // optional .IndexedStringTable table = 5; public static final int TABLE_FIELD_NUMBER = 5; + private boolean hasTable; private net.osmand.binary.OsmandOdb.IndexedStringTable table_; - public boolean hasTable() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public net.osmand.binary.OsmandOdb.IndexedStringTable getTable() { - return table_; - } - public net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getTableOrBuilder() { - return table_; - } + public boolean hasTable() { return hasTable; } + public net.osmand.binary.OsmandOdb.IndexedStringTable getTable() { return table_; } // repeated .OsmAndPoiBox boxes = 6; public static final int BOXES_FIELD_NUMBER = 6; - private java.util.List boxes_; + private java.util.List boxes_ = + java.util.Collections.emptyList(); public java.util.List getBoxesList() { return boxes_; } - public java.util.List - getBoxesOrBuilderList() { - return boxes_; - } - public int getBoxesCount() { - return boxes_.size(); - } + public int getBoxesCount() { return boxes_.size(); } public net.osmand.binary.OsmandOdb.OsmAndPoiBox getBoxes(int index) { return boxes_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder getBoxesOrBuilder( - int index) { - return boxes_.get(index); - } // repeated .OsmAndPoiBoxData poiData = 9; public static final int POIDATA_FIELD_NUMBER = 9; - private java.util.List poiData_; + private java.util.List poiData_ = + java.util.Collections.emptyList(); public java.util.List getPoiDataList() { return poiData_; } - public java.util.List - getPoiDataOrBuilderList() { - return poiData_; - } - public int getPoiDataCount() { - return poiData_.size(); - } + public int getPoiDataCount() { return poiData_.size(); } public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData getPoiData(int index) { return poiData_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataOrBuilder getPoiDataOrBuilder( - int index) { - return poiData_.get(index); - } private void initFields() { - name_ = ""; boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); - categoriesTable_ = java.util.Collections.emptyList(); nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance(); table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); - boxes_ = java.util.Collections.emptyList(); - poiData_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasName()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasName) return false; + if (!hasBoundaries) return false; + if (!getBoundaries().isInitialized()) return false; + for (net.osmand.binary.OsmandOdb.OsmAndCategoryTable element : getCategoriesTableList()) { + if (!element.isInitialized()) return false; } - if (!hasBoundaries()) { - memoizedIsInitialized = 0; - return false; + for (net.osmand.binary.OsmandOdb.OsmAndPoiBox element : getBoxesList()) { + if (!element.isInitialized()) return false; } - if (!getBoundaries().isInitialized()) { - memoizedIsInitialized = 0; - return false; + for (net.osmand.binary.OsmandOdb.OsmAndPoiBoxData element : getPoiDataList()) { + if (!element.isInitialized()) return false; } - for (int i = 0; i < getCategoriesTableCount(); i++) { - if (!getCategoriesTable(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getBoxesCount(); i++) { - if (!getBoxes(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - for (int i = 0; i < getPoiDataCount(); i++) { - if (!getPoiData(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getNameBytes()); + if (hasName()) { + output.writeString(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeMessage(2, boundaries_); + if (hasBoundaries()) { + output.writeMessage(2, getBoundaries()); } - for (int i = 0; i < categoriesTable_.size(); i++) { - output.writeMessage(3, categoriesTable_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndCategoryTable element : getCategoriesTableList()) { + output.writeMessage(3, element); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeMessage(4, nameIndex_); + if (hasNameIndex()) { + output.writeMessage(4, getNameIndex()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(5, table_); + if (hasTable()) { + output.writeMessage(5, getTable()); } - for (int i = 0; i < boxes_.size(); i++) { - output.writeMessage(6, boxes_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndPoiBox element : getBoxesList()) { + output.writeMessage(6, element); } - for (int i = 0; i < poiData_.size(); i++) { - output.writeMessage(9, poiData_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndPoiBoxData element : getPoiDataList()) { + output.writeMessage(9, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getNameBytes()); + .computeStringSize(1, getName()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasBoundaries()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(2, boundaries_); + .computeMessageSize(2, getBoundaries()); } - for (int i = 0; i < categoriesTable_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndCategoryTable element : getCategoriesTableList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, categoriesTable_.get(i)); + .computeMessageSize(3, element); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasNameIndex()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, nameIndex_); + .computeMessageSize(4, getNameIndex()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasTable()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, table_); + .computeMessageSize(5, getTable()); } - for (int i = 0; i < boxes_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndPoiBox element : getBoxesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(6, boxes_.get(i)); + .computeMessageSize(6, element); } - for (int i = 0; i < poiData_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndPoiBoxData element : getPoiDataList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(9, poiData_.get(i)); + .computeMessageSize(9, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndPoiIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -24091,193 +14647,104 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndPoiIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndPoiIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndPoiIndex result; // Construct using net.osmand.binary.OsmandOdb.OsmAndPoiIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getBoundariesFieldBuilder(); - getCategoriesTableFieldBuilder(); - getNameIndexFieldBuilder(); - getTableFieldBuilder(); - getBoxesFieldBuilder(); - getPoiDataFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndPoiIndex(); + return builder; } - public Builder clear() { - super.clear(); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - if (boundariesBuilder_ == null) { - boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); - } else { - boundariesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); - if (categoriesTableBuilder_ == null) { - categoriesTable_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - } else { - categoriesTableBuilder_.clear(); - } - if (nameIndexBuilder_ == null) { - nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance(); - } else { - nameIndexBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); - if (tableBuilder_ == null) { - table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); - } else { - tableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); - if (boxesBuilder_ == null) { - boxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - } else { - boxesBuilder_.clear(); - } - if (poiDataBuilder_ == null) { - poiData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - } else { - poiDataBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndPoiIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndPoiIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiIndex build() { - net.osmand.binary.OsmandOdb.OsmAndPoiIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndPoiIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndPoiIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiIndex buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndPoiIndex result = new net.osmand.binary.OsmandOdb.OsmAndPoiIndex(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.name_ = name_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.categoriesTable_ != java.util.Collections.EMPTY_LIST) { + result.categoriesTable_ = + java.util.Collections.unmodifiableList(result.categoriesTable_); } - if (boundariesBuilder_ == null) { - result.boundaries_ = boundaries_; - } else { - result.boundaries_ = boundariesBuilder_.build(); + if (result.boxes_ != java.util.Collections.EMPTY_LIST) { + result.boxes_ = + java.util.Collections.unmodifiableList(result.boxes_); } - if (categoriesTableBuilder_ == null) { - if (((bitField0_ & 0x00000004) == 0x00000004)) { - categoriesTable_ = java.util.Collections.unmodifiableList(categoriesTable_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.categoriesTable_ = categoriesTable_; - } else { - result.categoriesTable_ = categoriesTableBuilder_.build(); + if (result.poiData_ != java.util.Collections.EMPTY_LIST) { + result.poiData_ = + java.util.Collections.unmodifiableList(result.poiData_); } - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000004; - } - if (nameIndexBuilder_ == null) { - result.nameIndex_ = nameIndex_; - } else { - result.nameIndex_ = nameIndexBuilder_.build(); - } - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - if (tableBuilder_ == null) { - result.table_ = table_; - } else { - result.table_ = tableBuilder_.build(); - } - if (boxesBuilder_ == null) { - if (((bitField0_ & 0x00000020) == 0x00000020)) { - boxes_ = java.util.Collections.unmodifiableList(boxes_); - bitField0_ = (bitField0_ & ~0x00000020); - } - result.boxes_ = boxes_; - } else { - result.boxes_ = boxesBuilder_.build(); - } - if (poiDataBuilder_ == null) { - if (((bitField0_ & 0x00000040) == 0x00000040)) { - poiData_ = java.util.Collections.unmodifiableList(poiData_); - bitField0_ = (bitField0_ & ~0x00000040); - } - result.poiData_ = poiData_; - } else { - result.poiData_ = poiDataBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndPoiIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndPoiIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndPoiIndex)other); } else { @@ -24294,31 +14761,11 @@ public final class OsmandOdb { if (other.hasBoundaries()) { mergeBoundaries(other.getBoundaries()); } - if (categoriesTableBuilder_ == null) { - if (!other.categoriesTable_.isEmpty()) { - if (categoriesTable_.isEmpty()) { - categoriesTable_ = other.categoriesTable_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureCategoriesTableIsMutable(); - categoriesTable_.addAll(other.categoriesTable_); - } - onChanged(); - } - } else { - if (!other.categoriesTable_.isEmpty()) { - if (categoriesTableBuilder_.isEmpty()) { - categoriesTableBuilder_.dispose(); - categoriesTableBuilder_ = null; - categoriesTable_ = other.categoriesTable_; - bitField0_ = (bitField0_ & ~0x00000004); - categoriesTableBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getCategoriesTableFieldBuilder() : null; - } else { - categoriesTableBuilder_.addAllMessages(other.categoriesTable_); - } + if (!other.categoriesTable_.isEmpty()) { + if (result.categoriesTable_.isEmpty()) { + result.categoriesTable_ = new java.util.ArrayList(); } + result.categoriesTable_.addAll(other.categoriesTable_); } if (other.hasNameIndex()) { mergeNameIndex(other.getNameIndex()); @@ -24326,97 +14773,24 @@ public final class OsmandOdb { if (other.hasTable()) { mergeTable(other.getTable()); } - if (boxesBuilder_ == null) { - if (!other.boxes_.isEmpty()) { - if (boxes_.isEmpty()) { - boxes_ = other.boxes_; - bitField0_ = (bitField0_ & ~0x00000020); - } else { - ensureBoxesIsMutable(); - boxes_.addAll(other.boxes_); - } - onChanged(); - } - } else { - if (!other.boxes_.isEmpty()) { - if (boxesBuilder_.isEmpty()) { - boxesBuilder_.dispose(); - boxesBuilder_ = null; - boxes_ = other.boxes_; - bitField0_ = (bitField0_ & ~0x00000020); - boxesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getBoxesFieldBuilder() : null; - } else { - boxesBuilder_.addAllMessages(other.boxes_); - } + if (!other.boxes_.isEmpty()) { + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + result.boxes_.addAll(other.boxes_); } - if (poiDataBuilder_ == null) { - if (!other.poiData_.isEmpty()) { - if (poiData_.isEmpty()) { - poiData_ = other.poiData_; - bitField0_ = (bitField0_ & ~0x00000040); - } else { - ensurePoiDataIsMutable(); - poiData_.addAll(other.poiData_); - } - onChanged(); - } - } else { - if (!other.poiData_.isEmpty()) { - if (poiDataBuilder_.isEmpty()) { - poiDataBuilder_.dispose(); - poiDataBuilder_ = null; - poiData_ = other.poiData_; - bitField0_ = (bitField0_ & ~0x00000040); - poiDataBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getPoiDataFieldBuilder() : null; - } else { - poiDataBuilder_.addAllMessages(other.poiData_); - } + if (!other.poiData_.isEmpty()) { + if (result.poiData_.isEmpty()) { + result.poiData_ = new java.util.ArrayList(); } + result.poiData_.addAll(other.poiData_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasName()) { - - return false; - } - if (!hasBoundaries()) { - - return false; - } - if (!getBoundaries().isInitialized()) { - - return false; - } - for (int i = 0; i < getCategoriesTableCount(); i++) { - if (!getCategoriesTable(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getBoxesCount(); i++) { - if (!getBoxes(i).isInitialized()) { - - return false; - } - } - for (int i = 0; i < getPoiDataCount(); i++) { - if (!getPoiData(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -24428,20 +14802,17 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - name_ = input.readBytes(); + setName(input.readString()); break; } case 18: { @@ -24493,902 +14864,309 @@ public final class OsmandOdb { } } - private int bitField0_; // required string name = 1; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000001); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - name_ = value; - onChanged(); - } // required .OsmAndTileBox boundaries = 2; - private net.osmand.binary.OsmandOdb.OsmAndTileBox boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTileBox, net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder, net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder> boundariesBuilder_; public boolean hasBoundaries() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasBoundaries(); } public net.osmand.binary.OsmandOdb.OsmAndTileBox getBoundaries() { - if (boundariesBuilder_ == null) { - return boundaries_; - } else { - return boundariesBuilder_.getMessage(); - } + return result.getBoundaries(); } public Builder setBoundaries(net.osmand.binary.OsmandOdb.OsmAndTileBox value) { - if (boundariesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - boundaries_ = value; - onChanged(); - } else { - boundariesBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000002; + result.hasBoundaries = true; + result.boundaries_ = value; return this; } - public Builder setBoundaries( - net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder builderForValue) { - if (boundariesBuilder_ == null) { - boundaries_ = builderForValue.build(); - onChanged(); - } else { - boundariesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000002; + public Builder setBoundaries(net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder builderForValue) { + result.hasBoundaries = true; + result.boundaries_ = builderForValue.build(); return this; } public Builder mergeBoundaries(net.osmand.binary.OsmandOdb.OsmAndTileBox value) { - if (boundariesBuilder_ == null) { - if (((bitField0_ & 0x00000002) == 0x00000002) && - boundaries_ != net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance()) { - boundaries_ = - net.osmand.binary.OsmandOdb.OsmAndTileBox.newBuilder(boundaries_).mergeFrom(value).buildPartial(); - } else { - boundaries_ = value; - } - onChanged(); + if (result.hasBoundaries() && + result.boundaries_ != net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance()) { + result.boundaries_ = + net.osmand.binary.OsmandOdb.OsmAndTileBox.newBuilder(result.boundaries_).mergeFrom(value).buildPartial(); } else { - boundariesBuilder_.mergeFrom(value); + result.boundaries_ = value; } - bitField0_ |= 0x00000002; + result.hasBoundaries = true; return this; } public Builder clearBoundaries() { - if (boundariesBuilder_ == null) { - boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); - onChanged(); - } else { - boundariesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000002); + result.hasBoundaries = false; + result.boundaries_ = net.osmand.binary.OsmandOdb.OsmAndTileBox.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder getBoundariesBuilder() { - bitField0_ |= 0x00000002; - onChanged(); - return getBoundariesFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder getBoundariesOrBuilder() { - if (boundariesBuilder_ != null) { - return boundariesBuilder_.getMessageOrBuilder(); - } else { - return boundaries_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTileBox, net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder, net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder> - getBoundariesFieldBuilder() { - if (boundariesBuilder_ == null) { - boundariesBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndTileBox, net.osmand.binary.OsmandOdb.OsmAndTileBox.Builder, net.osmand.binary.OsmandOdb.OsmAndTileBoxOrBuilder>( - boundaries_, - getParentForChildren(), - isClean()); - boundaries_ = null; - } - return boundariesBuilder_; - } // repeated .OsmAndCategoryTable categoriesTable = 3; - private java.util.List categoriesTable_ = - java.util.Collections.emptyList(); - private void ensureCategoriesTableIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - categoriesTable_ = new java.util.ArrayList(categoriesTable_); - bitField0_ |= 0x00000004; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndCategoryTable, net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder, net.osmand.binary.OsmandOdb.OsmAndCategoryTableOrBuilder> categoriesTableBuilder_; - public java.util.List getCategoriesTableList() { - if (categoriesTableBuilder_ == null) { - return java.util.Collections.unmodifiableList(categoriesTable_); - } else { - return categoriesTableBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.categoriesTable_); } public int getCategoriesTableCount() { - if (categoriesTableBuilder_ == null) { - return categoriesTable_.size(); - } else { - return categoriesTableBuilder_.getCount(); - } + return result.getCategoriesTableCount(); } public net.osmand.binary.OsmandOdb.OsmAndCategoryTable getCategoriesTable(int index) { - if (categoriesTableBuilder_ == null) { - return categoriesTable_.get(index); - } else { - return categoriesTableBuilder_.getMessage(index); - } + return result.getCategoriesTable(index); } - public Builder setCategoriesTable( - int index, net.osmand.binary.OsmandOdb.OsmAndCategoryTable value) { - if (categoriesTableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesTableIsMutable(); - categoriesTable_.set(index, value); - onChanged(); - } else { - categoriesTableBuilder_.setMessage(index, value); + public Builder setCategoriesTable(int index, net.osmand.binary.OsmandOdb.OsmAndCategoryTable value) { + if (value == null) { + throw new NullPointerException(); } + result.categoriesTable_.set(index, value); return this; } - public Builder setCategoriesTable( - int index, net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder builderForValue) { - if (categoriesTableBuilder_ == null) { - ensureCategoriesTableIsMutable(); - categoriesTable_.set(index, builderForValue.build()); - onChanged(); - } else { - categoriesTableBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setCategoriesTable(int index, net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder builderForValue) { + result.categoriesTable_.set(index, builderForValue.build()); return this; } public Builder addCategoriesTable(net.osmand.binary.OsmandOdb.OsmAndCategoryTable value) { - if (categoriesTableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesTableIsMutable(); - categoriesTable_.add(value); - onChanged(); - } else { - categoriesTableBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.categoriesTable_.isEmpty()) { + result.categoriesTable_ = new java.util.ArrayList(); + } + result.categoriesTable_.add(value); return this; } - public Builder addCategoriesTable( - int index, net.osmand.binary.OsmandOdb.OsmAndCategoryTable value) { - if (categoriesTableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureCategoriesTableIsMutable(); - categoriesTable_.add(index, value); - onChanged(); - } else { - categoriesTableBuilder_.addMessage(index, value); - } - return this; - } - public Builder addCategoriesTable( - net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder builderForValue) { - if (categoriesTableBuilder_ == null) { - ensureCategoriesTableIsMutable(); - categoriesTable_.add(builderForValue.build()); - onChanged(); - } else { - categoriesTableBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addCategoriesTable( - int index, net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder builderForValue) { - if (categoriesTableBuilder_ == null) { - ensureCategoriesTableIsMutable(); - categoriesTable_.add(index, builderForValue.build()); - onChanged(); - } else { - categoriesTableBuilder_.addMessage(index, builderForValue.build()); + public Builder addCategoriesTable(net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder builderForValue) { + if (result.categoriesTable_.isEmpty()) { + result.categoriesTable_ = new java.util.ArrayList(); } + result.categoriesTable_.add(builderForValue.build()); return this; } public Builder addAllCategoriesTable( java.lang.Iterable values) { - if (categoriesTableBuilder_ == null) { - ensureCategoriesTableIsMutable(); - super.addAll(values, categoriesTable_); - onChanged(); - } else { - categoriesTableBuilder_.addAllMessages(values); + if (result.categoriesTable_.isEmpty()) { + result.categoriesTable_ = new java.util.ArrayList(); } + super.addAll(values, result.categoriesTable_); return this; } public Builder clearCategoriesTable() { - if (categoriesTableBuilder_ == null) { - categoriesTable_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); - } else { - categoriesTableBuilder_.clear(); - } + result.categoriesTable_ = java.util.Collections.emptyList(); return this; } - public Builder removeCategoriesTable(int index) { - if (categoriesTableBuilder_ == null) { - ensureCategoriesTableIsMutable(); - categoriesTable_.remove(index); - onChanged(); - } else { - categoriesTableBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder getCategoriesTableBuilder( - int index) { - return getCategoriesTableFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndCategoryTableOrBuilder getCategoriesTableOrBuilder( - int index) { - if (categoriesTableBuilder_ == null) { - return categoriesTable_.get(index); } else { - return categoriesTableBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getCategoriesTableOrBuilderList() { - if (categoriesTableBuilder_ != null) { - return categoriesTableBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(categoriesTable_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder addCategoriesTableBuilder() { - return getCategoriesTableFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndCategoryTable.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder addCategoriesTableBuilder( - int index) { - return getCategoriesTableFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndCategoryTable.getDefaultInstance()); - } - public java.util.List - getCategoriesTableBuilderList() { - return getCategoriesTableFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndCategoryTable, net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder, net.osmand.binary.OsmandOdb.OsmAndCategoryTableOrBuilder> - getCategoriesTableFieldBuilder() { - if (categoriesTableBuilder_ == null) { - categoriesTableBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndCategoryTable, net.osmand.binary.OsmandOdb.OsmAndCategoryTable.Builder, net.osmand.binary.OsmandOdb.OsmAndCategoryTableOrBuilder>( - categoriesTable_, - ((bitField0_ & 0x00000004) == 0x00000004), - getParentForChildren(), - isClean()); - categoriesTable_ = null; - } - return categoriesTableBuilder_; - } // optional .OsmAndPoiNameIndex nameIndex = 4; - private net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexOrBuilder> nameIndexBuilder_; public boolean hasNameIndex() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasNameIndex(); } public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex getNameIndex() { - if (nameIndexBuilder_ == null) { - return nameIndex_; - } else { - return nameIndexBuilder_.getMessage(); - } + return result.getNameIndex(); } public Builder setNameIndex(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex value) { - if (nameIndexBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - nameIndex_ = value; - onChanged(); - } else { - nameIndexBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000008; + result.hasNameIndex = true; + result.nameIndex_ = value; return this; } - public Builder setNameIndex( - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.Builder builderForValue) { - if (nameIndexBuilder_ == null) { - nameIndex_ = builderForValue.build(); - onChanged(); - } else { - nameIndexBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; + public Builder setNameIndex(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.Builder builderForValue) { + result.hasNameIndex = true; + result.nameIndex_ = builderForValue.build(); return this; } public Builder mergeNameIndex(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex value) { - if (nameIndexBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - nameIndex_ != net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance()) { - nameIndex_ = - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.newBuilder(nameIndex_).mergeFrom(value).buildPartial(); - } else { - nameIndex_ = value; - } - onChanged(); + if (result.hasNameIndex() && + result.nameIndex_ != net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance()) { + result.nameIndex_ = + net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.newBuilder(result.nameIndex_).mergeFrom(value).buildPartial(); } else { - nameIndexBuilder_.mergeFrom(value); + result.nameIndex_ = value; } - bitField0_ |= 0x00000008; + result.hasNameIndex = true; return this; } public Builder clearNameIndex() { - if (nameIndexBuilder_ == null) { - nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance(); - onChanged(); - } else { - nameIndexBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); + result.hasNameIndex = false; + result.nameIndex_ = net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.Builder getNameIndexBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getNameIndexFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexOrBuilder getNameIndexOrBuilder() { - if (nameIndexBuilder_ != null) { - return nameIndexBuilder_.getMessageOrBuilder(); - } else { - return nameIndex_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexOrBuilder> - getNameIndexFieldBuilder() { - if (nameIndexBuilder_ == null) { - nameIndexBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexOrBuilder>( - nameIndex_, - getParentForChildren(), - isClean()); - nameIndex_ = null; - } - return nameIndexBuilder_; - } // optional .IndexedStringTable table = 5; - private net.osmand.binary.OsmandOdb.IndexedStringTable table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder> tableBuilder_; public boolean hasTable() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasTable(); } public net.osmand.binary.OsmandOdb.IndexedStringTable getTable() { - if (tableBuilder_ == null) { - return table_; - } else { - return tableBuilder_.getMessage(); - } + return result.getTable(); } public Builder setTable(net.osmand.binary.OsmandOdb.IndexedStringTable value) { - if (tableBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - table_ = value; - onChanged(); - } else { - tableBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000010; + result.hasTable = true; + result.table_ = value; return this; } - public Builder setTable( - net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { - if (tableBuilder_ == null) { - table_ = builderForValue.build(); - onChanged(); - } else { - tableBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000010; + public Builder setTable(net.osmand.binary.OsmandOdb.IndexedStringTable.Builder builderForValue) { + result.hasTable = true; + result.table_ = builderForValue.build(); return this; } public Builder mergeTable(net.osmand.binary.OsmandOdb.IndexedStringTable value) { - if (tableBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010) && - table_ != net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance()) { - table_ = - net.osmand.binary.OsmandOdb.IndexedStringTable.newBuilder(table_).mergeFrom(value).buildPartial(); - } else { - table_ = value; - } - onChanged(); + if (result.hasTable() && + result.table_ != net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance()) { + result.table_ = + net.osmand.binary.OsmandOdb.IndexedStringTable.newBuilder(result.table_).mergeFrom(value).buildPartial(); } else { - tableBuilder_.mergeFrom(value); + result.table_ = value; } - bitField0_ |= 0x00000010; + result.hasTable = true; return this; } public Builder clearTable() { - if (tableBuilder_ == null) { - table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); - onChanged(); - } else { - tableBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000010); + result.hasTable = false; + result.table_ = net.osmand.binary.OsmandOdb.IndexedStringTable.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.IndexedStringTable.Builder getTableBuilder() { - bitField0_ |= 0x00000010; - onChanged(); - return getTableFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder getTableOrBuilder() { - if (tableBuilder_ != null) { - return tableBuilder_.getMessageOrBuilder(); - } else { - return table_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder> - getTableFieldBuilder() { - if (tableBuilder_ == null) { - tableBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.IndexedStringTable, net.osmand.binary.OsmandOdb.IndexedStringTable.Builder, net.osmand.binary.OsmandOdb.IndexedStringTableOrBuilder>( - table_, - getParentForChildren(), - isClean()); - table_ = null; - } - return tableBuilder_; - } // repeated .OsmAndPoiBox boxes = 6; - private java.util.List boxes_ = - java.util.Collections.emptyList(); - private void ensureBoxesIsMutable() { - if (!((bitField0_ & 0x00000020) == 0x00000020)) { - boxes_ = new java.util.ArrayList(boxes_); - bitField0_ |= 0x00000020; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBox, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder> boxesBuilder_; - public java.util.List getBoxesList() { - if (boxesBuilder_ == null) { - return java.util.Collections.unmodifiableList(boxes_); - } else { - return boxesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.boxes_); } public int getBoxesCount() { - if (boxesBuilder_ == null) { - return boxes_.size(); - } else { - return boxesBuilder_.getCount(); - } + return result.getBoxesCount(); } public net.osmand.binary.OsmandOdb.OsmAndPoiBox getBoxes(int index) { - if (boxesBuilder_ == null) { - return boxes_.get(index); - } else { - return boxesBuilder_.getMessage(index); - } + return result.getBoxes(index); } - public Builder setBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.set(index, value); - onChanged(); - } else { - boxesBuilder_.setMessage(index, value); + public Builder setBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox value) { + if (value == null) { + throw new NullPointerException(); } + result.boxes_.set(index, value); return this; } - public Builder setBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.set(index, builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { + result.boxes_.set(index, builderForValue.build()); return this; } public Builder addBoxes(net.osmand.binary.OsmandOdb.OsmAndPoiBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.add(value); - onChanged(); - } else { - boxesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); + } + result.boxes_.add(value); return this; } - public Builder addBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox value) { - if (boxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureBoxesIsMutable(); - boxes_.add(index, value); - onChanged(); - } else { - boxesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addBoxes( - net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.add(builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.add(index, builderForValue.build()); - onChanged(); - } else { - boxesBuilder_.addMessage(index, builderForValue.build()); + public Builder addBoxes(net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + result.boxes_.add(builderForValue.build()); return this; } public Builder addAllBoxes( java.lang.Iterable values) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - super.addAll(values, boxes_); - onChanged(); - } else { - boxesBuilder_.addAllMessages(values); + if (result.boxes_.isEmpty()) { + result.boxes_ = new java.util.ArrayList(); } + super.addAll(values, result.boxes_); return this; } public Builder clearBoxes() { - if (boxesBuilder_ == null) { - boxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000020); - onChanged(); - } else { - boxesBuilder_.clear(); - } + result.boxes_ = java.util.Collections.emptyList(); return this; } - public Builder removeBoxes(int index) { - if (boxesBuilder_ == null) { - ensureBoxesIsMutable(); - boxes_.remove(index); - onChanged(); - } else { - boxesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder getBoxesBuilder( - int index) { - return getBoxesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder getBoxesOrBuilder( - int index) { - if (boxesBuilder_ == null) { - return boxes_.get(index); } else { - return boxesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getBoxesOrBuilderList() { - if (boxesBuilder_ != null) { - return boxesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(boxes_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder addBoxesBuilder() { - return getBoxesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndPoiBox.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder addBoxesBuilder( - int index) { - return getBoxesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndPoiBox.getDefaultInstance()); - } - public java.util.List - getBoxesBuilderList() { - return getBoxesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBox, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder> - getBoxesFieldBuilder() { - if (boxesBuilder_ == null) { - boxesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBox, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder>( - boxes_, - ((bitField0_ & 0x00000020) == 0x00000020), - getParentForChildren(), - isClean()); - boxes_ = null; - } - return boxesBuilder_; - } // repeated .OsmAndPoiBoxData poiData = 9; - private java.util.List poiData_ = - java.util.Collections.emptyList(); - private void ensurePoiDataIsMutable() { - if (!((bitField0_ & 0x00000040) == 0x00000040)) { - poiData_ = new java.util.ArrayList(poiData_); - bitField0_ |= 0x00000040; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataOrBuilder> poiDataBuilder_; - public java.util.List getPoiDataList() { - if (poiDataBuilder_ == null) { - return java.util.Collections.unmodifiableList(poiData_); - } else { - return poiDataBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.poiData_); } public int getPoiDataCount() { - if (poiDataBuilder_ == null) { - return poiData_.size(); - } else { - return poiDataBuilder_.getCount(); - } + return result.getPoiDataCount(); } public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData getPoiData(int index) { - if (poiDataBuilder_ == null) { - return poiData_.get(index); - } else { - return poiDataBuilder_.getMessage(index); - } + return result.getPoiData(index); } - public Builder setPoiData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData value) { - if (poiDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiDataIsMutable(); - poiData_.set(index, value); - onChanged(); - } else { - poiDataBuilder_.setMessage(index, value); + public Builder setPoiData(int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData value) { + if (value == null) { + throw new NullPointerException(); } + result.poiData_.set(index, value); return this; } - public Builder setPoiData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder builderForValue) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - poiData_.set(index, builderForValue.build()); - onChanged(); - } else { - poiDataBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setPoiData(int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder builderForValue) { + result.poiData_.set(index, builderForValue.build()); return this; } public Builder addPoiData(net.osmand.binary.OsmandOdb.OsmAndPoiBoxData value) { - if (poiDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiDataIsMutable(); - poiData_.add(value); - onChanged(); - } else { - poiDataBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.poiData_.isEmpty()) { + result.poiData_ = new java.util.ArrayList(); + } + result.poiData_.add(value); return this; } - public Builder addPoiData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData value) { - if (poiDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiDataIsMutable(); - poiData_.add(index, value); - onChanged(); - } else { - poiDataBuilder_.addMessage(index, value); - } - return this; - } - public Builder addPoiData( - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder builderForValue) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - poiData_.add(builderForValue.build()); - onChanged(); - } else { - poiDataBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addPoiData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder builderForValue) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - poiData_.add(index, builderForValue.build()); - onChanged(); - } else { - poiDataBuilder_.addMessage(index, builderForValue.build()); + public Builder addPoiData(net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder builderForValue) { + if (result.poiData_.isEmpty()) { + result.poiData_ = new java.util.ArrayList(); } + result.poiData_.add(builderForValue.build()); return this; } public Builder addAllPoiData( java.lang.Iterable values) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - super.addAll(values, poiData_); - onChanged(); - } else { - poiDataBuilder_.addAllMessages(values); + if (result.poiData_.isEmpty()) { + result.poiData_ = new java.util.ArrayList(); } + super.addAll(values, result.poiData_); return this; } public Builder clearPoiData() { - if (poiDataBuilder_ == null) { - poiData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000040); - onChanged(); - } else { - poiDataBuilder_.clear(); - } + result.poiData_ = java.util.Collections.emptyList(); return this; } - public Builder removePoiData(int index) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - poiData_.remove(index); - onChanged(); - } else { - poiDataBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder getPoiDataBuilder( - int index) { - return getPoiDataFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataOrBuilder getPoiDataOrBuilder( - int index) { - if (poiDataBuilder_ == null) { - return poiData_.get(index); } else { - return poiDataBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getPoiDataOrBuilderList() { - if (poiDataBuilder_ != null) { - return poiDataBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(poiData_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder addPoiDataBuilder() { - return getPoiDataFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder addPoiDataBuilder( - int index) { - return getPoiDataFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.getDefaultInstance()); - } - public java.util.List - getPoiDataBuilderList() { - return getPoiDataFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataOrBuilder> - getPoiDataFieldBuilder() { - if (poiDataBuilder_ == null) { - poiDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData, net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataOrBuilder>( - poiData_, - ((bitField0_ & 0x00000040) == 0x00000040), - getParentForChildren(), - isClean()); - poiData_ = null; - } - return poiDataBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndPoiIndex) } static { defaultInstance = new OsmAndPoiIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndPoiIndex) } - public interface OsmAndPoiNameIndexOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .OsmAndPoiNameIndex.OsmAndPoiNameIndexData data = 3; - java.util.List - getDataList(); - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData getData(int index); - int getDataCount(); - java.util.List - getDataOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexDataOrBuilder getDataOrBuilder( - int index); - } public static final class OsmAndPoiNameIndex extends - com.google.protobuf.GeneratedMessage - implements OsmAndPoiNameIndexOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndPoiNameIndex.newBuilder() to construct. - private OsmAndPoiNameIndex(Builder builder) { - super(builder); + private OsmAndPoiNameIndex() { + initFields(); } private OsmAndPoiNameIndex(boolean noInit) {} @@ -25397,7 +15175,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndPoiNameIndex getDefaultInstanceForType() { + @Override + public OsmAndPoiNameIndex getDefaultInstanceForType() { return defaultInstance; } @@ -25406,30 +15185,17 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndex_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndex_fieldAccessorTable; } - public interface OsmAndPoiNameIndexDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated .OsmAndPoiNameIndexDataAtom atoms = 3; - java.util.List - getAtomsList(); - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom getAtoms(int index); - int getAtomsCount(); - java.util.List - getAtomsOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtomOrBuilder getAtomsOrBuilder( - int index); - } public static final class OsmAndPoiNameIndexData extends - com.google.protobuf.GeneratedMessage - implements OsmAndPoiNameIndexDataOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndPoiNameIndexData.newBuilder() to construct. - private OsmAndPoiNameIndexData(Builder builder) { - super(builder); + private OsmAndPoiNameIndexData() { + initFields(); } private OsmAndPoiNameIndexData(boolean noInit) {} @@ -25438,7 +15204,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndPoiNameIndexData getDefaultInstanceForType() { + @Override + public OsmAndPoiNameIndexData getDefaultInstanceForType() { return defaultInstance; } @@ -25447,75 +15214,57 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndex_OsmAndPoiNameIndexData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndex_OsmAndPoiNameIndexData_fieldAccessorTable; } // repeated .OsmAndPoiNameIndexDataAtom atoms = 3; public static final int ATOMS_FIELD_NUMBER = 3; - private java.util.List atoms_; + private java.util.List atoms_ = + java.util.Collections.emptyList(); public java.util.List getAtomsList() { return atoms_; } - public java.util.List - getAtomsOrBuilderList() { - return atoms_; - } - public int getAtomsCount() { - return atoms_.size(); - } + public int getAtomsCount() { return atoms_.size(); } public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom getAtoms(int index) { return atoms_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtomOrBuilder getAtomsOrBuilder( - int index) { - return atoms_.get(index); - } private void initFields() { - atoms_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < atoms_.size(); i++) { - output.writeMessage(3, atoms_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom element : getAtomsList()) { + output.writeMessage(3, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - for (int i = 0; i < atoms_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom element : getAtomsList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, atoms_.get(i)); + .computeMessageSize(3, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -25584,108 +15333,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndex_OsmAndPoiNameIndexData_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndex_OsmAndPoiNameIndexData_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData result; // Construct using net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getAtomsFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData(); + return builder; } - public Builder clear() { - super.clear(); - if (atomsBuilder_ == null) { - atoms_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - atomsBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData build() { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData(this); - int from_bitField0_ = bitField0_; - if (atomsBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - atoms_ = java.util.Collections.unmodifiableList(atoms_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.atoms_ = atoms_; - } else { - result.atoms_ = atomsBuilder_.build(); + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - onBuilt(); - return result; + if (result.atoms_ != java.util.Collections.EMPTY_LIST) { + result.atoms_ = + java.util.Collections.unmodifiableList(result.atoms_); + } + net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData)other); } else { @@ -25696,41 +15433,18 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData other) { if (other == net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.getDefaultInstance()) return this; - if (atomsBuilder_ == null) { - if (!other.atoms_.isEmpty()) { - if (atoms_.isEmpty()) { - atoms_ = other.atoms_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureAtomsIsMutable(); - atoms_.addAll(other.atoms_); - } - onChanged(); - } - } else { - if (!other.atoms_.isEmpty()) { - if (atomsBuilder_.isEmpty()) { - atomsBuilder_.dispose(); - atomsBuilder_ = null; - atoms_ = other.atoms_; - bitField0_ = (bitField0_ & ~0x00000001); - atomsBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getAtomsFieldBuilder() : null; - } else { - atomsBuilder_.addAllMessages(other.atoms_); - } + if (!other.atoms_.isEmpty()) { + if (result.atoms_.isEmpty()) { + result.atoms_ = new java.util.ArrayList(); } + result.atoms_.addAll(other.atoms_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -25742,13 +15456,11 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; @@ -25763,199 +15475,64 @@ public final class OsmandOdb { } } - private int bitField0_; // repeated .OsmAndPoiNameIndexDataAtom atoms = 3; - private java.util.List atoms_ = - java.util.Collections.emptyList(); - private void ensureAtomsIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - atoms_ = new java.util.ArrayList(atoms_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtomOrBuilder> atomsBuilder_; - public java.util.List getAtomsList() { - if (atomsBuilder_ == null) { - return java.util.Collections.unmodifiableList(atoms_); - } else { - return atomsBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.atoms_); } public int getAtomsCount() { - if (atomsBuilder_ == null) { - return atoms_.size(); - } else { - return atomsBuilder_.getCount(); - } + return result.getAtomsCount(); } public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom getAtoms(int index) { - if (atomsBuilder_ == null) { - return atoms_.get(index); - } else { - return atomsBuilder_.getMessage(index); - } + return result.getAtoms(index); } - public Builder setAtoms( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom value) { - if (atomsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomsIsMutable(); - atoms_.set(index, value); - onChanged(); - } else { - atomsBuilder_.setMessage(index, value); + public Builder setAtoms(int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom value) { + if (value == null) { + throw new NullPointerException(); } + result.atoms_.set(index, value); return this; } - public Builder setAtoms( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder builderForValue) { - if (atomsBuilder_ == null) { - ensureAtomsIsMutable(); - atoms_.set(index, builderForValue.build()); - onChanged(); - } else { - atomsBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setAtoms(int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder builderForValue) { + result.atoms_.set(index, builderForValue.build()); return this; } public Builder addAtoms(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom value) { - if (atomsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomsIsMutable(); - atoms_.add(value); - onChanged(); - } else { - atomsBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.atoms_.isEmpty()) { + result.atoms_ = new java.util.ArrayList(); + } + result.atoms_.add(value); return this; } - public Builder addAtoms( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom value) { - if (atomsBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureAtomsIsMutable(); - atoms_.add(index, value); - onChanged(); - } else { - atomsBuilder_.addMessage(index, value); - } - return this; - } - public Builder addAtoms( - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder builderForValue) { - if (atomsBuilder_ == null) { - ensureAtomsIsMutable(); - atoms_.add(builderForValue.build()); - onChanged(); - } else { - atomsBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addAtoms( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder builderForValue) { - if (atomsBuilder_ == null) { - ensureAtomsIsMutable(); - atoms_.add(index, builderForValue.build()); - onChanged(); - } else { - atomsBuilder_.addMessage(index, builderForValue.build()); + public Builder addAtoms(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder builderForValue) { + if (result.atoms_.isEmpty()) { + result.atoms_ = new java.util.ArrayList(); } + result.atoms_.add(builderForValue.build()); return this; } public Builder addAllAtoms( java.lang.Iterable values) { - if (atomsBuilder_ == null) { - ensureAtomsIsMutable(); - super.addAll(values, atoms_); - onChanged(); - } else { - atomsBuilder_.addAllMessages(values); + if (result.atoms_.isEmpty()) { + result.atoms_ = new java.util.ArrayList(); } + super.addAll(values, result.atoms_); return this; } public Builder clearAtoms() { - if (atomsBuilder_ == null) { - atoms_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - atomsBuilder_.clear(); - } + result.atoms_ = java.util.Collections.emptyList(); return this; } - public Builder removeAtoms(int index) { - if (atomsBuilder_ == null) { - ensureAtomsIsMutable(); - atoms_.remove(index); - onChanged(); - } else { - atomsBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder getAtomsBuilder( - int index) { - return getAtomsFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtomOrBuilder getAtomsOrBuilder( - int index) { - if (atomsBuilder_ == null) { - return atoms_.get(index); } else { - return atomsBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getAtomsOrBuilderList() { - if (atomsBuilder_ != null) { - return atomsBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(atoms_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder addAtomsBuilder() { - return getAtomsFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder addAtomsBuilder( - int index) { - return getAtomsFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.getDefaultInstance()); - } - public java.util.List - getAtomsBuilderList() { - return getAtomsFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtomOrBuilder> - getAtomsFieldBuilder() { - if (atomsBuilder_ == null) { - atomsBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtomOrBuilder>( - atoms_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - atoms_ = null; - } - return atomsBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndPoiNameIndex.OsmAndPoiNameIndexData) } static { defaultInstance = new OsmAndPoiNameIndexData(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } @@ -25964,68 +15541,49 @@ public final class OsmandOdb { // repeated .OsmAndPoiNameIndex.OsmAndPoiNameIndexData data = 3; public static final int DATA_FIELD_NUMBER = 3; - private java.util.List data_; + private java.util.List data_ = + java.util.Collections.emptyList(); public java.util.List getDataList() { return data_; } - public java.util.List - getDataOrBuilderList() { - return data_; - } - public int getDataCount() { - return data_.size(); - } + public int getDataCount() { return data_.size(); } public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData getData(int index) { return data_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexDataOrBuilder getDataOrBuilder( - int index) { - return data_.get(index); - } private void initFields() { - data_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < data_.size(); i++) { - output.writeMessage(3, data_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData element : getDataList()) { + output.writeMessage(3, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - for (int i = 0; i < data_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData element : getDataList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(3, data_.get(i)); + .computeMessageSize(3, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -26094,108 +15652,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndex_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndex_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex result; // Construct using net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getDataFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex(); + return builder; } - public Builder clear() { - super.clear(); - if (dataBuilder_ == null) { - data_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - } else { - dataBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex build() { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex(this); - int from_bitField0_ = bitField0_; - if (dataBuilder_ == null) { - if (((bitField0_ & 0x00000001) == 0x00000001)) { - data_ = java.util.Collections.unmodifiableList(data_); - bitField0_ = (bitField0_ & ~0x00000001); - } - result.data_ = data_; - } else { - result.data_ = dataBuilder_.build(); + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - onBuilt(); - return result; + if (result.data_ != java.util.Collections.EMPTY_LIST) { + result.data_ = + java.util.Collections.unmodifiableList(result.data_); + } + net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex)other); } else { @@ -26206,41 +15752,18 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex other) { if (other == net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.getDefaultInstance()) return this; - if (dataBuilder_ == null) { - if (!other.data_.isEmpty()) { - if (data_.isEmpty()) { - data_ = other.data_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureDataIsMutable(); - data_.addAll(other.data_); - } - onChanged(); - } - } else { - if (!other.data_.isEmpty()) { - if (dataBuilder_.isEmpty()) { - dataBuilder_.dispose(); - dataBuilder_ = null; - data_ = other.data_; - bitField0_ = (bitField0_ & ~0x00000001); - dataBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getDataFieldBuilder() : null; - } else { - dataBuilder_.addAllMessages(other.data_); - } + if (!other.data_.isEmpty()) { + if (result.data_.isEmpty()) { + result.data_ = new java.util.ArrayList(); } + result.data_.addAll(other.data_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -26252,13 +15775,11 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; @@ -26273,230 +15794,75 @@ public final class OsmandOdb { } } - private int bitField0_; // repeated .OsmAndPoiNameIndex.OsmAndPoiNameIndexData data = 3; - private java.util.List data_ = - java.util.Collections.emptyList(); - private void ensureDataIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - data_ = new java.util.ArrayList(data_); - bitField0_ |= 0x00000001; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexDataOrBuilder> dataBuilder_; - public java.util.List getDataList() { - if (dataBuilder_ == null) { - return java.util.Collections.unmodifiableList(data_); - } else { - return dataBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.data_); } public int getDataCount() { - if (dataBuilder_ == null) { - return data_.size(); - } else { - return dataBuilder_.getCount(); - } + return result.getDataCount(); } public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData getData(int index) { - if (dataBuilder_ == null) { - return data_.get(index); - } else { - return dataBuilder_.getMessage(index); - } + return result.getData(index); } - public Builder setData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataIsMutable(); - data_.set(index, value); - onChanged(); - } else { - dataBuilder_.setMessage(index, value); + public Builder setData(int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData value) { + if (value == null) { + throw new NullPointerException(); } + result.data_.set(index, value); return this; } - public Builder setData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder builderForValue) { - if (dataBuilder_ == null) { - ensureDataIsMutable(); - data_.set(index, builderForValue.build()); - onChanged(); - } else { - dataBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setData(int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder builderForValue) { + result.data_.set(index, builderForValue.build()); return this; } public Builder addData(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataIsMutable(); - data_.add(value); - onChanged(); - } else { - dataBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.data_.isEmpty()) { + result.data_ = new java.util.ArrayList(); + } + result.data_.add(value); return this; } - public Builder addData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData value) { - if (dataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureDataIsMutable(); - data_.add(index, value); - onChanged(); - } else { - dataBuilder_.addMessage(index, value); - } - return this; - } - public Builder addData( - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder builderForValue) { - if (dataBuilder_ == null) { - ensureDataIsMutable(); - data_.add(builderForValue.build()); - onChanged(); - } else { - dataBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder builderForValue) { - if (dataBuilder_ == null) { - ensureDataIsMutable(); - data_.add(index, builderForValue.build()); - onChanged(); - } else { - dataBuilder_.addMessage(index, builderForValue.build()); + public Builder addData(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder builderForValue) { + if (result.data_.isEmpty()) { + result.data_ = new java.util.ArrayList(); } + result.data_.add(builderForValue.build()); return this; } public Builder addAllData( java.lang.Iterable values) { - if (dataBuilder_ == null) { - ensureDataIsMutable(); - super.addAll(values, data_); - onChanged(); - } else { - dataBuilder_.addAllMessages(values); + if (result.data_.isEmpty()) { + result.data_ = new java.util.ArrayList(); } + super.addAll(values, result.data_); return this; } public Builder clearData() { - if (dataBuilder_ == null) { - data_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); - } else { - dataBuilder_.clear(); - } + result.data_ = java.util.Collections.emptyList(); return this; } - public Builder removeData(int index) { - if (dataBuilder_ == null) { - ensureDataIsMutable(); - data_.remove(index); - onChanged(); - } else { - dataBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder getDataBuilder( - int index) { - return getDataFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexDataOrBuilder getDataOrBuilder( - int index) { - if (dataBuilder_ == null) { - return data_.get(index); } else { - return dataBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getDataOrBuilderList() { - if (dataBuilder_ != null) { - return dataBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(data_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder addDataBuilder() { - return getDataFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder addDataBuilder( - int index) { - return getDataFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.getDefaultInstance()); - } - public java.util.List - getDataBuilderList() { - return getDataFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexDataOrBuilder> - getDataFieldBuilder() { - if (dataBuilder_ == null) { - dataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexData.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiNameIndex.OsmAndPoiNameIndexDataOrBuilder>( - data_, - ((bitField0_ & 0x00000001) == 0x00000001), - getParentForChildren(), - isClean()); - data_ = null; - } - return dataBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndPoiNameIndex) } static { defaultInstance = new OsmAndPoiNameIndex(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndPoiNameIndex) } - public interface OsmAndPoiNameIndexDataAtomOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional uint32 zoom = 2; - boolean hasZoom(); - int getZoom(); - - // optional uint32 x = 3; - boolean hasX(); - int getX(); - - // optional uint32 y = 4; - boolean hasY(); - int getY(); - - // optional fixed32 shiftTo = 14; - boolean hasShiftTo(); - int getShiftTo(); - } public static final class OsmAndPoiNameIndexDataAtom extends - com.google.protobuf.GeneratedMessage - implements OsmAndPoiNameIndexDataAtomOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndPoiNameIndexDataAtom.newBuilder() to construct. - private OsmAndPoiNameIndexDataAtom(Builder builder) { - super(builder); + private OsmAndPoiNameIndexDataAtom() { + initFields(); } private OsmAndPoiNameIndexDataAtom(boolean noInit) {} @@ -26505,7 +15871,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndPoiNameIndexDataAtom getDefaultInstanceForType() { + @Override + public OsmAndPoiNameIndexDataAtom getDefaultInstanceForType() { return defaultInstance; } @@ -26514,119 +15881,94 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndexDataAtom_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndexDataAtom_fieldAccessorTable; } - private int bitField0_; // optional uint32 zoom = 2; public static final int ZOOM_FIELD_NUMBER = 2; - private int zoom_; - public boolean hasZoom() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getZoom() { - return zoom_; - } + private boolean hasZoom; + private int zoom_ = 0; + public boolean hasZoom() { return hasZoom; } + public int getZoom() { return zoom_; } // optional uint32 x = 3; public static final int X_FIELD_NUMBER = 3; - private int x_; - public boolean hasX() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getX() { - return x_; - } + private boolean hasX; + private int x_ = 0; + public boolean hasX() { return hasX; } + public int getX() { return x_; } // optional uint32 y = 4; public static final int Y_FIELD_NUMBER = 4; - private int y_; - public boolean hasY() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getY() { - return y_; - } + private boolean hasY; + private int y_ = 0; + public boolean hasY() { return hasY; } + public int getY() { return y_; } // optional fixed32 shiftTo = 14; public static final int SHIFTTO_FIELD_NUMBER = 14; - private int shiftTo_; - public boolean hasShiftTo() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public int getShiftTo() { - return shiftTo_; - } + private boolean hasShiftTo; + private int shiftTo_ = 0; + public boolean hasShiftTo() { return hasShiftTo; } + public int getShiftTo() { return shiftTo_; } private void initFields() { - zoom_ = 0; - x_ = 0; - y_ = 0; - shiftTo_ = 0; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(2, zoom_); + if (hasZoom()) { + output.writeUInt32(2, getZoom()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(3, x_); + if (hasX()) { + output.writeUInt32(3, getX()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(4, y_); + if (hasY()) { + output.writeUInt32(4, getY()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeFixed32(14, shiftTo_); + if (hasShiftTo()) { + output.writeFixed32(14, getShiftTo()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasZoom()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, zoom_); + .computeUInt32Size(2, getZoom()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasX()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, x_); + .computeUInt32Size(3, getX()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasY()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(4, y_); + .computeUInt32Size(4, getY()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasShiftTo()) { size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(14, shiftTo_); + .computeFixed32Size(14, getShiftTo()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -26695,118 +16037,92 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndexDataAtom_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiNameIndexDataAtom_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom result; // Construct using net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom(); + return builder; } - public Builder clear() { - super.clear(); - zoom_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - x_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - y_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - shiftTo_ = 0; - bitField0_ = (bitField0_ & ~0x00000008); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom build() { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom result = new net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.zoom_ = zoom_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; - } - result.x_ = x_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.y_ = y_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - result.shiftTo_ = shiftTo_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndPoiNameIndexDataAtom)other); } else { @@ -26833,11 +16149,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -26849,124 +16162,105 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 16: { - bitField0_ |= 0x00000001; - zoom_ = input.readUInt32(); + setZoom(input.readUInt32()); break; } case 24: { - bitField0_ |= 0x00000002; - x_ = input.readUInt32(); + setX(input.readUInt32()); break; } case 32: { - bitField0_ |= 0x00000004; - y_ = input.readUInt32(); + setY(input.readUInt32()); break; } case 117: { - bitField0_ |= 0x00000008; - shiftTo_ = input.readFixed32(); + setShiftTo(input.readFixed32()); break; } } } } - private int bitField0_; // optional uint32 zoom = 2; - private int zoom_ ; public boolean hasZoom() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasZoom(); } public int getZoom() { - return zoom_; + return result.getZoom(); } public Builder setZoom(int value) { - bitField0_ |= 0x00000001; - zoom_ = value; - onChanged(); + result.hasZoom = true; + result.zoom_ = value; return this; } public Builder clearZoom() { - bitField0_ = (bitField0_ & ~0x00000001); - zoom_ = 0; - onChanged(); + result.hasZoom = false; + result.zoom_ = 0; return this; } // optional uint32 x = 3; - private int x_ ; public boolean hasX() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasX(); } public int getX() { - return x_; + return result.getX(); } public Builder setX(int value) { - bitField0_ |= 0x00000002; - x_ = value; - onChanged(); + result.hasX = true; + result.x_ = value; return this; } public Builder clearX() { - bitField0_ = (bitField0_ & ~0x00000002); - x_ = 0; - onChanged(); + result.hasX = false; + result.x_ = 0; return this; } // optional uint32 y = 4; - private int y_ ; public boolean hasY() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasY(); } public int getY() { - return y_; + return result.getY(); } public Builder setY(int value) { - bitField0_ |= 0x00000004; - y_ = value; - onChanged(); + result.hasY = true; + result.y_ = value; return this; } public Builder clearY() { - bitField0_ = (bitField0_ & ~0x00000004); - y_ = 0; - onChanged(); + result.hasY = false; + result.y_ = 0; return this; } // optional fixed32 shiftTo = 14; - private int shiftTo_ ; public boolean hasShiftTo() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasShiftTo(); } public int getShiftTo() { - return shiftTo_; + return result.getShiftTo(); } public Builder setShiftTo(int value) { - bitField0_ |= 0x00000008; - shiftTo_ = value; - onChanged(); + result.hasShiftTo = true; + result.shiftTo_ = value; return this; } public Builder clearShiftTo() { - bitField0_ = (bitField0_ & ~0x00000008); - shiftTo_ = 0; - onChanged(); + result.hasShiftTo = false; + result.shiftTo_ = 0; return this; } @@ -26975,30 +16269,18 @@ public final class OsmandOdb { static { defaultInstance = new OsmAndPoiNameIndexDataAtom(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndPoiNameIndexDataAtom) } - public interface OsmAndCategoryTableOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required string category = 1; - boolean hasCategory(); - String getCategory(); - - // repeated string subcategories = 3; - java.util.List getSubcategoriesList(); - int getSubcategoriesCount(); - String getSubcategories(int index); - } public static final class OsmAndCategoryTable extends - com.google.protobuf.GeneratedMessage - implements OsmAndCategoryTableOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndCategoryTable.newBuilder() to construct. - private OsmAndCategoryTable(Builder builder) { - super(builder); + private OsmAndCategoryTable() { + initFields(); } private OsmAndCategoryTable(boolean noInit) {} @@ -27007,7 +16289,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndCategoryTable getDefaultInstanceForType() { + @Override + public OsmAndCategoryTable getDefaultInstanceForType() { return defaultInstance; } @@ -27016,102 +16299,68 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndCategoryTable_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndCategoryTable_fieldAccessorTable; } - private int bitField0_; // required string category = 1; public static final int CATEGORY_FIELD_NUMBER = 1; - private java.lang.Object category_; - public boolean hasCategory() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public String getCategory() { - java.lang.Object ref = category_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - category_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getCategoryBytes() { - java.lang.Object ref = category_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - category_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasCategory; + private java.lang.String category_ = ""; + public boolean hasCategory() { return hasCategory; } + public java.lang.String getCategory() { return category_; } // repeated string subcategories = 3; public static final int SUBCATEGORIES_FIELD_NUMBER = 3; - private com.google.protobuf.LazyStringList subcategories_; - public java.util.List - getSubcategoriesList() { + private java.util.List subcategories_ = + java.util.Collections.emptyList(); + public java.util.List getSubcategoriesList() { return subcategories_; } - public int getSubcategoriesCount() { - return subcategories_.size(); - } - public String getSubcategories(int index) { + public int getSubcategoriesCount() { return subcategories_.size(); } + public java.lang.String getSubcategories(int index) { return subcategories_.get(index); } private void initFields() { - category_ = ""; - subcategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasCategory()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasCategory) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeBytes(1, getCategoryBytes()); + if (hasCategory()) { + output.writeString(1, getCategory()); } - for (int i = 0; i < subcategories_.size(); i++) { - output.writeBytes(3, subcategories_.getByteString(i)); + for (java.lang.String element : getSubcategoriesList()) { + output.writeString(3, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasCategory()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(1, getCategoryBytes()); + .computeStringSize(1, getCategory()); } { int dataSize = 0; - for (int i = 0; i < subcategories_.size(); i++) { + for (java.lang.String element : getSubcategoriesList()) { dataSize += com.google.protobuf.CodedOutputStream - .computeBytesSizeNoTag(subcategories_.getByteString(i)); + .computeStringSizeNoTag(element); } size += dataSize; size += 1 * getSubcategoriesList().size(); @@ -27121,13 +16370,6 @@ public final class OsmandOdb { return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndCategoryTable parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -27196,108 +16438,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndCategoryTable prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndCategoryTableOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndCategoryTable_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndCategoryTable_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndCategoryTable result; // Construct using net.osmand.binary.OsmandOdb.OsmAndCategoryTable.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndCategoryTable(); + return builder; } - public Builder clear() { - super.clear(); - category_ = ""; - bitField0_ = (bitField0_ & ~0x00000001); - subcategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndCategoryTable internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.OsmAndCategoryTable(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndCategoryTable.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndCategoryTable getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndCategoryTable getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndCategoryTable.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndCategoryTable build() { - net.osmand.binary.OsmandOdb.OsmAndCategoryTable result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndCategoryTable build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndCategoryTable buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndCategoryTable result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndCategoryTable buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndCategoryTable result = new net.osmand.binary.OsmandOdb.OsmAndCategoryTable(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndCategoryTable buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.category_ = category_; - if (((bitField0_ & 0x00000002) == 0x00000002)) { - subcategories_ = new com.google.protobuf.UnmodifiableLazyStringList( - subcategories_); - bitField0_ = (bitField0_ & ~0x00000002); + if (result.subcategories_ != java.util.Collections.EMPTY_LIST) { + result.subcategories_ = + java.util.Collections.unmodifiableList(result.subcategories_); } - result.subcategories_ = subcategories_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndCategoryTable returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndCategoryTable) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndCategoryTable)other); } else { @@ -27312,28 +16542,17 @@ public final class OsmandOdb { setCategory(other.getCategory()); } if (!other.subcategories_.isEmpty()) { - if (subcategories_.isEmpty()) { - subcategories_ = other.subcategories_; - bitField0_ = (bitField0_ & ~0x00000002); - } else { - ensureSubcategoriesIsMutable(); - subcategories_.addAll(other.subcategories_); + if (result.subcategories_.isEmpty()) { + result.subcategories_ = new java.util.ArrayList(); } - onChanged(); + result.subcategories_.addAll(other.subcategories_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - if (!hasCategory()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -27345,176 +16564,106 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 10: { - bitField0_ |= 0x00000001; - category_ = input.readBytes(); + setCategory(input.readString()); break; } case 26: { - ensureSubcategoriesIsMutable(); - subcategories_.add(input.readBytes()); + addSubcategories(input.readString()); break; } } } } - private int bitField0_; // required string category = 1; - private java.lang.Object category_ = ""; public boolean hasCategory() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasCategory(); } - public String getCategory() { - java.lang.Object ref = category_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - category_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getCategory() { + return result.getCategory(); } - public Builder setCategory(String value) { + public Builder setCategory(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000001; - category_ = value; - onChanged(); + result.hasCategory = true; + result.category_ = value; return this; } public Builder clearCategory() { - bitField0_ = (bitField0_ & ~0x00000001); - category_ = getDefaultInstance().getCategory(); - onChanged(); + result.hasCategory = false; + result.category_ = getDefaultInstance().getCategory(); return this; } - void setCategory(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000001; - category_ = value; - onChanged(); - } // repeated string subcategories = 3; - private com.google.protobuf.LazyStringList subcategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - private void ensureSubcategoriesIsMutable() { - if (!((bitField0_ & 0x00000002) == 0x00000002)) { - subcategories_ = new com.google.protobuf.LazyStringArrayList(subcategories_); - bitField0_ |= 0x00000002; - } - } - public java.util.List - getSubcategoriesList() { - return java.util.Collections.unmodifiableList(subcategories_); + public java.util.List getSubcategoriesList() { + return java.util.Collections.unmodifiableList(result.subcategories_); } public int getSubcategoriesCount() { - return subcategories_.size(); + return result.getSubcategoriesCount(); } - public String getSubcategories(int index) { - return subcategories_.get(index); + public java.lang.String getSubcategories(int index) { + return result.getSubcategories(index); } - public Builder setSubcategories( - int index, String value) { + public Builder setSubcategories(int index, java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureSubcategoriesIsMutable(); - subcategories_.set(index, value); - onChanged(); + result.subcategories_.set(index, value); return this; } - public Builder addSubcategories(String value) { + public Builder addSubcategories(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - ensureSubcategoriesIsMutable(); - subcategories_.add(value); - onChanged(); + if (result.subcategories_.isEmpty()) { + result.subcategories_ = new java.util.ArrayList(); + } + result.subcategories_.add(value); return this; } public Builder addAllSubcategories( - java.lang.Iterable values) { - ensureSubcategoriesIsMutable(); - super.addAll(values, subcategories_); - onChanged(); + java.lang.Iterable values) { + if (result.subcategories_.isEmpty()) { + result.subcategories_ = new java.util.ArrayList(); + } + super.addAll(values, result.subcategories_); return this; } public Builder clearSubcategories() { - subcategories_ = com.google.protobuf.LazyStringArrayList.EMPTY; - bitField0_ = (bitField0_ & ~0x00000002); - onChanged(); + result.subcategories_ = java.util.Collections.emptyList(); return this; } - void addSubcategories(com.google.protobuf.ByteString value) { - ensureSubcategoriesIsMutable(); - subcategories_.add(value); - onChanged(); - } // @@protoc_insertion_point(builder_scope:OsmAndCategoryTable) } static { defaultInstance = new OsmAndCategoryTable(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndCategoryTable) } - public interface OsmAndPoiBoxOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required uint32 zoom = 1; - boolean hasZoom(); - int getZoom(); - - // required sint32 left = 2; - boolean hasLeft(); - int getLeft(); - - // required sint32 top = 3; - boolean hasTop(); - int getTop(); - - // optional .OsmAndPoiCategories categories = 4; - boolean hasCategories(); - net.osmand.binary.OsmandOdb.OsmAndPoiCategories getCategories(); - net.osmand.binary.OsmandOdb.OsmAndPoiCategoriesOrBuilder getCategoriesOrBuilder(); - - // repeated .OsmAndPoiBox subBoxes = 10; - java.util.List - getSubBoxesList(); - net.osmand.binary.OsmandOdb.OsmAndPoiBox getSubBoxes(int index); - int getSubBoxesCount(); - java.util.List - getSubBoxesOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder getSubBoxesOrBuilder( - int index); - - // optional fixed32 shiftToData = 14; - boolean hasShiftToData(); - int getShiftToData(); - } public static final class OsmAndPoiBox extends - com.google.protobuf.GeneratedMessage - implements OsmAndPoiBoxOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndPoiBox.newBuilder() to construct. - private OsmAndPoiBox(Builder builder) { - super(builder); + private OsmAndPoiBox() { + initFields(); } private OsmAndPoiBox(boolean noInit) {} @@ -27523,7 +16672,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndPoiBox getDefaultInstanceForType() { + @Override + public OsmAndPoiBox getDefaultInstanceForType() { return defaultInstance; } @@ -27532,187 +16682,134 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBox_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBox_fieldAccessorTable; } - private int bitField0_; // required uint32 zoom = 1; public static final int ZOOM_FIELD_NUMBER = 1; - private int zoom_; - public boolean hasZoom() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getZoom() { - return zoom_; - } + private boolean hasZoom; + private int zoom_ = 0; + public boolean hasZoom() { return hasZoom; } + public int getZoom() { return zoom_; } // required sint32 left = 2; public static final int LEFT_FIELD_NUMBER = 2; - private int left_; - public boolean hasLeft() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getLeft() { - return left_; - } + private boolean hasLeft; + private int left_ = 0; + public boolean hasLeft() { return hasLeft; } + public int getLeft() { return left_; } // required sint32 top = 3; public static final int TOP_FIELD_NUMBER = 3; - private int top_; - public boolean hasTop() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getTop() { - return top_; - } + private boolean hasTop; + private int top_ = 0; + public boolean hasTop() { return hasTop; } + public int getTop() { return top_; } // optional .OsmAndPoiCategories categories = 4; public static final int CATEGORIES_FIELD_NUMBER = 4; + private boolean hasCategories; private net.osmand.binary.OsmandOdb.OsmAndPoiCategories categories_; - public boolean hasCategories() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiCategories getCategories() { - return categories_; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiCategoriesOrBuilder getCategoriesOrBuilder() { - return categories_; - } + public boolean hasCategories() { return hasCategories; } + public net.osmand.binary.OsmandOdb.OsmAndPoiCategories getCategories() { return categories_; } // repeated .OsmAndPoiBox subBoxes = 10; public static final int SUBBOXES_FIELD_NUMBER = 10; - private java.util.List subBoxes_; + private java.util.List subBoxes_ = + java.util.Collections.emptyList(); public java.util.List getSubBoxesList() { return subBoxes_; } - public java.util.List - getSubBoxesOrBuilderList() { - return subBoxes_; - } - public int getSubBoxesCount() { - return subBoxes_.size(); - } + public int getSubBoxesCount() { return subBoxes_.size(); } public net.osmand.binary.OsmandOdb.OsmAndPoiBox getSubBoxes(int index) { return subBoxes_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder getSubBoxesOrBuilder( - int index) { - return subBoxes_.get(index); - } // optional fixed32 shiftToData = 14; public static final int SHIFTTODATA_FIELD_NUMBER = 14; - private int shiftToData_; - public boolean hasShiftToData() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public int getShiftToData() { - return shiftToData_; - } + private boolean hasShiftToData; + private int shiftToData_ = 0; + public boolean hasShiftToData() { return hasShiftToData; } + public int getShiftToData() { return shiftToData_; } private void initFields() { - zoom_ = 0; - left_ = 0; - top_ = 0; categories_ = net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance(); - subBoxes_ = java.util.Collections.emptyList(); - shiftToData_ = 0; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasZoom()) { - memoizedIsInitialized = 0; - return false; + @Override + public final boolean isInitialized() { + if (!hasZoom) return false; + if (!hasLeft) return false; + if (!hasTop) return false; + for (net.osmand.binary.OsmandOdb.OsmAndPoiBox element : getSubBoxesList()) { + if (!element.isInitialized()) return false; } - if (!hasLeft()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasTop()) { - memoizedIsInitialized = 0; - return false; - } - for (int i = 0; i < getSubBoxesCount(); i++) { - if (!getSubBoxes(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } - } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, zoom_); + if (hasZoom()) { + output.writeUInt32(1, getZoom()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeSInt32(2, left_); + if (hasLeft()) { + output.writeSInt32(2, getLeft()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeSInt32(3, top_); + if (hasTop()) { + output.writeSInt32(3, getTop()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeMessage(4, categories_); + if (hasCategories()) { + output.writeMessage(4, getCategories()); } - for (int i = 0; i < subBoxes_.size(); i++) { - output.writeMessage(10, subBoxes_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndPoiBox element : getSubBoxesList()) { + output.writeMessage(10, element); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeFixed32(14, shiftToData_); + if (hasShiftToData()) { + output.writeFixed32(14, getShiftToData()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasZoom()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, zoom_); + .computeUInt32Size(1, getZoom()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasLeft()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(2, left_); + .computeSInt32Size(2, getLeft()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasTop()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(3, top_); + .computeSInt32Size(3, getTop()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasCategories()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(4, categories_); + .computeMessageSize(4, getCategories()); } - for (int i = 0; i < subBoxes_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndPoiBox element : getSubBoxesList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(10, subBoxes_.get(i)); + .computeMessageSize(10, element); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasShiftToData()) { size += com.google.protobuf.CodedOutputStream - .computeFixed32Size(14, shiftToData_); + .computeFixed32Size(14, getShiftToData()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndPoiBox parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -27781,149 +16878,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndPoiBox prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBox_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBox_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndPoiBox result; // Construct using net.osmand.binary.OsmandOdb.OsmAndPoiBox.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getCategoriesFieldBuilder(); - getSubBoxesFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndPoiBox(); + return builder; } - public Builder clear() { - super.clear(); - zoom_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - left_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - top_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - if (categoriesBuilder_ == null) { - categories_ = net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance(); - } else { - categoriesBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndPoiBox internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } - bitField0_ = (bitField0_ & ~0x00000008); - if (subBoxesBuilder_ == null) { - subBoxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - } else { - subBoxesBuilder_.clear(); - } - shiftToData_ = 0; - bitField0_ = (bitField0_ & ~0x00000020); + result = new net.osmand.binary.OsmandOdb.OsmAndPoiBox(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiBox.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBox getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiBox.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox build() { - net.osmand.binary.OsmandOdb.OsmAndPoiBox result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBox build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndPoiBox buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndPoiBox result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndPoiBox result = new net.osmand.binary.OsmandOdb.OsmAndPoiBox(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBox buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.zoom_ = zoom_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.subBoxes_ != java.util.Collections.EMPTY_LIST) { + result.subBoxes_ = + java.util.Collections.unmodifiableList(result.subBoxes_); } - result.left_ = left_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.top_ = top_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000008; - } - if (categoriesBuilder_ == null) { - result.categories_ = categories_; - } else { - result.categories_ = categoriesBuilder_.build(); - } - if (subBoxesBuilder_ == null) { - if (((bitField0_ & 0x00000010) == 0x00000010)) { - subBoxes_ = java.util.Collections.unmodifiableList(subBoxes_); - bitField0_ = (bitField0_ & ~0x00000010); - } - result.subBoxes_ = subBoxes_; - } else { - result.subBoxes_ = subBoxesBuilder_.build(); - } - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.shiftToData_ = shiftToData_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndPoiBox returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndPoiBox) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndPoiBox)other); } else { @@ -27946,31 +16990,11 @@ public final class OsmandOdb { if (other.hasCategories()) { mergeCategories(other.getCategories()); } - if (subBoxesBuilder_ == null) { - if (!other.subBoxes_.isEmpty()) { - if (subBoxes_.isEmpty()) { - subBoxes_ = other.subBoxes_; - bitField0_ = (bitField0_ & ~0x00000010); - } else { - ensureSubBoxesIsMutable(); - subBoxes_.addAll(other.subBoxes_); - } - onChanged(); - } - } else { - if (!other.subBoxes_.isEmpty()) { - if (subBoxesBuilder_.isEmpty()) { - subBoxesBuilder_.dispose(); - subBoxesBuilder_ = null; - subBoxes_ = other.subBoxes_; - bitField0_ = (bitField0_ & ~0x00000010); - subBoxesBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getSubBoxesFieldBuilder() : null; - } else { - subBoxesBuilder_.addAllMessages(other.subBoxes_); - } + if (!other.subBoxes_.isEmpty()) { + if (result.subBoxes_.isEmpty()) { + result.subBoxes_ = new java.util.ArrayList(); } + result.subBoxes_.addAll(other.subBoxes_); } if (other.hasShiftToData()) { setShiftToData(other.getShiftToData()); @@ -27979,29 +17003,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasZoom()) { - - return false; - } - if (!hasLeft()) { - - return false; - } - if (!hasTop()) { - - return false; - } - for (int i = 0; i < getSubBoxesCount(); i++) { - if (!getSubBoxes(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -28013,30 +17016,25 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - zoom_ = input.readUInt32(); + setZoom(input.readUInt32()); break; } case 16: { - bitField0_ |= 0x00000002; - left_ = input.readSInt32(); + setLeft(input.readSInt32()); break; } case 24: { - bitField0_ |= 0x00000004; - top_ = input.readSInt32(); + setTop(input.readSInt32()); break; } case 34: { @@ -28055,373 +17053,171 @@ public final class OsmandOdb { break; } case 117: { - bitField0_ |= 0x00000020; - shiftToData_ = input.readFixed32(); + setShiftToData(input.readFixed32()); break; } } } } - private int bitField0_; // required uint32 zoom = 1; - private int zoom_ ; public boolean hasZoom() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasZoom(); } public int getZoom() { - return zoom_; + return result.getZoom(); } public Builder setZoom(int value) { - bitField0_ |= 0x00000001; - zoom_ = value; - onChanged(); + result.hasZoom = true; + result.zoom_ = value; return this; } public Builder clearZoom() { - bitField0_ = (bitField0_ & ~0x00000001); - zoom_ = 0; - onChanged(); + result.hasZoom = false; + result.zoom_ = 0; return this; } // required sint32 left = 2; - private int left_ ; public boolean hasLeft() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasLeft(); } public int getLeft() { - return left_; + return result.getLeft(); } public Builder setLeft(int value) { - bitField0_ |= 0x00000002; - left_ = value; - onChanged(); + result.hasLeft = true; + result.left_ = value; return this; } public Builder clearLeft() { - bitField0_ = (bitField0_ & ~0x00000002); - left_ = 0; - onChanged(); + result.hasLeft = false; + result.left_ = 0; return this; } // required sint32 top = 3; - private int top_ ; public boolean hasTop() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasTop(); } public int getTop() { - return top_; + return result.getTop(); } public Builder setTop(int value) { - bitField0_ |= 0x00000004; - top_ = value; - onChanged(); + result.hasTop = true; + result.top_ = value; return this; } public Builder clearTop() { - bitField0_ = (bitField0_ & ~0x00000004); - top_ = 0; - onChanged(); + result.hasTop = false; + result.top_ = 0; return this; } // optional .OsmAndPoiCategories categories = 4; - private net.osmand.binary.OsmandOdb.OsmAndPoiCategories categories_ = net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance(); - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiCategories, net.osmand.binary.OsmandOdb.OsmAndPoiCategories.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiCategoriesOrBuilder> categoriesBuilder_; public boolean hasCategories() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasCategories(); } public net.osmand.binary.OsmandOdb.OsmAndPoiCategories getCategories() { - if (categoriesBuilder_ == null) { - return categories_; - } else { - return categoriesBuilder_.getMessage(); - } + return result.getCategories(); } public Builder setCategories(net.osmand.binary.OsmandOdb.OsmAndPoiCategories value) { - if (categoriesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - categories_ = value; - onChanged(); - } else { - categoriesBuilder_.setMessage(value); + if (value == null) { + throw new NullPointerException(); } - bitField0_ |= 0x00000008; + result.hasCategories = true; + result.categories_ = value; return this; } - public Builder setCategories( - net.osmand.binary.OsmandOdb.OsmAndPoiCategories.Builder builderForValue) { - if (categoriesBuilder_ == null) { - categories_ = builderForValue.build(); - onChanged(); - } else { - categoriesBuilder_.setMessage(builderForValue.build()); - } - bitField0_ |= 0x00000008; + public Builder setCategories(net.osmand.binary.OsmandOdb.OsmAndPoiCategories.Builder builderForValue) { + result.hasCategories = true; + result.categories_ = builderForValue.build(); return this; } public Builder mergeCategories(net.osmand.binary.OsmandOdb.OsmAndPoiCategories value) { - if (categoriesBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008) && - categories_ != net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance()) { - categories_ = - net.osmand.binary.OsmandOdb.OsmAndPoiCategories.newBuilder(categories_).mergeFrom(value).buildPartial(); - } else { - categories_ = value; - } - onChanged(); + if (result.hasCategories() && + result.categories_ != net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance()) { + result.categories_ = + net.osmand.binary.OsmandOdb.OsmAndPoiCategories.newBuilder(result.categories_).mergeFrom(value).buildPartial(); } else { - categoriesBuilder_.mergeFrom(value); + result.categories_ = value; } - bitField0_ |= 0x00000008; + result.hasCategories = true; return this; } public Builder clearCategories() { - if (categoriesBuilder_ == null) { - categories_ = net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance(); - onChanged(); - } else { - categoriesBuilder_.clear(); - } - bitField0_ = (bitField0_ & ~0x00000008); + result.hasCategories = false; + result.categories_ = net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance(); return this; } - public net.osmand.binary.OsmandOdb.OsmAndPoiCategories.Builder getCategoriesBuilder() { - bitField0_ |= 0x00000008; - onChanged(); - return getCategoriesFieldBuilder().getBuilder(); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiCategoriesOrBuilder getCategoriesOrBuilder() { - if (categoriesBuilder_ != null) { - return categoriesBuilder_.getMessageOrBuilder(); - } else { - return categories_; - } - } - private com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiCategories, net.osmand.binary.OsmandOdb.OsmAndPoiCategories.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiCategoriesOrBuilder> - getCategoriesFieldBuilder() { - if (categoriesBuilder_ == null) { - categoriesBuilder_ = new com.google.protobuf.SingleFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiCategories, net.osmand.binary.OsmandOdb.OsmAndPoiCategories.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiCategoriesOrBuilder>( - categories_, - getParentForChildren(), - isClean()); - categories_ = null; - } - return categoriesBuilder_; - } // repeated .OsmAndPoiBox subBoxes = 10; - private java.util.List subBoxes_ = - java.util.Collections.emptyList(); - private void ensureSubBoxesIsMutable() { - if (!((bitField0_ & 0x00000010) == 0x00000010)) { - subBoxes_ = new java.util.ArrayList(subBoxes_); - bitField0_ |= 0x00000010; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBox, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder> subBoxesBuilder_; - public java.util.List getSubBoxesList() { - if (subBoxesBuilder_ == null) { - return java.util.Collections.unmodifiableList(subBoxes_); - } else { - return subBoxesBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.subBoxes_); } public int getSubBoxesCount() { - if (subBoxesBuilder_ == null) { - return subBoxes_.size(); - } else { - return subBoxesBuilder_.getCount(); - } + return result.getSubBoxesCount(); } public net.osmand.binary.OsmandOdb.OsmAndPoiBox getSubBoxes(int index) { - if (subBoxesBuilder_ == null) { - return subBoxes_.get(index); - } else { - return subBoxesBuilder_.getMessage(index); - } + return result.getSubBoxes(index); } - public Builder setSubBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox value) { - if (subBoxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubBoxesIsMutable(); - subBoxes_.set(index, value); - onChanged(); - } else { - subBoxesBuilder_.setMessage(index, value); + public Builder setSubBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox value) { + if (value == null) { + throw new NullPointerException(); } + result.subBoxes_.set(index, value); return this; } - public Builder setSubBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { - if (subBoxesBuilder_ == null) { - ensureSubBoxesIsMutable(); - subBoxes_.set(index, builderForValue.build()); - onChanged(); - } else { - subBoxesBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setSubBoxes(int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { + result.subBoxes_.set(index, builderForValue.build()); return this; } public Builder addSubBoxes(net.osmand.binary.OsmandOdb.OsmAndPoiBox value) { - if (subBoxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubBoxesIsMutable(); - subBoxes_.add(value); - onChanged(); - } else { - subBoxesBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.subBoxes_.isEmpty()) { + result.subBoxes_ = new java.util.ArrayList(); + } + result.subBoxes_.add(value); return this; } - public Builder addSubBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox value) { - if (subBoxesBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensureSubBoxesIsMutable(); - subBoxes_.add(index, value); - onChanged(); - } else { - subBoxesBuilder_.addMessage(index, value); - } - return this; - } - public Builder addSubBoxes( - net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { - if (subBoxesBuilder_ == null) { - ensureSubBoxesIsMutable(); - subBoxes_.add(builderForValue.build()); - onChanged(); - } else { - subBoxesBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addSubBoxes( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { - if (subBoxesBuilder_ == null) { - ensureSubBoxesIsMutable(); - subBoxes_.add(index, builderForValue.build()); - onChanged(); - } else { - subBoxesBuilder_.addMessage(index, builderForValue.build()); + public Builder addSubBoxes(net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder builderForValue) { + if (result.subBoxes_.isEmpty()) { + result.subBoxes_ = new java.util.ArrayList(); } + result.subBoxes_.add(builderForValue.build()); return this; } public Builder addAllSubBoxes( java.lang.Iterable values) { - if (subBoxesBuilder_ == null) { - ensureSubBoxesIsMutable(); - super.addAll(values, subBoxes_); - onChanged(); - } else { - subBoxesBuilder_.addAllMessages(values); + if (result.subBoxes_.isEmpty()) { + result.subBoxes_ = new java.util.ArrayList(); } + super.addAll(values, result.subBoxes_); return this; } public Builder clearSubBoxes() { - if (subBoxesBuilder_ == null) { - subBoxes_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000010); - onChanged(); - } else { - subBoxesBuilder_.clear(); - } + result.subBoxes_ = java.util.Collections.emptyList(); return this; } - public Builder removeSubBoxes(int index) { - if (subBoxesBuilder_ == null) { - ensureSubBoxesIsMutable(); - subBoxes_.remove(index); - onChanged(); - } else { - subBoxesBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder getSubBoxesBuilder( - int index) { - return getSubBoxesFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder getSubBoxesOrBuilder( - int index) { - if (subBoxesBuilder_ == null) { - return subBoxes_.get(index); } else { - return subBoxesBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getSubBoxesOrBuilderList() { - if (subBoxesBuilder_ != null) { - return subBoxesBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(subBoxes_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder addSubBoxesBuilder() { - return getSubBoxesFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndPoiBox.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder addSubBoxesBuilder( - int index) { - return getSubBoxesFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndPoiBox.getDefaultInstance()); - } - public java.util.List - getSubBoxesBuilderList() { - return getSubBoxesFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBox, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder> - getSubBoxesFieldBuilder() { - if (subBoxesBuilder_ == null) { - subBoxesBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBox, net.osmand.binary.OsmandOdb.OsmAndPoiBox.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxOrBuilder>( - subBoxes_, - ((bitField0_ & 0x00000010) == 0x00000010), - getParentForChildren(), - isClean()); - subBoxes_ = null; - } - return subBoxesBuilder_; - } // optional fixed32 shiftToData = 14; - private int shiftToData_ ; public boolean hasShiftToData() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return result.hasShiftToData(); } public int getShiftToData() { - return shiftToData_; + return result.getShiftToData(); } public Builder setShiftToData(int value) { - bitField0_ |= 0x00000020; - shiftToData_ = value; - onChanged(); + result.hasShiftToData = true; + result.shiftToData_ = value; return this; } public Builder clearShiftToData() { - bitField0_ = (bitField0_ & ~0x00000020); - shiftToData_ = 0; - onChanged(); + result.hasShiftToData = false; + result.shiftToData_ = 0; return this; } @@ -28430,26 +17226,18 @@ public final class OsmandOdb { static { defaultInstance = new OsmAndPoiBox(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndPoiBox) } - public interface OsmAndPoiCategoriesOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // repeated uint32 categories = 3; - java.util.List getCategoriesList(); - int getCategoriesCount(); - int getCategories(int index); - } public static final class OsmAndPoiCategories extends - com.google.protobuf.GeneratedMessage - implements OsmAndPoiCategoriesOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndPoiCategories.newBuilder() to construct. - private OsmAndPoiCategories(Builder builder) { - super(builder); + private OsmAndPoiCategories() { + initFields(); } private OsmAndPoiCategories(boolean noInit) {} @@ -28458,7 +17246,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndPoiCategories getDefaultInstanceForType() { + @Override + public OsmAndPoiCategories getDefaultInstanceForType() { return defaultInstance; } @@ -28467,57 +17256,53 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiCategories_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiCategories_fieldAccessorTable; } // repeated uint32 categories = 3; public static final int CATEGORIES_FIELD_NUMBER = 3; - private java.util.List categories_; - public java.util.List - getCategoriesList() { + private java.util.List categories_ = + java.util.Collections.emptyList(); + public java.util.List getCategoriesList() { return categories_; } - public int getCategoriesCount() { - return categories_.size(); - } + public int getCategoriesCount() { return categories_.size(); } public int getCategories(int index) { return categories_.get(index); } private void initFields() { - categories_ = java.util.Collections.emptyList();; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - for (int i = 0; i < categories_.size(); i++) { - output.writeUInt32(3, categories_.get(i)); + for (int element : getCategoriesList()) { + output.writeUInt32(3, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; { int dataSize = 0; - for (int i = 0; i < categories_.size(); i++) { + for (int element : getCategoriesList()) { dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(categories_.get(i)); + .computeUInt32SizeNoTag(element); } size += dataSize; size += 1 * getCategoriesList().size(); @@ -28527,13 +17312,6 @@ public final class OsmandOdb { return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndPoiCategories parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -28602,99 +17380,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndPoiCategories prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndPoiCategoriesOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiCategories_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiCategories_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndPoiCategories result; // Construct using net.osmand.binary.OsmandOdb.OsmAndPoiCategories.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndPoiCategories(); + return builder; } - public Builder clear() { - super.clear(); - categories_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000001); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndPoiCategories internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.OsmAndPoiCategories(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiCategories getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiCategories getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiCategories build() { - net.osmand.binary.OsmandOdb.OsmAndPoiCategories result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiCategories build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndPoiCategories buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndPoiCategories result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiCategories buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndPoiCategories result = new net.osmand.binary.OsmandOdb.OsmAndPoiCategories(this); - int from_bitField0_ = bitField0_; - if (((bitField0_ & 0x00000001) == 0x00000001)) { - categories_ = java.util.Collections.unmodifiableList(categories_); - bitField0_ = (bitField0_ & ~0x00000001); + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiCategories buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.categories_ = categories_; - onBuilt(); - return result; + if (result.categories_ != java.util.Collections.EMPTY_LIST) { + result.categories_ = + java.util.Collections.unmodifiableList(result.categories_); + } + net.osmand.binary.OsmandOdb.OsmAndPoiCategories returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndPoiCategories) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndPoiCategories)other); } else { @@ -28706,24 +17481,17 @@ public final class OsmandOdb { public Builder mergeFrom(net.osmand.binary.OsmandOdb.OsmAndPoiCategories other) { if (other == net.osmand.binary.OsmandOdb.OsmAndPoiCategories.getDefaultInstance()) return this; if (!other.categories_.isEmpty()) { - if (categories_.isEmpty()) { - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000001); - } else { - ensureCategoriesIsMutable(); - categories_.addAll(other.categories_); + if (result.categories_.isEmpty()) { + result.categories_ = new java.util.ArrayList(); } - onChanged(); + result.categories_.addAll(other.categories_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -28735,20 +17503,17 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 24: { - ensureCategoriesIsMutable(); - categories_.add(input.readUInt32()); + addCategories(input.readUInt32()); break; } case 26: { @@ -28764,50 +17529,38 @@ public final class OsmandOdb { } } - private int bitField0_; // repeated uint32 categories = 3; - private java.util.List categories_ = java.util.Collections.emptyList();; - private void ensureCategoriesIsMutable() { - if (!((bitField0_ & 0x00000001) == 0x00000001)) { - categories_ = new java.util.ArrayList(categories_); - bitField0_ |= 0x00000001; - } - } - public java.util.List - getCategoriesList() { - return java.util.Collections.unmodifiableList(categories_); + public java.util.List getCategoriesList() { + return java.util.Collections.unmodifiableList(result.categories_); } public int getCategoriesCount() { - return categories_.size(); + return result.getCategoriesCount(); } public int getCategories(int index) { - return categories_.get(index); + return result.getCategories(index); } - public Builder setCategories( - int index, int value) { - ensureCategoriesIsMutable(); - categories_.set(index, value); - onChanged(); + public Builder setCategories(int index, int value) { + result.categories_.set(index, value); return this; } public Builder addCategories(int value) { - ensureCategoriesIsMutable(); - categories_.add(value); - onChanged(); + if (result.categories_.isEmpty()) { + result.categories_ = new java.util.ArrayList(); + } + result.categories_.add(value); return this; } public Builder addAllCategories( java.lang.Iterable values) { - ensureCategoriesIsMutable(); - super.addAll(values, categories_); - onChanged(); + if (result.categories_.isEmpty()) { + result.categories_ = new java.util.ArrayList(); + } + super.addAll(values, result.categories_); return this; } public Builder clearCategories() { - categories_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000001); - onChanged(); + result.categories_ = java.util.Collections.emptyList(); return this; } @@ -28816,43 +17569,18 @@ public final class OsmandOdb { static { defaultInstance = new OsmAndPoiCategories(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndPoiCategories) } - public interface OsmAndPoiBoxDataOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // optional uint32 zoom = 1; - boolean hasZoom(); - int getZoom(); - - // optional uint32 x = 2; - boolean hasX(); - int getX(); - - // optional uint32 y = 3; - boolean hasY(); - int getY(); - - // repeated .OsmAndPoiBoxDataAtom poiData = 5; - java.util.List - getPoiDataList(); - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom getPoiData(int index); - int getPoiDataCount(); - java.util.List - getPoiDataOrBuilderList(); - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtomOrBuilder getPoiDataOrBuilder( - int index); - } public static final class OsmAndPoiBoxData extends - com.google.protobuf.GeneratedMessage - implements OsmAndPoiBoxDataOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndPoiBoxData.newBuilder() to construct. - private OsmAndPoiBoxData(Builder builder) { - super(builder); + private OsmAndPoiBoxData() { + initFields(); } private OsmAndPoiBoxData(boolean noInit) {} @@ -28861,7 +17589,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndPoiBoxData getDefaultInstanceForType() { + @Override + public OsmAndPoiBoxData getDefaultInstanceForType() { return defaultInstance; } @@ -28870,136 +17599,102 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBoxData_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBoxData_fieldAccessorTable; } - private int bitField0_; // optional uint32 zoom = 1; public static final int ZOOM_FIELD_NUMBER = 1; - private int zoom_; - public boolean hasZoom() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getZoom() { - return zoom_; - } + private boolean hasZoom; + private int zoom_ = 0; + public boolean hasZoom() { return hasZoom; } + public int getZoom() { return zoom_; } // optional uint32 x = 2; public static final int X_FIELD_NUMBER = 2; - private int x_; - public boolean hasX() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getX() { - return x_; - } + private boolean hasX; + private int x_ = 0; + public boolean hasX() { return hasX; } + public int getX() { return x_; } // optional uint32 y = 3; public static final int Y_FIELD_NUMBER = 3; - private int y_; - public boolean hasY() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public int getY() { - return y_; - } + private boolean hasY; + private int y_ = 0; + public boolean hasY() { return hasY; } + public int getY() { return y_; } // repeated .OsmAndPoiBoxDataAtom poiData = 5; public static final int POIDATA_FIELD_NUMBER = 5; - private java.util.List poiData_; + private java.util.List poiData_ = + java.util.Collections.emptyList(); public java.util.List getPoiDataList() { return poiData_; } - public java.util.List - getPoiDataOrBuilderList() { - return poiData_; - } - public int getPoiDataCount() { - return poiData_.size(); - } + public int getPoiDataCount() { return poiData_.size(); } public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom getPoiData(int index) { return poiData_.get(index); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtomOrBuilder getPoiDataOrBuilder( - int index) { - return poiData_.get(index); - } private void initFields() { - zoom_ = 0; - x_ = 0; - y_ = 0; - poiData_ = java.util.Collections.emptyList(); } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - for (int i = 0; i < getPoiDataCount(); i++) { - if (!getPoiData(i).isInitialized()) { - memoizedIsInitialized = 0; - return false; - } + @Override + public final boolean isInitialized() { + for (net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom element : getPoiDataList()) { + if (!element.isInitialized()) return false; } - memoizedIsInitialized = 1; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeUInt32(1, zoom_); + if (hasZoom()) { + output.writeUInt32(1, getZoom()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeUInt32(2, x_); + if (hasX()) { + output.writeUInt32(2, getX()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeUInt32(3, y_); + if (hasY()) { + output.writeUInt32(3, getY()); } - for (int i = 0; i < poiData_.size(); i++) { - output.writeMessage(5, poiData_.get(i)); + for (net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom element : getPoiDataList()) { + output.writeMessage(5, element); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasZoom()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(1, zoom_); + .computeUInt32Size(1, getZoom()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasX()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(2, x_); + .computeUInt32Size(2, getX()); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasY()) { size += com.google.protobuf.CodedOutputStream - .computeUInt32Size(3, y_); + .computeUInt32Size(3, getY()); } - for (int i = 0; i < poiData_.size(); i++) { + for (net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom element : getPoiDataList()) { size += com.google.protobuf.CodedOutputStream - .computeMessageSize(5, poiData_.get(i)); + .computeMessageSize(5, element); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndPoiBoxData parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -29068,128 +17763,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndPoiBoxData prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBoxData_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBoxData_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndPoiBoxData result; // Construct using net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - getPoiDataFieldBuilder(); - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndPoiBoxData(); + return builder; } - public Builder clear() { - super.clear(); - zoom_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - x_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - y_ = 0; - bitField0_ = (bitField0_ & ~0x00000004); - if (poiDataBuilder_ == null) { - poiData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - } else { - poiDataBuilder_.clear(); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndPoiBoxData internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); } + result = new net.osmand.binary.OsmandOdb.OsmAndPoiBoxData(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiBoxData.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData build() { - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndPoiBoxData buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndPoiBoxData result = new net.osmand.binary.OsmandOdb.OsmAndPoiBoxData(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBoxData buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.zoom_ = zoom_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.poiData_ != java.util.Collections.EMPTY_LIST) { + result.poiData_ = + java.util.Collections.unmodifiableList(result.poiData_); } - result.x_ = x_; - if (((from_bitField0_ & 0x00000004) == 0x00000004)) { - to_bitField0_ |= 0x00000004; - } - result.y_ = y_; - if (poiDataBuilder_ == null) { - if (((bitField0_ & 0x00000008) == 0x00000008)) { - poiData_ = java.util.Collections.unmodifiableList(poiData_); - bitField0_ = (bitField0_ & ~0x00000008); - } - result.poiData_ = poiData_; - } else { - result.poiData_ = poiDataBuilder_.build(); - } - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndPoiBoxData returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndPoiBoxData) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndPoiBoxData)other); } else { @@ -29209,47 +17872,18 @@ public final class OsmandOdb { if (other.hasY()) { setY(other.getY()); } - if (poiDataBuilder_ == null) { - if (!other.poiData_.isEmpty()) { - if (poiData_.isEmpty()) { - poiData_ = other.poiData_; - bitField0_ = (bitField0_ & ~0x00000008); - } else { - ensurePoiDataIsMutable(); - poiData_.addAll(other.poiData_); - } - onChanged(); - } - } else { - if (!other.poiData_.isEmpty()) { - if (poiDataBuilder_.isEmpty()) { - poiDataBuilder_.dispose(); - poiDataBuilder_ = null; - poiData_ = other.poiData_; - bitField0_ = (bitField0_ & ~0x00000008); - poiDataBuilder_ = - com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders ? - getPoiDataFieldBuilder() : null; - } else { - poiDataBuilder_.addAllMessages(other.poiData_); - } + if (!other.poiData_.isEmpty()) { + if (result.poiData_.isEmpty()) { + result.poiData_ = new java.util.ArrayList(); } + result.poiData_.addAll(other.poiData_); } this.mergeUnknownFields(other.getUnknownFields()); return this; } - public final boolean isInitialized() { - for (int i = 0; i < getPoiDataCount(); i++) { - if (!getPoiData(i).isInitialized()) { - - return false; - } - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -29261,30 +17895,25 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 8: { - bitField0_ |= 0x00000001; - zoom_ = input.readUInt32(); + setZoom(input.readUInt32()); break; } case 16: { - bitField0_ |= 0x00000002; - x_ = input.readUInt32(); + setX(input.readUInt32()); break; } case 24: { - bitField0_ |= 0x00000004; - y_ = input.readUInt32(); + setY(input.readUInt32()); break; } case 42: { @@ -29297,318 +17926,129 @@ public final class OsmandOdb { } } - private int bitField0_; // optional uint32 zoom = 1; - private int zoom_ ; public boolean hasZoom() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasZoom(); } public int getZoom() { - return zoom_; + return result.getZoom(); } public Builder setZoom(int value) { - bitField0_ |= 0x00000001; - zoom_ = value; - onChanged(); + result.hasZoom = true; + result.zoom_ = value; return this; } public Builder clearZoom() { - bitField0_ = (bitField0_ & ~0x00000001); - zoom_ = 0; - onChanged(); + result.hasZoom = false; + result.zoom_ = 0; return this; } // optional uint32 x = 2; - private int x_ ; public boolean hasX() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasX(); } public int getX() { - return x_; + return result.getX(); } public Builder setX(int value) { - bitField0_ |= 0x00000002; - x_ = value; - onChanged(); + result.hasX = true; + result.x_ = value; return this; } public Builder clearX() { - bitField0_ = (bitField0_ & ~0x00000002); - x_ = 0; - onChanged(); + result.hasX = false; + result.x_ = 0; return this; } // optional uint32 y = 3; - private int y_ ; public boolean hasY() { - return ((bitField0_ & 0x00000004) == 0x00000004); + return result.hasY(); } public int getY() { - return y_; + return result.getY(); } public Builder setY(int value) { - bitField0_ |= 0x00000004; - y_ = value; - onChanged(); + result.hasY = true; + result.y_ = value; return this; } public Builder clearY() { - bitField0_ = (bitField0_ & ~0x00000004); - y_ = 0; - onChanged(); + result.hasY = false; + result.y_ = 0; return this; } // repeated .OsmAndPoiBoxDataAtom poiData = 5; - private java.util.List poiData_ = - java.util.Collections.emptyList(); - private void ensurePoiDataIsMutable() { - if (!((bitField0_ & 0x00000008) == 0x00000008)) { - poiData_ = new java.util.ArrayList(poiData_); - bitField0_ |= 0x00000008; - } - } - - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtomOrBuilder> poiDataBuilder_; - public java.util.List getPoiDataList() { - if (poiDataBuilder_ == null) { - return java.util.Collections.unmodifiableList(poiData_); - } else { - return poiDataBuilder_.getMessageList(); - } + return java.util.Collections.unmodifiableList(result.poiData_); } public int getPoiDataCount() { - if (poiDataBuilder_ == null) { - return poiData_.size(); - } else { - return poiDataBuilder_.getCount(); - } + return result.getPoiDataCount(); } public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom getPoiData(int index) { - if (poiDataBuilder_ == null) { - return poiData_.get(index); - } else { - return poiDataBuilder_.getMessage(index); - } + return result.getPoiData(index); } - public Builder setPoiData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom value) { - if (poiDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiDataIsMutable(); - poiData_.set(index, value); - onChanged(); - } else { - poiDataBuilder_.setMessage(index, value); + public Builder setPoiData(int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom value) { + if (value == null) { + throw new NullPointerException(); } + result.poiData_.set(index, value); return this; } - public Builder setPoiData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder builderForValue) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - poiData_.set(index, builderForValue.build()); - onChanged(); - } else { - poiDataBuilder_.setMessage(index, builderForValue.build()); - } + public Builder setPoiData(int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder builderForValue) { + result.poiData_.set(index, builderForValue.build()); return this; } public Builder addPoiData(net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom value) { - if (poiDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiDataIsMutable(); - poiData_.add(value); - onChanged(); - } else { - poiDataBuilder_.addMessage(value); + if (value == null) { + throw new NullPointerException(); } + if (result.poiData_.isEmpty()) { + result.poiData_ = new java.util.ArrayList(); + } + result.poiData_.add(value); return this; } - public Builder addPoiData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom value) { - if (poiDataBuilder_ == null) { - if (value == null) { - throw new NullPointerException(); - } - ensurePoiDataIsMutable(); - poiData_.add(index, value); - onChanged(); - } else { - poiDataBuilder_.addMessage(index, value); - } - return this; - } - public Builder addPoiData( - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder builderForValue) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - poiData_.add(builderForValue.build()); - onChanged(); - } else { - poiDataBuilder_.addMessage(builderForValue.build()); - } - return this; - } - public Builder addPoiData( - int index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder builderForValue) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - poiData_.add(index, builderForValue.build()); - onChanged(); - } else { - poiDataBuilder_.addMessage(index, builderForValue.build()); + public Builder addPoiData(net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder builderForValue) { + if (result.poiData_.isEmpty()) { + result.poiData_ = new java.util.ArrayList(); } + result.poiData_.add(builderForValue.build()); return this; } public Builder addAllPoiData( java.lang.Iterable values) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - super.addAll(values, poiData_); - onChanged(); - } else { - poiDataBuilder_.addAllMessages(values); + if (result.poiData_.isEmpty()) { + result.poiData_ = new java.util.ArrayList(); } + super.addAll(values, result.poiData_); return this; } public Builder clearPoiData() { - if (poiDataBuilder_ == null) { - poiData_ = java.util.Collections.emptyList(); - bitField0_ = (bitField0_ & ~0x00000008); - onChanged(); - } else { - poiDataBuilder_.clear(); - } + result.poiData_ = java.util.Collections.emptyList(); return this; } - public Builder removePoiData(int index) { - if (poiDataBuilder_ == null) { - ensurePoiDataIsMutable(); - poiData_.remove(index); - onChanged(); - } else { - poiDataBuilder_.remove(index); - } - return this; - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder getPoiDataBuilder( - int index) { - return getPoiDataFieldBuilder().getBuilder(index); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtomOrBuilder getPoiDataOrBuilder( - int index) { - if (poiDataBuilder_ == null) { - return poiData_.get(index); } else { - return poiDataBuilder_.getMessageOrBuilder(index); - } - } - public java.util.List - getPoiDataOrBuilderList() { - if (poiDataBuilder_ != null) { - return poiDataBuilder_.getMessageOrBuilderList(); - } else { - return java.util.Collections.unmodifiableList(poiData_); - } - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder addPoiDataBuilder() { - return getPoiDataFieldBuilder().addBuilder( - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.getDefaultInstance()); - } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder addPoiDataBuilder( - int index) { - return getPoiDataFieldBuilder().addBuilder( - index, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.getDefaultInstance()); - } - public java.util.List - getPoiDataBuilderList() { - return getPoiDataFieldBuilder().getBuilderList(); - } - private com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtomOrBuilder> - getPoiDataFieldBuilder() { - if (poiDataBuilder_ == null) { - poiDataBuilder_ = new com.google.protobuf.RepeatedFieldBuilder< - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.Builder, net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtomOrBuilder>( - poiData_, - ((bitField0_ & 0x00000008) == 0x00000008), - getParentForChildren(), - isClean()); - poiData_ = null; - } - return poiDataBuilder_; - } // @@protoc_insertion_point(builder_scope:OsmAndPoiBoxData) } static { defaultInstance = new OsmAndPoiBoxData(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } // @@protoc_insertion_point(class_scope:OsmAndPoiBoxData) } - public interface OsmAndPoiBoxDataAtomOrBuilder - extends com.google.protobuf.MessageOrBuilder { - - // required sint32 dx = 2; - boolean hasDx(); - int getDx(); - - // required sint32 dy = 3; - boolean hasDy(); - int getDy(); - - // repeated uint32 categories = 4; - java.util.List getCategoriesList(); - int getCategoriesCount(); - int getCategories(int index); - - // optional string name = 6; - boolean hasName(); - String getName(); - - // optional string nameEn = 7; - boolean hasNameEn(); - String getNameEn(); - - // optional uint64 id = 8; - boolean hasId(); - long getId(); - - // optional string openingHours = 10; - boolean hasOpeningHours(); - String getOpeningHours(); - - // optional string site = 11; - boolean hasSite(); - String getSite(); - - // optional string phone = 12; - boolean hasPhone(); - String getPhone(); - - // optional string note = 13; - boolean hasNote(); - String getNote(); - } public static final class OsmAndPoiBoxDataAtom extends - com.google.protobuf.GeneratedMessage - implements OsmAndPoiBoxDataAtomOrBuilder { + com.google.protobuf.GeneratedMessage { // Use OsmAndPoiBoxDataAtom.newBuilder() to construct. - private OsmAndPoiBoxDataAtom(Builder builder) { - super(builder); + private OsmAndPoiBoxDataAtom() { + initFields(); } private OsmAndPoiBoxDataAtom(boolean noInit) {} @@ -29617,7 +18057,8 @@ public final class OsmandOdb { return defaultInstance; } - public OsmAndPoiBoxDataAtom getDefaultInstanceForType() { + @Override + public OsmAndPoiBoxDataAtom getDefaultInstanceForType() { return defaultInstance; } @@ -29626,376 +18067,190 @@ public final class OsmandOdb { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBoxDataAtom_descriptor; } - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable + @Override + protected com.google.protobuf.GeneratedMessage.FieldAccessorTable internalGetFieldAccessorTable() { return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBoxDataAtom_fieldAccessorTable; } - private int bitField0_; // required sint32 dx = 2; public static final int DX_FIELD_NUMBER = 2; - private int dx_; - public boolean hasDx() { - return ((bitField0_ & 0x00000001) == 0x00000001); - } - public int getDx() { - return dx_; - } + private boolean hasDx; + private int dx_ = 0; + public boolean hasDx() { return hasDx; } + public int getDx() { return dx_; } // required sint32 dy = 3; public static final int DY_FIELD_NUMBER = 3; - private int dy_; - public boolean hasDy() { - return ((bitField0_ & 0x00000002) == 0x00000002); - } - public int getDy() { - return dy_; - } + private boolean hasDy; + private int dy_ = 0; + public boolean hasDy() { return hasDy; } + public int getDy() { return dy_; } // repeated uint32 categories = 4; public static final int CATEGORIES_FIELD_NUMBER = 4; - private java.util.List categories_; - public java.util.List - getCategoriesList() { + private java.util.List categories_ = + java.util.Collections.emptyList(); + public java.util.List getCategoriesList() { return categories_; } - public int getCategoriesCount() { - return categories_.size(); - } + public int getCategoriesCount() { return categories_.size(); } public int getCategories(int index) { return categories_.get(index); } // optional string name = 6; public static final int NAME_FIELD_NUMBER = 6; - private java.lang.Object name_; - public boolean hasName() { - return ((bitField0_ & 0x00000004) == 0x00000004); - } - public String getName() { - java.lang.Object ref = name_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - name_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameBytes() { - java.lang.Object ref = name_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - name_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasName; + private java.lang.String name_ = ""; + public boolean hasName() { return hasName; } + public java.lang.String getName() { return name_; } // optional string nameEn = 7; public static final int NAMEEN_FIELD_NUMBER = 7; - private java.lang.Object nameEn_; - public boolean hasNameEn() { - return ((bitField0_ & 0x00000008) == 0x00000008); - } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - nameEn_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNameEnBytes() { - java.lang.Object ref = nameEn_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - nameEn_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNameEn; + private java.lang.String nameEn_ = ""; + public boolean hasNameEn() { return hasNameEn; } + public java.lang.String getNameEn() { return nameEn_; } // optional uint64 id = 8; public static final int ID_FIELD_NUMBER = 8; - private long id_; - public boolean hasId() { - return ((bitField0_ & 0x00000010) == 0x00000010); - } - public long getId() { - return id_; - } + private boolean hasId; + private long id_ = 0L; + public boolean hasId() { return hasId; } + public long getId() { return id_; } // optional string openingHours = 10; public static final int OPENINGHOURS_FIELD_NUMBER = 10; - private java.lang.Object openingHours_; - public boolean hasOpeningHours() { - return ((bitField0_ & 0x00000020) == 0x00000020); - } - public String getOpeningHours() { - java.lang.Object ref = openingHours_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - openingHours_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getOpeningHoursBytes() { - java.lang.Object ref = openingHours_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - openingHours_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasOpeningHours; + private java.lang.String openingHours_ = ""; + public boolean hasOpeningHours() { return hasOpeningHours; } + public java.lang.String getOpeningHours() { return openingHours_; } // optional string site = 11; public static final int SITE_FIELD_NUMBER = 11; - private java.lang.Object site_; - public boolean hasSite() { - return ((bitField0_ & 0x00000040) == 0x00000040); - } - public String getSite() { - java.lang.Object ref = site_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - site_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getSiteBytes() { - java.lang.Object ref = site_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - site_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasSite; + private java.lang.String site_ = ""; + public boolean hasSite() { return hasSite; } + public java.lang.String getSite() { return site_; } // optional string phone = 12; public static final int PHONE_FIELD_NUMBER = 12; - private java.lang.Object phone_; - public boolean hasPhone() { - return ((bitField0_ & 0x00000080) == 0x00000080); - } - public String getPhone() { - java.lang.Object ref = phone_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - phone_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getPhoneBytes() { - java.lang.Object ref = phone_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - phone_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasPhone; + private java.lang.String phone_ = ""; + public boolean hasPhone() { return hasPhone; } + public java.lang.String getPhone() { return phone_; } // optional string note = 13; public static final int NOTE_FIELD_NUMBER = 13; - private java.lang.Object note_; - public boolean hasNote() { - return ((bitField0_ & 0x00000100) == 0x00000100); - } - public String getNote() { - java.lang.Object ref = note_; - if (ref instanceof String) { - return (String) ref; - } else { - com.google.protobuf.ByteString bs = - (com.google.protobuf.ByteString) ref; - String s = bs.toStringUtf8(); - if (com.google.protobuf.Internal.isValidUtf8(bs)) { - note_ = s; - } - return s; - } - } - private com.google.protobuf.ByteString getNoteBytes() { - java.lang.Object ref = note_; - if (ref instanceof String) { - com.google.protobuf.ByteString b = - com.google.protobuf.ByteString.copyFromUtf8((String) ref); - note_ = b; - return b; - } else { - return (com.google.protobuf.ByteString) ref; - } - } + private boolean hasNote; + private java.lang.String note_ = ""; + public boolean hasNote() { return hasNote; } + public java.lang.String getNote() { return note_; } private void initFields() { - dx_ = 0; - dy_ = 0; - categories_ = java.util.Collections.emptyList();; - name_ = ""; - nameEn_ = ""; - id_ = 0L; - openingHours_ = ""; - site_ = ""; - phone_ = ""; - note_ = ""; } - private byte memoizedIsInitialized = -1; - public final boolean isInitialized() { - byte isInitialized = memoizedIsInitialized; - if (isInitialized != -1) return isInitialized == 1; - - if (!hasDx()) { - memoizedIsInitialized = 0; - return false; - } - if (!hasDy()) { - memoizedIsInitialized = 0; - return false; - } - memoizedIsInitialized = 1; + @Override + public final boolean isInitialized() { + if (!hasDx) return false; + if (!hasDy) return false; return true; } - public void writeTo(com.google.protobuf.CodedOutputStream output) + @Override + public void writeTo(com.google.protobuf.CodedOutputStream output) throws java.io.IOException { getSerializedSize(); - if (((bitField0_ & 0x00000001) == 0x00000001)) { - output.writeSInt32(2, dx_); + if (hasDx()) { + output.writeSInt32(2, getDx()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { - output.writeSInt32(3, dy_); + if (hasDy()) { + output.writeSInt32(3, getDy()); } - for (int i = 0; i < categories_.size(); i++) { - output.writeUInt32(4, categories_.get(i)); + for (int element : getCategoriesList()) { + output.writeUInt32(4, element); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { - output.writeBytes(6, getNameBytes()); + if (hasName()) { + output.writeString(6, getName()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { - output.writeBytes(7, getNameEnBytes()); + if (hasNameEn()) { + output.writeString(7, getNameEn()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { - output.writeUInt64(8, id_); + if (hasId()) { + output.writeUInt64(8, getId()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { - output.writeBytes(10, getOpeningHoursBytes()); + if (hasOpeningHours()) { + output.writeString(10, getOpeningHours()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { - output.writeBytes(11, getSiteBytes()); + if (hasSite()) { + output.writeString(11, getSite()); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { - output.writeBytes(12, getPhoneBytes()); + if (hasPhone()) { + output.writeString(12, getPhone()); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { - output.writeBytes(13, getNoteBytes()); + if (hasNote()) { + output.writeString(13, getNote()); } getUnknownFields().writeTo(output); } private int memoizedSerializedSize = -1; - public int getSerializedSize() { + @Override + public int getSerializedSize() { int size = memoizedSerializedSize; if (size != -1) return size; size = 0; - if (((bitField0_ & 0x00000001) == 0x00000001)) { + if (hasDx()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(2, dx_); + .computeSInt32Size(2, getDx()); } - if (((bitField0_ & 0x00000002) == 0x00000002)) { + if (hasDy()) { size += com.google.protobuf.CodedOutputStream - .computeSInt32Size(3, dy_); + .computeSInt32Size(3, getDy()); } { int dataSize = 0; - for (int i = 0; i < categories_.size(); i++) { + for (int element : getCategoriesList()) { dataSize += com.google.protobuf.CodedOutputStream - .computeUInt32SizeNoTag(categories_.get(i)); + .computeUInt32SizeNoTag(element); } size += dataSize; size += 1 * getCategoriesList().size(); } - if (((bitField0_ & 0x00000004) == 0x00000004)) { + if (hasName()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(6, getNameBytes()); + .computeStringSize(6, getName()); } - if (((bitField0_ & 0x00000008) == 0x00000008)) { + if (hasNameEn()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(7, getNameEnBytes()); + .computeStringSize(7, getNameEn()); } - if (((bitField0_ & 0x00000010) == 0x00000010)) { + if (hasId()) { size += com.google.protobuf.CodedOutputStream - .computeUInt64Size(8, id_); + .computeUInt64Size(8, getId()); } - if (((bitField0_ & 0x00000020) == 0x00000020)) { + if (hasOpeningHours()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(10, getOpeningHoursBytes()); + .computeStringSize(10, getOpeningHours()); } - if (((bitField0_ & 0x00000040) == 0x00000040)) { + if (hasSite()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(11, getSiteBytes()); + .computeStringSize(11, getSite()); } - if (((bitField0_ & 0x00000080) == 0x00000080)) { + if (hasPhone()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(12, getPhoneBytes()); + .computeStringSize(12, getPhone()); } - if (((bitField0_ & 0x00000100) == 0x00000100)) { + if (hasNote()) { size += com.google.protobuf.CodedOutputStream - .computeBytesSize(13, getNoteBytes()); + .computeStringSize(13, getNote()); } size += getUnknownFields().getSerializedSize(); memoizedSerializedSize = size; return size; } - private static final long serialVersionUID = 0L; - @java.lang.Override - protected java.lang.Object writeReplace() - throws java.io.ObjectStreamException { - return super.writeReplace(); - } - public static net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { @@ -30064,155 +18319,96 @@ public final class OsmandOdb { } public static Builder newBuilder() { return Builder.create(); } - public Builder newBuilderForType() { return newBuilder(); } + @Override + public Builder newBuilderForType() { return newBuilder(); } public static Builder newBuilder(net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom prototype) { return newBuilder().mergeFrom(prototype); } - public Builder toBuilder() { return newBuilder(this); } + @Override + public Builder toBuilder() { return newBuilder(this); } - @java.lang.Override - protected Builder newBuilderForType( - com.google.protobuf.GeneratedMessage.BuilderParent parent) { - Builder builder = new Builder(parent); - return builder; - } public static final class Builder extends - com.google.protobuf.GeneratedMessage.Builder - implements net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtomOrBuilder { - public static final com.google.protobuf.Descriptors.Descriptor - getDescriptor() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBoxDataAtom_descriptor; - } - - protected com.google.protobuf.GeneratedMessage.FieldAccessorTable - internalGetFieldAccessorTable() { - return net.osmand.binary.OsmandOdb.internal_static_OsmAndPoiBoxDataAtom_fieldAccessorTable; - } + com.google.protobuf.GeneratedMessage.Builder { + private net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom result; // Construct using net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.newBuilder() - private Builder() { - maybeForceBuilderInitialization(); - } + private Builder() {} - private Builder(BuilderParent parent) { - super(parent); - maybeForceBuilderInitialization(); - } - private void maybeForceBuilderInitialization() { - if (com.google.protobuf.GeneratedMessage.alwaysUseFieldBuilders) { - } - } private static Builder create() { - return new Builder(); + Builder builder = new Builder(); + builder.result = new net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom(); + return builder; } - public Builder clear() { - super.clear(); - dx_ = 0; - bitField0_ = (bitField0_ & ~0x00000001); - dy_ = 0; - bitField0_ = (bitField0_ & ~0x00000002); - categories_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000004); - name_ = ""; - bitField0_ = (bitField0_ & ~0x00000008); - nameEn_ = ""; - bitField0_ = (bitField0_ & ~0x00000010); - id_ = 0L; - bitField0_ = (bitField0_ & ~0x00000020); - openingHours_ = ""; - bitField0_ = (bitField0_ & ~0x00000040); - site_ = ""; - bitField0_ = (bitField0_ & ~0x00000080); - phone_ = ""; - bitField0_ = (bitField0_ & ~0x00000100); - note_ = ""; - bitField0_ = (bitField0_ & ~0x00000200); + @Override + protected net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom internalGetResult() { + return result; + } + + @Override + public Builder clear() { + if (result == null) { + throw new IllegalStateException( + "Cannot call clear() after build()."); + } + result = new net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom(); return this; } - public Builder clone() { - return create().mergeFrom(buildPartial()); + @Override + public Builder clone() { + return create().mergeFrom(result); } - public com.google.protobuf.Descriptors.Descriptor + @Override + public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.getDescriptor(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom getDefaultInstanceForType() { + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom getDefaultInstanceForType() { return net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom.getDefaultInstance(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom build() { - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom result = buildPartial(); - if (!result.isInitialized()) { + @Override + public boolean isInitialized() { + return result.isInitialized(); + } + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom build() { + if (result != null && !isInitialized()) { throw newUninitializedMessageException(result); } - return result; + return buildPartial(); } private net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom buildParsed() throws com.google.protobuf.InvalidProtocolBufferException { - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom result = buildPartial(); - if (!result.isInitialized()) { + if (!isInitialized()) { throw newUninitializedMessageException( result).asInvalidProtocolBufferException(); } - return result; + return buildPartial(); } - public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom buildPartial() { - net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom result = new net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom(this); - int from_bitField0_ = bitField0_; - int to_bitField0_ = 0; - if (((from_bitField0_ & 0x00000001) == 0x00000001)) { - to_bitField0_ |= 0x00000001; + @Override + public net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom buildPartial() { + if (result == null) { + throw new IllegalStateException( + "build() has already been called on this Builder."); } - result.dx_ = dx_; - if (((from_bitField0_ & 0x00000002) == 0x00000002)) { - to_bitField0_ |= 0x00000002; + if (result.categories_ != java.util.Collections.EMPTY_LIST) { + result.categories_ = + java.util.Collections.unmodifiableList(result.categories_); } - result.dy_ = dy_; - if (((bitField0_ & 0x00000004) == 0x00000004)) { - categories_ = java.util.Collections.unmodifiableList(categories_); - bitField0_ = (bitField0_ & ~0x00000004); - } - result.categories_ = categories_; - if (((from_bitField0_ & 0x00000008) == 0x00000008)) { - to_bitField0_ |= 0x00000004; - } - result.name_ = name_; - if (((from_bitField0_ & 0x00000010) == 0x00000010)) { - to_bitField0_ |= 0x00000008; - } - result.nameEn_ = nameEn_; - if (((from_bitField0_ & 0x00000020) == 0x00000020)) { - to_bitField0_ |= 0x00000010; - } - result.id_ = id_; - if (((from_bitField0_ & 0x00000040) == 0x00000040)) { - to_bitField0_ |= 0x00000020; - } - result.openingHours_ = openingHours_; - if (((from_bitField0_ & 0x00000080) == 0x00000080)) { - to_bitField0_ |= 0x00000040; - } - result.site_ = site_; - if (((from_bitField0_ & 0x00000100) == 0x00000100)) { - to_bitField0_ |= 0x00000080; - } - result.phone_ = phone_; - if (((from_bitField0_ & 0x00000200) == 0x00000200)) { - to_bitField0_ |= 0x00000100; - } - result.note_ = note_; - result.bitField0_ = to_bitField0_; - onBuilt(); - return result; + net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom returnMe = result; + result = null; + return returnMe; } - public Builder mergeFrom(com.google.protobuf.Message other) { + @Override + public Builder mergeFrom(com.google.protobuf.Message other) { if (other instanceof net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom) { return mergeFrom((net.osmand.binary.OsmandOdb.OsmAndPoiBoxDataAtom)other); } else { @@ -30230,14 +18426,10 @@ public final class OsmandOdb { setDy(other.getDy()); } if (!other.categories_.isEmpty()) { - if (categories_.isEmpty()) { - categories_ = other.categories_; - bitField0_ = (bitField0_ & ~0x00000004); - } else { - ensureCategoriesIsMutable(); - categories_.addAll(other.categories_); + if (result.categories_.isEmpty()) { + result.categories_ = new java.util.ArrayList(); } - onChanged(); + result.categories_.addAll(other.categories_); } if (other.hasName()) { setName(other.getName()); @@ -30264,19 +18456,8 @@ public final class OsmandOdb { return this; } - public final boolean isInitialized() { - if (!hasDx()) { - - return false; - } - if (!hasDy()) { - - return false; - } - return true; - } - - public Builder mergeFrom( + @Override + public Builder mergeFrom( com.google.protobuf.CodedInputStream input, com.google.protobuf.ExtensionRegistryLite extensionRegistry) throws java.io.IOException { @@ -30288,30 +18469,25 @@ public final class OsmandOdb { switch (tag) { case 0: this.setUnknownFields(unknownFields.build()); - onChanged(); return this; default: { if (!parseUnknownField(input, unknownFields, extensionRegistry, tag)) { this.setUnknownFields(unknownFields.build()); - onChanged(); return this; } break; } case 16: { - bitField0_ |= 0x00000001; - dx_ = input.readSInt32(); + setDx(input.readSInt32()); break; } case 24: { - bitField0_ |= 0x00000002; - dy_ = input.readSInt32(); + setDy(input.readSInt32()); break; } case 32: { - ensureCategoriesIsMutable(); - categories_.add(input.readUInt32()); + addCategories(input.readUInt32()); break; } case 34: { @@ -30324,375 +18500,258 @@ public final class OsmandOdb { break; } case 50: { - bitField0_ |= 0x00000008; - name_ = input.readBytes(); + setName(input.readString()); break; } case 58: { - bitField0_ |= 0x00000010; - nameEn_ = input.readBytes(); + setNameEn(input.readString()); break; } case 64: { - bitField0_ |= 0x00000020; - id_ = input.readUInt64(); + setId(input.readUInt64()); break; } case 82: { - bitField0_ |= 0x00000040; - openingHours_ = input.readBytes(); + setOpeningHours(input.readString()); break; } case 90: { - bitField0_ |= 0x00000080; - site_ = input.readBytes(); + setSite(input.readString()); break; } case 98: { - bitField0_ |= 0x00000100; - phone_ = input.readBytes(); + setPhone(input.readString()); break; } case 106: { - bitField0_ |= 0x00000200; - note_ = input.readBytes(); + setNote(input.readString()); break; } } } } - private int bitField0_; // required sint32 dx = 2; - private int dx_ ; public boolean hasDx() { - return ((bitField0_ & 0x00000001) == 0x00000001); + return result.hasDx(); } public int getDx() { - return dx_; + return result.getDx(); } public Builder setDx(int value) { - bitField0_ |= 0x00000001; - dx_ = value; - onChanged(); + result.hasDx = true; + result.dx_ = value; return this; } public Builder clearDx() { - bitField0_ = (bitField0_ & ~0x00000001); - dx_ = 0; - onChanged(); + result.hasDx = false; + result.dx_ = 0; return this; } // required sint32 dy = 3; - private int dy_ ; public boolean hasDy() { - return ((bitField0_ & 0x00000002) == 0x00000002); + return result.hasDy(); } public int getDy() { - return dy_; + return result.getDy(); } public Builder setDy(int value) { - bitField0_ |= 0x00000002; - dy_ = value; - onChanged(); + result.hasDy = true; + result.dy_ = value; return this; } public Builder clearDy() { - bitField0_ = (bitField0_ & ~0x00000002); - dy_ = 0; - onChanged(); + result.hasDy = false; + result.dy_ = 0; return this; } // repeated uint32 categories = 4; - private java.util.List categories_ = java.util.Collections.emptyList();; - private void ensureCategoriesIsMutable() { - if (!((bitField0_ & 0x00000004) == 0x00000004)) { - categories_ = new java.util.ArrayList(categories_); - bitField0_ |= 0x00000004; - } - } - public java.util.List - getCategoriesList() { - return java.util.Collections.unmodifiableList(categories_); + public java.util.List getCategoriesList() { + return java.util.Collections.unmodifiableList(result.categories_); } public int getCategoriesCount() { - return categories_.size(); + return result.getCategoriesCount(); } public int getCategories(int index) { - return categories_.get(index); + return result.getCategories(index); } - public Builder setCategories( - int index, int value) { - ensureCategoriesIsMutable(); - categories_.set(index, value); - onChanged(); + public Builder setCategories(int index, int value) { + result.categories_.set(index, value); return this; } public Builder addCategories(int value) { - ensureCategoriesIsMutable(); - categories_.add(value); - onChanged(); + if (result.categories_.isEmpty()) { + result.categories_ = new java.util.ArrayList(); + } + result.categories_.add(value); return this; } public Builder addAllCategories( java.lang.Iterable values) { - ensureCategoriesIsMutable(); - super.addAll(values, categories_); - onChanged(); + if (result.categories_.isEmpty()) { + result.categories_ = new java.util.ArrayList(); + } + super.addAll(values, result.categories_); return this; } public Builder clearCategories() { - categories_ = java.util.Collections.emptyList();; - bitField0_ = (bitField0_ & ~0x00000004); - onChanged(); + result.categories_ = java.util.Collections.emptyList(); return this; } // optional string name = 6; - private java.lang.Object name_ = ""; public boolean hasName() { - return ((bitField0_ & 0x00000008) == 0x00000008); + return result.hasName(); } - public String getName() { - java.lang.Object ref = name_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - name_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getName() { + return result.getName(); } - public Builder setName(String value) { + public Builder setName(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000008; - name_ = value; - onChanged(); + result.hasName = true; + result.name_ = value; return this; } public Builder clearName() { - bitField0_ = (bitField0_ & ~0x00000008); - name_ = getDefaultInstance().getName(); - onChanged(); + result.hasName = false; + result.name_ = getDefaultInstance().getName(); return this; } - void setName(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000008; - name_ = value; - onChanged(); - } // optional string nameEn = 7; - private java.lang.Object nameEn_ = ""; public boolean hasNameEn() { - return ((bitField0_ & 0x00000010) == 0x00000010); + return result.hasNameEn(); } - public String getNameEn() { - java.lang.Object ref = nameEn_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - nameEn_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNameEn() { + return result.getNameEn(); } - public Builder setNameEn(String value) { + public Builder setNameEn(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000010; - nameEn_ = value; - onChanged(); + result.hasNameEn = true; + result.nameEn_ = value; return this; } public Builder clearNameEn() { - bitField0_ = (bitField0_ & ~0x00000010); - nameEn_ = getDefaultInstance().getNameEn(); - onChanged(); + result.hasNameEn = false; + result.nameEn_ = getDefaultInstance().getNameEn(); return this; } - void setNameEn(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000010; - nameEn_ = value; - onChanged(); - } // optional uint64 id = 8; - private long id_ ; public boolean hasId() { - return ((bitField0_ & 0x00000020) == 0x00000020); + return result.hasId(); } public long getId() { - return id_; + return result.getId(); } public Builder setId(long value) { - bitField0_ |= 0x00000020; - id_ = value; - onChanged(); + result.hasId = true; + result.id_ = value; return this; } public Builder clearId() { - bitField0_ = (bitField0_ & ~0x00000020); - id_ = 0L; - onChanged(); + result.hasId = false; + result.id_ = 0L; return this; } // optional string openingHours = 10; - private java.lang.Object openingHours_ = ""; public boolean hasOpeningHours() { - return ((bitField0_ & 0x00000040) == 0x00000040); + return result.hasOpeningHours(); } - public String getOpeningHours() { - java.lang.Object ref = openingHours_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - openingHours_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getOpeningHours() { + return result.getOpeningHours(); } - public Builder setOpeningHours(String value) { + public Builder setOpeningHours(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000040; - openingHours_ = value; - onChanged(); + result.hasOpeningHours = true; + result.openingHours_ = value; return this; } public Builder clearOpeningHours() { - bitField0_ = (bitField0_ & ~0x00000040); - openingHours_ = getDefaultInstance().getOpeningHours(); - onChanged(); + result.hasOpeningHours = false; + result.openingHours_ = getDefaultInstance().getOpeningHours(); return this; } - void setOpeningHours(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000040; - openingHours_ = value; - onChanged(); - } // optional string site = 11; - private java.lang.Object site_ = ""; public boolean hasSite() { - return ((bitField0_ & 0x00000080) == 0x00000080); + return result.hasSite(); } - public String getSite() { - java.lang.Object ref = site_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - site_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getSite() { + return result.getSite(); } - public Builder setSite(String value) { + public Builder setSite(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000080; - site_ = value; - onChanged(); + result.hasSite = true; + result.site_ = value; return this; } public Builder clearSite() { - bitField0_ = (bitField0_ & ~0x00000080); - site_ = getDefaultInstance().getSite(); - onChanged(); + result.hasSite = false; + result.site_ = getDefaultInstance().getSite(); return this; } - void setSite(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000080; - site_ = value; - onChanged(); - } // optional string phone = 12; - private java.lang.Object phone_ = ""; public boolean hasPhone() { - return ((bitField0_ & 0x00000100) == 0x00000100); + return result.hasPhone(); } - public String getPhone() { - java.lang.Object ref = phone_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - phone_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getPhone() { + return result.getPhone(); } - public Builder setPhone(String value) { + public Builder setPhone(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000100; - phone_ = value; - onChanged(); + result.hasPhone = true; + result.phone_ = value; return this; } public Builder clearPhone() { - bitField0_ = (bitField0_ & ~0x00000100); - phone_ = getDefaultInstance().getPhone(); - onChanged(); + result.hasPhone = false; + result.phone_ = getDefaultInstance().getPhone(); return this; } - void setPhone(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000100; - phone_ = value; - onChanged(); - } // optional string note = 13; - private java.lang.Object note_ = ""; public boolean hasNote() { - return ((bitField0_ & 0x00000200) == 0x00000200); + return result.hasNote(); } - public String getNote() { - java.lang.Object ref = note_; - if (!(ref instanceof String)) { - String s = ((com.google.protobuf.ByteString) ref).toStringUtf8(); - note_ = s; - return s; - } else { - return (String) ref; - } + public java.lang.String getNote() { + return result.getNote(); } - public Builder setNote(String value) { + public Builder setNote(java.lang.String value) { if (value == null) { throw new NullPointerException(); } - bitField0_ |= 0x00000200; - note_ = value; - onChanged(); + result.hasNote = true; + result.note_ = value; return this; } public Builder clearNote() { - bitField0_ = (bitField0_ & ~0x00000200); - note_ = getDefaultInstance().getNote(); - onChanged(); + result.hasNote = false; + result.note_ = getDefaultInstance().getNote(); return this; } - void setNote(com.google.protobuf.ByteString value) { - bitField0_ |= 0x00000200; - note_ = value; - onChanged(); - } // @@protoc_insertion_point(builder_scope:OsmAndPoiBoxDataAtom) } static { defaultInstance = new OsmAndPoiBoxDataAtom(true); + net.osmand.binary.OsmandOdb.internalForceInit(); defaultInstance.initFields(); } @@ -30904,7 +18963,7 @@ public final class OsmandOdb { "\002(\r\022\016\n\006bottom\030\004 \002(\r\"\030\n\013StringTable\022\t\n\001s\030" + "\001 \003(\t\"f\n\022IndexedStringTable\022\016\n\006prefix\030\001 ", "\001(\t\022\013\n\003key\030\003 \003(\t\022\013\n\003val\030\004 \003(\r\022&\n\tsubtabl" + - "es\030\005 \003(\0132\023.IndexedStringTable\"\330\004\n\016OsmAnd" + + "es\030\005 \003(\0132\023.IndexedStringTable\"\347\004\n\016OsmAnd" + "MapIndex\022\014\n\004name\030\002 \002(\t\022.\n\005rules\030\004 \003(\0132\037." + "OsmAndMapIndex.MapEncodingRule\022,\n\006levels" + "\030\005 \003(\0132\034.OsmAndMapIndex.MapRootLevel\022-\n\006" + @@ -30915,103 +18974,103 @@ public final class OsmandOdb { "m\030\001 \002(\005\022\017\n\007minZoom\030\002 \002(\005\022\014\n\004left\030\003 \002(\005\022\r", "\n\005right\030\004 \002(\005\022\013\n\003top\030\005 \002(\005\022\016\n\006bottom\030\006 \002" + "(\005\022)\n\005boxes\030\007 \003(\0132\032.OsmAndMapIndex.MapDa" + - "taBox\032\211\001\n\nMapDataBox\022\014\n\004left\030\001 \002(\021\022\r\n\005ri" + + "taBox\032\230\001\n\nMapDataBox\022\014\n\004left\030\001 \002(\021\022\r\n\005ri" + "ght\030\002 \002(\021\022\013\n\003top\030\003 \002(\021\022\016\n\006bottom\030\004 \002(\021\022\026" + - "\n\016shiftToMapData\030\005 \001(\r\022)\n\005boxes\030\007 \003(\0132\032." + - "OsmAndMapIndex.MapDataBox\032-\n\rMapDataBloc" + - "ks\022\034\n\005block\030\006 \003(\0132\r.MapDataBlock\"`\n\014MapD" + - "ataBlock\022\016\n\006baseId\030\n \001(\004\022\035\n\013dataObjects\030" + - "\014 \003(\0132\010.MapData\022!\n\013stringTable\030\017 \001(\0132\014.S" + - "tringTable\"\307\001\n\007MapData\022\030\n\020pointCoordinat", - "es\030\001 \001(\014\022\027\n\017lineCoordinates\030\002 \001(\014\022\037\n\027pol" + - "ygonOuterCoordinates\030\003 \001(\014\022\037\n\027polygonInn" + - "erCoordinates\030\004 \003(\014\022\027\n\017additionalTypes\030\006" + - " \001(\014\022\r\n\005types\030\007 \002(\014\022\023\n\013stringNames\030\n \001(\014" + - "\022\n\n\002id\030\014 \002(\022\"\222\002\n\022OsmAndAddressIndex\022\014\n\004n" + - "ame\030\001 \002(\t\022\017\n\007name_en\030\002 \001(\t\022\"\n\nboundaries" + - "\030\003 \001(\0132\016.OsmAndTileBox\022/\n\006cities\030\006 \003(\0132\037" + - ".OsmAndAddressIndex.CitiesIndex\022.\n\tnameI" + - "ndex\030\007 \001(\0132\033.OsmAndAddressNameIndexData\032" + - "X\n\013CitiesIndex\022\014\n\004type\030\002 \002(\r\022\032\n\006cities\030\005", - " \003(\0132\n.CityIndex\022\037\n\006blocks\030\007 \003(\0132\017.CityB" + - "lockIndex\"\303\002\n\032OsmAndAddressNameIndexData" + - "\022F\n\006blocks\030\003 \003(\01326.OsmAndAddressNameInde" + - "xData.AddressNameIndexDataBlocks\022\"\n\005tabl" + - "e\030\004 \002(\0132\023.IndexedStringTable\032\270\001\n\032Address" + - "NameIndexDataBlocks\022Y\n\004atom\030\004 \003(\0132K.OsmA" + + "\n\016shiftToMapData\030\005 \001(\007\022\r\n\005ocean\030\006 \001(\010\022)\n" + + "\005boxes\030\007 \003(\0132\032.OsmAndMapIndex.MapDataBox" + + "\032-\n\rMapDataBlocks\022\034\n\005block\030\006 \003(\0132\r.MapDa" + + "taBlock\"`\n\014MapDataBlock\022\016\n\006baseId\030\n \001(\004\022" + + "\035\n\013dataObjects\030\014 \003(\0132\010.MapData\022!\n\013string" + + "Table\030\017 \001(\0132\014.StringTable\"\241\001\n\007MapData\022\023\n", + "\013coordinates\030\001 \001(\014\022\027\n\017areaCoordinates\030\002 " + + "\001(\014\022\037\n\027polygonInnerCoordinates\030\004 \003(\014\022\027\n\017" + + "additionalTypes\030\006 \001(\014\022\r\n\005types\030\007 \002(\014\022\023\n\013" + + "stringNames\030\n \001(\014\022\n\n\002id\030\014 \002(\022\"\222\002\n\022OsmAnd" + + "AddressIndex\022\014\n\004name\030\001 \002(\t\022\017\n\007name_en\030\002 " + + "\001(\t\022\"\n\nboundaries\030\003 \001(\0132\016.OsmAndTileBox\022" + + "/\n\006cities\030\006 \003(\0132\037.OsmAndAddressIndex.Cit" + + "iesIndex\022.\n\tnameIndex\030\007 \001(\0132\033.OsmAndAddr" + + "essNameIndexData\032X\n\013CitiesIndex\022\014\n\004type\030" + + "\002 \002(\r\022\032\n\006cities\030\005 \003(\0132\n.CityIndex\022\037\n\006blo", + "cks\030\007 \003(\0132\017.CityBlockIndex\"\303\002\n\032OsmAndAdd" + + "ressNameIndexData\022F\n\006blocks\030\003 \003(\01326.OsmA" + "ndAddressNameIndexData.AddressNameIndexD" + - "ataBlocks.AddressNameIndexData\032?\n\024Addres" + - "sNameIndexData\022\'\n\004atom\030\004 \003(\0132\031.AddressNa" + - "meIndexDataAtom\"v\n\030AddressNameIndexDataA", - "tom\022\014\n\004name\030\001 \002(\t\022\016\n\006nameEn\030\002 \001(\t\022\014\n\004typ" + - "e\030\003 \002(\r\022\024\n\014shiftToIndex\030\005 \003(\007\022\030\n\020shiftTo" + - "CityIndex\030\006 \003(\007\"~\n\tCityIndex\022\021\n\tcity_typ" + - "e\030\001 \001(\r\022\014\n\004name\030\002 \002(\t\022\017\n\007name_en\030\003 \001(\t\022\n" + - "\n\002id\030\004 \001(\004\022\t\n\001x\030\005 \002(\r\022\t\n\001y\030\006 \002(\r\022\035\n\025shif" + - "tToCityBlockIndex\030\n \001(\007\"l\n\016CityBlockInde" + - "x\022\030\n\020shiftToCityIndex\030\004 \001(\007\022!\n\tbuildings" + - "\030\020 \003(\0132\016.BuildingIndex\022\035\n\007streets\030\022 \003(\0132" + - "\014.StreetIndex\"\235\001\n\013StreetIndex\022\014\n\004name\030\001 " + - "\002(\t\022\017\n\007name_en\030\002 \001(\t\022\t\n\001x\030\003 \002(\021\022\t\n\001y\030\004 \002", - "(\021\022\n\n\002id\030\006 \001(\004\022!\n\tbuildings\030\014 \003(\0132\016.Buil" + - "dingIndex\022*\n\rintersections\030\005 \003(\0132\023.Stree" + - "tIntersection\"_\n\022StreetIntersection\022\014\n\004n" + - "ame\030\002 \002(\t\022\017\n\007name_en\030\003 \001(\t\022\024\n\014intersecte" + - "dX\030\004 \002(\021\022\024\n\014intersectedY\030\005 \002(\021\"\262\001\n\rBuild" + - "ingIndex\022\014\n\004name\030\001 \002(\t\022\017\n\007name_en\030\002 \001(\t\022" + - "\r\n\005name2\030\003 \001(\t\022\020\n\010name_en2\030\004 \001(\t\022\025\n\rinte" + - "rpolation\030\005 \001(\021\022\t\n\001x\030\007 \002(\021\022\t\n\001y\030\010 \002(\021\022\n\n" + - "\002x2\030\t \001(\021\022\n\n\002y2\030\n \001(\021\022\n\n\002id\030\r \001(\004\022\020\n\010pos" + - "tcode\030\016 \001(\t\"2\n\017TransportRoutes\022\037\n\006routes", - "\030\006 \003(\0132\017.TransportRoute\"\317\001\n\016TransportRou" + - "te\022\n\n\002id\030\001 \002(\004\022\014\n\004type\030\003 \001(\r\022\020\n\010operator" + - "\030\004 \001(\r\022\013\n\003ref\030\005 \001(\t\022\014\n\004name\030\006 \001(\r\022\017\n\007nam" + - "e_en\030\007 \001(\r\022\020\n\010distance\030\010 \001(\r\022(\n\013directSt" + - "ops\030\017 \003(\0132\023.TransportRouteStop\022)\n\014revers" + - "eStops\030\020 \003(\0132\023.TransportRouteStop\"W\n\022Tra" + - "nsportRouteStop\022\n\n\002id\030\001 \002(\022\022\n\n\002dx\030\002 \002(\021\022" + - "\n\n\002dy\030\003 \002(\021\022\014\n\004name\030\006 \002(\r\022\017\n\007name_en\030\007 \001" + - "(\r\"b\n\rTransportStop\022\n\n\002dx\030\001 \002(\021\022\n\n\002dy\030\002 " + - "\002(\021\022\n\n\002id\030\005 \002(\022\022\014\n\004name\030\006 \002(\r\022\017\n\007name_en", - "\030\007 \001(\r\022\016\n\006routes\030\020 \003(\r\"\244\001\n\022TransportStop" + - "sTree\022\014\n\004left\030\001 \002(\021\022\r\n\005right\030\002 \002(\021\022\013\n\003to" + - "p\030\003 \002(\021\022\016\n\006bottom\030\004 \002(\021\022%\n\010subtrees\030\007 \003(" + - "\0132\023.TransportStopsTree\022\035\n\005leafs\030\010 \003(\0132\016." + - "TransportStop\022\016\n\006baseId\030\020 \001(\004\"\215\001\n\024OsmAnd" + - "TransportIndex\022\014\n\004name\030\001 \001(\t\022 \n\006routes\030\003" + - " \001(\0132\020.TransportRoutes\022\"\n\005stops\030\006 \001(\0132\023." + - "TransportStopsTree\022!\n\013stringTable\030\t \002(\0132" + - "\014.StringTable\"\377\001\n\016OsmAndPoiIndex\022\014\n\004name" + - "\030\001 \002(\t\022\"\n\nboundaries\030\002 \002(\0132\016.OsmAndTileB", - "ox\022-\n\017categoriesTable\030\003 \003(\0132\024.OsmAndCate" + - "goryTable\022&\n\tnameIndex\030\004 \001(\0132\023.OsmAndPoi" + - "NameIndex\022\"\n\005table\030\005 \001(\0132\023.IndexedString" + - "Table\022\034\n\005boxes\030\006 \003(\0132\r.OsmAndPoiBox\022\"\n\007p" + - "oiData\030\t \003(\0132\021.OsmAndPoiBoxData\"\224\001\n\022OsmA" + - "ndPoiNameIndex\0228\n\004data\030\003 \003(\0132*.OsmAndPoi" + - "NameIndex.OsmAndPoiNameIndexData\032D\n\026OsmA" + - "ndPoiNameIndexData\022*\n\005atoms\030\003 \003(\0132\033.OsmA" + - "ndPoiNameIndexDataAtom\"Q\n\032OsmAndPoiNameI" + - "ndexDataAtom\022\014\n\004zoom\030\002 \001(\r\022\t\n\001x\030\003 \001(\r\022\t\n", - "\001y\030\004 \001(\r\022\017\n\007shiftTo\030\016 \001(\007\">\n\023OsmAndCateg" + - "oryTable\022\020\n\010category\030\001 \002(\t\022\025\n\rsubcategor" + - "ies\030\003 \003(\t\"\227\001\n\014OsmAndPoiBox\022\014\n\004zoom\030\001 \002(\r" + - "\022\014\n\004left\030\002 \002(\021\022\013\n\003top\030\003 \002(\021\022(\n\ncategorie" + - "s\030\004 \001(\0132\024.OsmAndPoiCategories\022\037\n\010subBoxe" + - "s\030\n \003(\0132\r.OsmAndPoiBox\022\023\n\013shiftToData\030\016 " + - "\001(\007\")\n\023OsmAndPoiCategories\022\022\n\ncategories" + - "\030\003 \003(\r\"^\n\020OsmAndPoiBoxData\022\014\n\004zoom\030\001 \001(\r" + - "\022\t\n\001x\030\002 \001(\r\022\t\n\001y\030\003 \001(\r\022&\n\007poiData\030\005 \003(\0132" + - "\025.OsmAndPoiBoxDataAtom\"\255\001\n\024OsmAndPoiBoxD", - "ataAtom\022\n\n\002dx\030\002 \002(\021\022\n\n\002dy\030\003 \002(\021\022\022\n\ncateg" + - "ories\030\004 \003(\r\022\014\n\004name\030\006 \001(\t\022\016\n\006nameEn\030\007 \001(" + - "\t\022\n\n\002id\030\010 \001(\004\022\024\n\014openingHours\030\n \001(\t\022\014\n\004s" + - "ite\030\013 \001(\t\022\r\n\005phone\030\014 \001(\t\022\014\n\004note\030\r \001(\tB\023" + - "\n\021net.osmand.binary" + "ataBlocks\022\"\n\005table\030\004 \002(\0132\023.IndexedString" + + "Table\032\270\001\n\032AddressNameIndexDataBlocks\022Y\n\004" + + "atom\030\004 \003(\0132K.OsmAndAddressNameIndexData." + + "AddressNameIndexDataBlocks.AddressNameIn" + + "dexData\032?\n\024AddressNameIndexData\022\'\n\004atom\030" + + "\004 \003(\0132\031.AddressNameIndexDataAtom\"v\n\030Addr" + + "essNameIndexDataAtom\022\014\n\004name\030\001 \002(\t\022\016\n\006na", + "meEn\030\002 \001(\t\022\014\n\004type\030\003 \002(\r\022\024\n\014shiftToIndex" + + "\030\005 \003(\007\022\030\n\020shiftToCityIndex\030\006 \003(\007\"~\n\tCity" + + "Index\022\021\n\tcity_type\030\001 \001(\r\022\014\n\004name\030\002 \002(\t\022\017" + + "\n\007name_en\030\003 \001(\t\022\n\n\002id\030\004 \001(\004\022\t\n\001x\030\005 \002(\r\022\t" + + "\n\001y\030\006 \002(\r\022\035\n\025shiftToCityBlockIndex\030\n \001(\007" + + "\"l\n\016CityBlockIndex\022\030\n\020shiftToCityIndex\030\004" + + " \001(\007\022!\n\tbuildings\030\020 \003(\0132\016.BuildingIndex\022" + + "\035\n\007streets\030\022 \003(\0132\014.StreetIndex\"\235\001\n\013Stree" + + "tIndex\022\014\n\004name\030\001 \002(\t\022\017\n\007name_en\030\002 \001(\t\022\t\n" + + "\001x\030\003 \002(\021\022\t\n\001y\030\004 \002(\021\022\n\n\002id\030\006 \001(\004\022!\n\tbuild", + "ings\030\014 \003(\0132\016.BuildingIndex\022*\n\rintersecti" + + "ons\030\005 \003(\0132\023.StreetIntersection\"_\n\022Street" + + "Intersection\022\014\n\004name\030\002 \002(\t\022\017\n\007name_en\030\003 " + + "\001(\t\022\024\n\014intersectedX\030\004 \002(\021\022\024\n\014intersected" + + "Y\030\005 \002(\021\"\262\001\n\rBuildingIndex\022\014\n\004name\030\001 \002(\t\022" + + "\017\n\007name_en\030\002 \001(\t\022\r\n\005name2\030\003 \001(\t\022\020\n\010name_" + + "en2\030\004 \001(\t\022\025\n\rinterpolation\030\005 \001(\021\022\t\n\001x\030\007 " + + "\002(\021\022\t\n\001y\030\010 \002(\021\022\n\n\002x2\030\t \001(\021\022\n\n\002y2\030\n \001(\021\022\n" + + "\n\002id\030\r \001(\004\022\020\n\010postcode\030\016 \001(\t\"2\n\017Transpor" + + "tRoutes\022\037\n\006routes\030\006 \003(\0132\017.TransportRoute", + "\"\317\001\n\016TransportRoute\022\n\n\002id\030\001 \002(\004\022\014\n\004type\030" + + "\003 \001(\r\022\020\n\010operator\030\004 \001(\r\022\013\n\003ref\030\005 \001(\t\022\014\n\004" + + "name\030\006 \001(\r\022\017\n\007name_en\030\007 \001(\r\022\020\n\010distance\030" + + "\010 \001(\r\022(\n\013directStops\030\017 \003(\0132\023.TransportRo" + + "uteStop\022)\n\014reverseStops\030\020 \003(\0132\023.Transpor" + + "tRouteStop\"W\n\022TransportRouteStop\022\n\n\002id\030\001" + + " \002(\022\022\n\n\002dx\030\002 \002(\021\022\n\n\002dy\030\003 \002(\021\022\014\n\004name\030\006 \002" + + "(\r\022\017\n\007name_en\030\007 \001(\r\"b\n\rTransportStop\022\n\n\002" + + "dx\030\001 \002(\021\022\n\n\002dy\030\002 \002(\021\022\n\n\002id\030\005 \002(\022\022\014\n\004name" + + "\030\006 \002(\r\022\017\n\007name_en\030\007 \001(\r\022\016\n\006routes\030\020 \003(\r\"", + "\244\001\n\022TransportStopsTree\022\014\n\004left\030\001 \002(\021\022\r\n\005" + + "right\030\002 \002(\021\022\013\n\003top\030\003 \002(\021\022\016\n\006bottom\030\004 \002(\021" + + "\022%\n\010subtrees\030\007 \003(\0132\023.TransportStopsTree\022" + + "\035\n\005leafs\030\010 \003(\0132\016.TransportStop\022\016\n\006baseId" + + "\030\020 \001(\004\"\215\001\n\024OsmAndTransportIndex\022\014\n\004name\030" + + "\001 \001(\t\022 \n\006routes\030\003 \001(\0132\020.TransportRoutes\022" + + "\"\n\005stops\030\006 \001(\0132\023.TransportStopsTree\022!\n\013s" + + "tringTable\030\t \002(\0132\014.StringTable\"\377\001\n\016OsmAn" + + "dPoiIndex\022\014\n\004name\030\001 \002(\t\022\"\n\nboundaries\030\002 " + + "\002(\0132\016.OsmAndTileBox\022-\n\017categoriesTable\030\003", + " \003(\0132\024.OsmAndCategoryTable\022&\n\tnameIndex\030" + + "\004 \001(\0132\023.OsmAndPoiNameIndex\022\"\n\005table\030\005 \001(" + + "\0132\023.IndexedStringTable\022\034\n\005boxes\030\006 \003(\0132\r." + + "OsmAndPoiBox\022\"\n\007poiData\030\t \003(\0132\021.OsmAndPo" + + "iBoxData\"\224\001\n\022OsmAndPoiNameIndex\0228\n\004data\030" + + "\003 \003(\0132*.OsmAndPoiNameIndex.OsmAndPoiName" + + "IndexData\032D\n\026OsmAndPoiNameIndexData\022*\n\005a" + + "toms\030\003 \003(\0132\033.OsmAndPoiNameIndexDataAtom\"" + + "Q\n\032OsmAndPoiNameIndexDataAtom\022\014\n\004zoom\030\002 " + + "\001(\r\022\t\n\001x\030\003 \001(\r\022\t\n\001y\030\004 \001(\r\022\017\n\007shiftTo\030\016 \001", + "(\007\">\n\023OsmAndCategoryTable\022\020\n\010category\030\001 " + + "\002(\t\022\025\n\rsubcategories\030\003 \003(\t\"\227\001\n\014OsmAndPoi" + + "Box\022\014\n\004zoom\030\001 \002(\r\022\014\n\004left\030\002 \002(\021\022\013\n\003top\030\003" + + " \002(\021\022(\n\ncategories\030\004 \001(\0132\024.OsmAndPoiCate" + + "gories\022\037\n\010subBoxes\030\n \003(\0132\r.OsmAndPoiBox\022" + + "\023\n\013shiftToData\030\016 \001(\007\")\n\023OsmAndPoiCategor" + + "ies\022\022\n\ncategories\030\003 \003(\r\"^\n\020OsmAndPoiBoxD" + + "ata\022\014\n\004zoom\030\001 \001(\r\022\t\n\001x\030\002 \001(\r\022\t\n\001y\030\003 \001(\r\022" + + "&\n\007poiData\030\005 \003(\0132\025.OsmAndPoiBoxDataAtom\"" + + "\255\001\n\024OsmAndPoiBoxDataAtom\022\n\n\002dx\030\002 \002(\021\022\n\n\002", + "dy\030\003 \002(\021\022\022\n\ncategories\030\004 \003(\r\022\014\n\004name\030\006 \001" + + "(\t\022\016\n\006nameEn\030\007 \001(\t\022\n\n\002id\030\010 \001(\004\022\024\n\014openin" + + "gHours\030\n \001(\t\022\014\n\004site\030\013 \001(\t\022\r\n\005phone\030\014 \001(" + + "\t\022\014\n\004note\030\r \001(\tB\023\n\021net.osmand.binary" }; com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner assigner = new com.google.protobuf.Descriptors.FileDescriptor.InternalDescriptorAssigner() { - public com.google.protobuf.ExtensionRegistry assignDescriptors( + @Override + public com.google.protobuf.ExtensionRegistry assignDescriptors( com.google.protobuf.Descriptors.FileDescriptor root) { descriptor = root; internal_static_OsmAndStructure_descriptor = @@ -31075,7 +19134,7 @@ public final class OsmandOdb { internal_static_OsmAndMapIndex_MapDataBox_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_OsmAndMapIndex_MapDataBox_descriptor, - new java.lang.String[] { "Left", "Right", "Top", "Bottom", "ShiftToMapData", "Boxes", }, + new java.lang.String[] { "Left", "Right", "Top", "Bottom", "ShiftToMapData", "Ocean", "Boxes", }, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.class, net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox.Builder.class); internal_static_OsmAndMapIndex_MapDataBlocks_descriptor = @@ -31099,7 +19158,7 @@ public final class OsmandOdb { internal_static_MapData_fieldAccessorTable = new com.google.protobuf.GeneratedMessage.FieldAccessorTable( internal_static_MapData_descriptor, - new java.lang.String[] { "PointCoordinates", "LineCoordinates", "PolygonOuterCoordinates", "PolygonInnerCoordinates", "AdditionalTypes", "Types", "StringNames", "Id", }, + new java.lang.String[] { "Coordinates", "AreaCoordinates", "PolygonInnerCoordinates", "AdditionalTypes", "Types", "StringNames", "Id", }, net.osmand.binary.OsmandOdb.MapData.class, net.osmand.binary.OsmandOdb.MapData.Builder.class); internal_static_OsmAndAddressIndex_descriptor = @@ -31319,5 +19378,7 @@ public final class OsmandOdb { }, assigner); } + public static void internalForceInit() {} + // @@protoc_insertion_point(outer_class_scope) } diff --git a/DataExtractionOSM/src/net/osmand/data/preparation/BinaryMapIndexWriter.java b/DataExtractionOSM/src/net/osmand/data/preparation/BinaryMapIndexWriter.java index e92b353158..1ee344fb6f 100644 --- a/DataExtractionOSM/src/net/osmand/data/preparation/BinaryMapIndexWriter.java +++ b/DataExtractionOSM/src/net/osmand/data/preparation/BinaryMapIndexWriter.java @@ -1,12 +1,15 @@ package net.osmand.data.preparation; +import gnu.trove.TByteCollection; import gnu.trove.list.TLongList; +import gnu.trove.list.array.TByteArrayList; import gnu.trove.list.array.TIntArrayList; import gnu.trove.list.array.TLongArrayList; import java.io.IOException; import java.io.OutputStream; import java.io.RandomAccessFile; +import java.nio.ByteBuffer; import java.util.ArrayList; import java.util.Collection; import java.util.Collections; @@ -15,6 +18,7 @@ import java.util.LinkedHashMap; import java.util.LinkedHashSet; import java.util.List; import java.util.Map; +import java.util.Map.Entry; import java.util.Set; import java.util.Stack; @@ -25,6 +29,7 @@ import net.osmand.Algoritms; import net.osmand.binary.BinaryMapIndexReader; import net.osmand.binary.OsmandOdb; import net.osmand.binary.OsmandOdb.CityIndex; +import net.osmand.binary.OsmandOdb.MapData; import net.osmand.binary.OsmandOdb.MapDataBlock; import net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapDataBox; import net.osmand.binary.OsmandOdb.OsmAndMapIndex.MapEncodingRule; @@ -54,6 +59,7 @@ import net.osmand.osm.Node; import net.osmand.osm.MapRenderingTypes.MapRulType; import net.sf.junidecode.Junidecode; +import com.google.protobuf.ByteString; import com.google.protobuf.CodedOutputStream; import com.google.protobuf.MessageLite; import com.google.protobuf.WireFormat; @@ -82,6 +88,7 @@ public class BinaryMapIndexWriter { } private Stack stackBounds = new Stack(); + private Stack stackBaseIds = new Stack(); // internal constants to track state of index writing private Stack state = new Stack(); @@ -284,10 +291,6 @@ public class BinaryMapIndexWriter { public static int STRING_TABLE_SIZE = 0; - protected static int codeCoordinateDifference(int x, int px){ - // shift absolute coordinates first and get truncated - return (x >> SHIFT_COORDINATES) - (px >> SHIFT_COORDINATES); - } @@ -310,101 +313,118 @@ public class BinaryMapIndexWriter { CodedOutputStream.computeRawVarint32Size(size) + size; ref.writeReference(raf, getFilePointer()); - codedOutStream.writeMessage(OsmAndMapIndex.BLOCKS_FIELD_NUMBER, builder.build()); + MapDataBlock block = builder.build(); + MAP_DATA_SIZE += block.getSerializedSize(); + codedOutStream.writeMessage(OsmAndMapIndex.BLOCKS_FIELD_NUMBER, block); } + /** + * Encode and write a varint. {@code value} is treated as unsigned, so it won't be sign-extended if negative. + */ + public void writeRawVarint32(TByteArrayList bf, int value) throws IOException { + while (true) { + if ((value & ~0x7F) == 0) { + writeRawByte(bf, value); + return; + } else { + writeRawByte(bf, (value & 0x7F) | 0x80); + value >>>= 7; + } + } + } + + + /** Write a single byte. */ + public void writeRawByte(TByteArrayList bf, final int value) throws IOException { + bf.add((byte)value); + } + private TByteArrayList mapDataBuf = new TByteArrayList(); - public void writeMapData(long diffId, byte[] nodes, byte[] types, Map name, Map stringTable, + public void writeMapData(long diffId, int pleft, int ptop, boolean area, byte[] coordinates, + byte[] innerPolygonTypes, byte[] types, + byte[] additionalTypes, Map names, Map stringTable, MapDataBlock.Builder dataBlock) throws IOException{ Bounds bounds = stackBounds.peek(); + + MapData.Builder data = MapData.newBuilder(); // calculate size - int sizeCoordinates = 0; - int allSize = 0; - int px = bounds.leftX; - int py = bounds.topY; - for(int i=0; i< nodes.length / 8; i++){ - int x = Algoritms.parseIntFromBytes(nodes, i * 8); - int y = Algoritms.parseIntFromBytes(nodes, i * 8 + 4); - sizeCoordinates += CodedOutputStream.computeSInt32SizeNoTag(codeCoordinateDifference(x, px)); - sizeCoordinates += CodedOutputStream.computeSInt32SizeNoTag(codeCoordinateDifference(y, py)); - px = x; - py = y; - COORDINATES_COUNT += 2; + mapDataBuf.clear(); + int pcalcx = pleft; + int pcalcy = ptop; + for(int i=0; i< coordinates.length / 8; i++){ + int x = Algoritms.parseIntFromBytes(coordinates, i * 8); + int y = Algoritms.parseIntFromBytes(coordinates, i * 8 + 4); + int tx = (x - pcalcx) >> SHIFT_COORDINATES; + int ty = (x - pcalcy) >> SHIFT_COORDINATES; + + writeRawVarint32(mapDataBuf, tx); + writeRawVarint32(mapDataBuf, ty); + + pcalcx = pcalcx + (tx << SHIFT_COORDINATES); + pcalcy = pcalcy + (ty << SHIFT_COORDINATES); + } + COORDINATES_SIZE += CodedOutputStream.computeRawVarint32Size(mapDataBuf.size()) + + CodedOutputStream.computeTagSize(MapData.COORDINATES_FIELD_NUMBER) + mapDataBuf.size(); + if(area) { + data.setAreaCoordinates(ByteString.copyFrom(mapDataBuf.toArray())); + } else { + data.setCoordinates(ByteString.copyFrom(mapDataBuf.toArray())); } - allSize += CodedOutputStream.computeRawVarint32Size(sizeCoordinates) + - CodedOutputStream.computeTagSize(OsmandOdb.MapData.COORDINATES_FIELD_NUMBER) + sizeCoordinates; - // DEBUG - COORDINATES_SIZE += allSize; + if(innerPolygonTypes.length > 0){ + mapDataBuf.clear(); + pcalcx = pleft; + pcalcy = ptop; + for(int i=0; i< innerPolygonTypes.length / 8; i++){ + int x = Algoritms.parseIntFromBytes(coordinates, i * 8); + int y = Algoritms.parseIntFromBytes(coordinates, i * 8 + 4); + if(x == 0 && y == 0){ + data.addPolygonInnerCoordinates(ByteString.copyFrom(mapDataBuf.toArray())); + mapDataBuf.clear(); + pcalcx = pleft; + pcalcy = ptop; + } else { + int tx = (x - pcalcx) >> SHIFT_COORDINATES; + int ty = (x - pcalcy) >> SHIFT_COORDINATES; - - allSize += CodedOutputStream.computeTagSize(OsmandOdb.MapData.TYPES_FIELD_NUMBER); - allSize += CodedOutputStream.computeRawVarint32Size(types.length); - allSize += types.length; - // DEBUG - TYPES_SIZE += CodedOutputStream.computeTagSize(OsmandOdb.MapData.TYPES_FIELD_NUMBER) + - CodedOutputStream.computeRawVarint32Size(types.length) + types.length; - - - allSize += CodedOutputStream.computeSInt64Size(OsmandOdb.MapData.ID_FIELD_NUMBER, diffId); - // DEBUG - ID_SIZE += CodedOutputStream.computeSInt64Size(OsmandOdb.MapData.ID_FIELD_NUMBER, diffId); - - - int nameId = 0; - if(name != null){ - if(stringTable.containsKey(name)) { - nameId = stringTable.get(name); - } else { - nameId = stringTable.size(); - stringTable.put(name, nameId); + writeRawVarint32(mapDataBuf, tx); + writeRawVarint32(mapDataBuf, ty); + + pcalcx = pcalcx + (tx << SHIFT_COORDINATES); + pcalcy = pcalcy + (ty << SHIFT_COORDINATES); + } } - allSize += CodedOutputStream.computeUInt32Size(OsmandOdb.MapData.S, nameId); + } + + data.setTypes(ByteString.copyFrom(types)); + TYPES_SIZE += CodedOutputStream.computeTagSize(OsmandOdb.MapData.TYPES_FIELD_NUMBER) + + CodedOutputStream.computeRawVarint32Size(types.length) + types.length; + if(additionalTypes.length > 0 ){ + data.setAdditionalTypes(ByteString.copyFrom(additionalTypes)); + TYPES_SIZE += CodedOutputStream.computeTagSize(OsmandOdb.MapData.ADDITIONALTYPES_FIELD_NUMBER) + + CodedOutputStream.computeRawVarint32Size(additionalTypes.length) + additionalTypes.length; } - - // DEBUG - MAP_DATA_SIZE += allSize; - - // writing data - codedOutStream.writeTag(MapDataBlock.DATAOBJECTS_FIELD_NUMBER, WireFormat.FieldType.MESSAGE.getWireType()); - codedOutStream.writeRawVarint32(allSize); - - - /// TODO !!!! - codedOutStream.writeTag(OsmandOdb.MapData.COORDINATES_FIELD_NUMBER, WireFormat.FieldType.BYTES.getWireType()); - codedOutStream.writeRawVarint32(sizeCoordinates); - - px = bounds.leftX; - py = bounds.topY; - for (int i = 0; i < nodes.length / 8; i++) { - int x = Algoritms.parseIntFromBytes(nodes, i * 8); - int y = Algoritms.parseIntFromBytes(nodes, i * 8 + 4); - codedOutStream.writeSInt32NoTag(codeCoordinateDifference(x, px)); - codedOutStream.writeSInt32NoTag(codeCoordinateDifference(y, py)); - px = x; - py = y; + mapDataBuf.clear(); + for(Entry s : names.entrySet()) { + writeRawVarint32(mapDataBuf, s.getKey().getTargetId()); + Integer ls = stringTable.get(s.getValue()); + if(ls == null){ + ls = stringTable.size(); + stringTable.put(s.getValue(), ls); + } + writeRawVarint32(mapDataBuf, ls); } + STRING_TABLE_SIZE += mapDataBuf.size(); + data.setStringNames(ByteString.copyFrom(mapDataBuf.toArray())); - codedOutStream.writeTag(OsmandOdb.MapData.TYPES_FIELD_NUMBER, WireFormat.FieldType.BYTES.getWireType()); - codedOutStream.writeRawVarint32(types.length); - codedOutStream.writeRawBytes(types); - - // TODO !!! - if(name != null){ - codedOutStream.writeUInt32(OsmandOdb.MapData.STRINGID_FIELD_NUMBER, nameId); - } - - codedOutStream.writeSInt64(OsmandOdb.MapData.ID_FIELD_NUMBER, diffId); - - - - + data.setId(diffId); + ID_SIZE += CodedOutputStream.computeSInt64Size(OsmandOdb.MapData.ID_FIELD_NUMBER, diffId); } diff --git a/DataExtractionOSM/src/osmand_odb.proto b/DataExtractionOSM/src/osmand_odb.proto index c20ab2a0a1..e471c1a02d 100644 --- a/DataExtractionOSM/src/osmand_odb.proto +++ b/DataExtractionOSM/src/osmand_odb.proto @@ -107,6 +107,8 @@ message OsmAndMapIndex { //shift from mapdatabox start to message MapDataBlock optional fixed32 shiftToMapData = 5; + optional bool ocean = 6; + repeated MapDataBox boxes = 7; } @@ -137,9 +139,9 @@ message MapDataBlock { message MapData { // array of delta x,y sint32 (CodedIinputStream) >> 5 // first x delta to Tree.left, y to delta Tree.top (next delta to previous) - optional bytes pointCoordinates = 1; - optional bytes lineCoordinates = 2; - optional bytes polygonOuterCoordinates = 3; + // point, line or outer polygon coordinates + optional bytes coordinates = 1; + optional bytes areaCoordinates = 2; repeated bytes polygonInnerCoordinates = 4; // array of raw var int types