| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjavax.microedition.location.AddressInfo
The AddressInfo class holds textual address information 
 about a location. Typically the 
 information is e.g. street address. The information is divided into fields
 (e.g. street, postal code, city, etc.). Defined field constants can be used
 to retrieve field data.
 
 If the value of a field is not available, it is set to null. 
 
The names of the fields use terms and definitions that are commonly used e.g. in the United States. Addresses for other countries should map these to the closest corresponding entities used in that country.
 This class is only a container for the information. 
 The getField method returns the value set for the
 defined field using the setField method.
 When the platform implementation returns   AddressInfo
 objects, it
 MUST ensure that it only returns objects where the parameters
 have values set as described for their semantics in this class.
 
Below are some typical examples of addresses in different countries and how they map to the AddressInfo fields.
| AddressInfo Field | American Example | British Example | 
| EXTENSION | Flat 5 | The Oaks | 
| STREET | 10 Washington Street | 20 Greenford Court | 
| POSTAL_CODE | 12345 | AB1 9YZ | 
| CITY | Palo Alto | Cambridge | 
| COUNTY | Santa Clara County | Cambridgeshire | 
| STATE | California | England | 
| COUNTRY | United States of America | United Kingdom | 
| COUNTRY_CODE | US | GB | 
| DISTRICT | ||
| BUILDING_NAME | ||
| BUILDING_FLOOR | ||
| BUILDING_ROOM | ||
| BUILDING_ZONE | ||
| CROSSING1 | ||
| CROSSING2 | ||
| URL | http://www.americanurl.com | http://britishurl.co.uk | 
| PHONE_NUMBER | 
| Field Summary | |
| static int | BUILDING_FLOORAddress field denoting a building floor. | 
| static int | BUILDING_NAMEAddress field denoting a building name. | 
| static int | BUILDING_ROOMAddress field denoting a building room. | 
| static int | BUILDING_ZONEAddress field denoting a building zone | 
| static int | CITYAddress field denoting town or city name. | 
| static int | COUNTRYAddress field denoting country. | 
| static int | COUNTRY_CODEAddress field denoting country as a two-letter ISO 3166-1 code. | 
| static int | COUNTYAddress field denoting a county, which is an entity between a state and a city | 
| static int | CROSSING1Address field denoting a street in a crossing. | 
| static int | CROSSING2Address field denoting a street in a crossing. | 
| static int | DISTRICTAddress field denoting a municipal district. | 
| static int | EXTENSIONAddress field denoting address extension, e.g. flat number. | 
| static int | PHONE_NUMBERAddress field denoting a phone number for this place. | 
| static int | POSTAL_CODEAddress field denoting zip or postal code. | 
| static int | STATEAddress field denoting state or province. | 
| static int | STREETAddress field denoting street name and number. | 
| static int | URLAddress field denoting a URL for this place. | 
| Constructor Summary | |
| AddressInfo()Constructs an AddressInfoobject with all the
 values of the fields set tonull. | |
| Method Summary | |
|  java.lang.String | getField(int field)Returns the value of an address field. | 
|  void | setField(int field,
         java.lang.String value)Sets the value of an address field. | 
| Methods inherited from class java.lang.Object | 
| equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait | 
| Field Detail | 
public static final int EXTENSION
public static final int STREET
public static final int POSTAL_CODE
public static final int CITY
public static final int COUNTY
public static final int STATE
public static final int COUNTRY
public static final int COUNTRY_CODE
public static final int DISTRICT
public static final int BUILDING_NAME
public static final int BUILDING_FLOOR
public static final int BUILDING_ROOM
public static final int BUILDING_ZONE
public static final int CROSSING1
public static final int CROSSING2
public static final int URL
public static final int PHONE_NUMBER
| Constructor Detail | 
public AddressInfo()
AddressInfo object with all the
 values of the fields set to null.
| Method Detail | 
public java.lang.String getField(int field)
null is returned.
 
 Example: getField(AddressInfo.STREET) might return
 "113 Broadway" if the location is on Broadway, New York, or
 null if not available.
field - the ID of the field to be retrieved
null.
java.lang.IllegalArgumentException - if the parameter field ID is not 
                  one of the 
                  constant values defined in this classsetField(int, java.lang.String)
public void setField(int field,
                     java.lang.String value)
field - the ID of the field to be setvalue - the new value for the field. null
              is used to indicate that the field has no content.
java.lang.IllegalArgumentException - if the parameter field ID is 
                  not one of the 
                  constant values defined in this classgetField(int)| 
 | ||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||