Java tutorial
//package com.java2s; //License from project: Apache License import android.location.Address; import android.support.annotation.Nullable; public class Main { public static boolean isValidAddress(@Nullable final Address address) { if (address == null) { return false; } if (address.getMaxAddressLineIndex() <= 0) { return false; } return true; } }