// Path: Forecast/app/src/main/java/com/khasang/forecast/exceptions/EmptyCurrentAddressException.java
// public class EmptyCurrentAddressException extends Exception {
// }
// 
// Path: Forecast/app/src/main/java/com/khasang/forecast/exceptions/NoAvailableAddressesException.java
// public class NoAvailableAddressesException extends Exception {
// }


import android.location.Address;
import com.khasang.forecast.exceptions.EmptyCurrentAddressException;
import com.khasang.forecast.exceptions.NoAvailableAddressesException;
import java.util.List;
package com.khasang.forecast.location;




/**
 * Created by roman on 03.02.16.
 */
public class LocationParser { // кидать ошибку если нехватает элементов
    List<Address> list;
    String country;
    String region;
    String subRegion;
    String city;

    public LocationParser() {
        this(null);
    }

    public LocationParser(List<Address> list) {
        this.list = list;
        country = null;
        region = null;
        subRegion = null;
        city = null;
    }

    public LocationParser setAddressesList(List<Address> list) {
        this.list = list;
        return this;
    }

// Path: Forecast/app/src/main/java/com/khasang/forecast/exceptions/EmptyCurrentAddressException.java
// public class EmptyCurrentAddressException extends Exception {
// }
// 
// Path: Forecast/app/src/main/java/com/khasang/forecast/exceptions/NoAvailableAddressesException.java
// public class NoAvailableAddressesException extends Exception {
// }


// Path: Forecast/app/src/main/java/com/khasang/forecast/location/LocationParser.java
import android.location.Address;
import com.khasang.forecast.exceptions.EmptyCurrentAddressException;
import com.khasang.forecast.exceptions.NoAvailableAddressesException;
import java.util.List;

package com.khasang.forecast.location;




/**
 * Created by roman on 03.02.16.
 */
public class LocationParser { // кидать ошибку если нехватает элементов
    List<Address> list;
    String country;
    String region;
    String subRegion;
    String city;

    public LocationParser() {
        this(null);
    }

    public LocationParser(List<Address> list) {
        this.list = list;
        country = null;
        region = null;
        subRegion = null;
        city = null;
    }

    public LocationParser setAddressesList(List<Address> list) {
        this.list = list;
        return this;
    }

    public LocationParser parseList() throws NoAvailableAddressesException {