Android Open Source - android-async-google-places Address Component






From Project

Back to project page android-async-google-places.

License

The source code is released under:

Apache License

If you think the Android project android-async-google-places listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package io.github.axxiss.places.model;
//from   ww  w.  j  a  v a2  s. c  o  m
import android.os.Parcel;
import android.os.Parcelable;

/**
 * Address components used to compose a given address. For example, the address "111 8th Avenue, New
 * York, NY" contains separate address components for "111" (the street number, "8th Avenue" (the
 * route), "New York" (the city) and "NY" (the US state).
 *
 * @author Axxiss
 */
public class AddressComponent implements Parcelable {

    private String[] types;
    private String long_name;
    private String short_name;

    /**
     * Returns an array indicating the type of the address component.
     *
     * @return the types.
     */
    public String[] getTypes() {
        return types;
    }

    /**
     * The full text description or name of the address component.
     *
     * @return
     */
    public String getLongName() {
        return long_name;
    }

    /**
     * Abbreviated textual name for the address component, if available. For example, an address
     * component for the state of Alaska may have a long_name of "Alaska" and a short_name of "AK"
     * using the 2-letter postal abbreviation.
     *
     * @return the short name.
     */
    public String getShortName() {
        return short_name;
    }

    public AddressComponent() {

    }

    protected AddressComponent(Parcel in) {
        in.readStringArray(types);
        long_name = in.readString();
        short_name = in.readString();
    }

    public int describeContents() {
        return 0;
    }

    public void writeToParcel(Parcel dest, int flags) {
        dest.writeStringArray(types);
        dest.writeString(long_name);
        dest.writeString(short_name);
    }

    public static final Parcelable.Creator<AddressComponent> CREATOR = new Parcelable.Creator<AddressComponent>() {
        public AddressComponent createFromParcel(Parcel in) {
            return new AddressComponent(in);
        }

        public AddressComponent[] newArray(int size) {
            return new AddressComponent[size];
        }
    };
}




Java Source Code List

io.github.axxis.places.sample.MainActivity.java
io.github.axxis.places.sample.PlaceActivity.java
io.github.axxiss.places.PlacesSettings.java
io.github.axxiss.places.Response.java
io.github.axxiss.places.callback.PhotoCallback.java
io.github.axxiss.places.callback.PlacesCallback.java
io.github.axxiss.places.enums.Params.java
io.github.axxiss.places.enums.PlaceType.java
io.github.axxiss.places.enums.Price.java
io.github.axxiss.places.enums.RankBy.java
io.github.axxiss.places.enums.Request.java
io.github.axxiss.places.enums.Status.java
io.github.axxiss.places.exception.ApiPlacesException.java
io.github.axxiss.places.listeners.OnPlaceClickListener.java
io.github.axxiss.places.model.AddressComponent.java
io.github.axxiss.places.model.AspectRating.java
io.github.axxiss.places.model.Event.java
io.github.axxiss.places.model.Geometry.java
io.github.axxiss.places.model.Location.java
io.github.axxiss.places.model.OpeningHours.java
io.github.axxiss.places.model.PeriodData.java
io.github.axxiss.places.model.Period.java
io.github.axxiss.places.model.Photo.java
io.github.axxiss.places.model.Place.java
io.github.axxiss.places.model.Review.java
io.github.axxiss.places.request.BaseSearch.java
io.github.axxiss.places.request.NearbySearch.java
io.github.axxiss.places.request.PlaceDetails.java
io.github.axxiss.places.request.PlaceParams.java
io.github.axxiss.places.request.PlacePhotos.java
io.github.axxiss.places.request.PlaceSearch.java
io.github.axxiss.places.request.PlacesClient.java
io.github.axxiss.places.request.RadarSearch.java
io.github.axxiss.places.request.TextSearch.java