public class AddressInfo extends Object
AddressInfo
class is a container for
storing address information.
If the value of a field is not available, it is set to null
.
The getField
method returns the value set for the
defined field using the setField
method.
Modifier and Type | Field and Description |
---|---|
static int |
BUILDING_FLOOR
A building floor.
|
static int |
BUILDING_NAME
A building name.
|
static int |
BUILDING_ROOM
A building room.
|
static int |
BUILDING_ZONE
A building zone
|
static int |
CITY
A town or city name.
|
static int |
COUNTRY
A country.
|
static int |
COUNTRY_CODE
A country as a two-letter ISO 3166-1 code.
|
static int |
COUNTY
A county
|
static int |
CROSSING1
A street in a crossing.
|
static int |
CROSSING2
A street in a crossing.
|
static int |
DISTRICT
A municipal district.
|
static int |
EXTENSION
A address extension, e.g.
|
static int |
PHONE_NUMBER
A phone number for this place.
|
static int |
POSTAL_CODE
A zip or postal code.
|
static int |
STATE
A state or province.
|
static int |
STREET
A street name and number.
|
static int |
URL
An URL for this place.
|
Constructor and Description |
---|
AddressInfo()
Constructor for an empty
AddressInfo object. |
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
public AddressInfo()
AddressInfo
object.
All fields are set to null
.public String getField(int field)
null
for an empty field.
field
- the ID of the field to be retrievednull
,
if the field is emptyIllegalArgumentException
- 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, 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.IllegalArgumentException
- if the parameter field ID is
not one of the
constant values defined in this classgetField(int)
Copyright (c) 1990, 2012, Oracle and/or its affiliates. All rights reserved.