* formatting. Note that the metadata also has a character for newlines, which is not defined here.
*/
public enum AddressField {
- ADMIN_AREA('S', "state"),
- LOCALITY('C', "city"),
- RECIPIENT('N', "name"),
- ORGANIZATION('O', "organization"),
+ ADMIN_AREA('S'),
+ LOCALITY('C'),
+ RECIPIENT('N'),
+ ORGANIZATION('O'),
// Deprecated - use A instead.
- ADDRESS_LINE_1('1', "street1"),
+ ADDRESS_LINE_1('1'),
// Deprecated - use A instead.
- ADDRESS_LINE_2('2', "street2"),
+ ADDRESS_LINE_2('2'),
DEPENDENT_LOCALITY('D'),
POSTAL_CODE('Z'),
SORTING_CODE('X'),
private final char mField;
- private final String mAttributeName;
-
- private AddressField(char field, String attributeName) {
- mField = field;
- mAttributeName = attributeName;
- }
-
private AddressField(char field) {
- this(field, null);
+ mField = field;
}
/**
}
/**
- * Gets attribute name. Attribute names are used as keys to JSON address data returned from the
- * server. Returns null if the field does not have a corresponding attribute name.
- *
- * Note: Not all address fields have attribute names. Fields like postal code, country, sorting
- * code, or street address do not have attribute names.
- */
- String getAttributeName() {
- return mAttributeName;
- }
-
- /**
* Gets the field's identification character, as used in the metadata.
*
* @return identification char.