diff options
author | Torne (Richard Coles) <torne@google.com> | 2014-11-06 11:12:36 +0000 |
---|---|---|
committer | Torne (Richard Coles) <torne@google.com> | 2014-11-06 11:12:36 +0000 |
commit | bc218bd8b5a06b381ac7a99e1301bb900076bb34 (patch) | |
tree | cf43eb4c48540fcc93cdb1fde1536438b0ece281 /java/src/com/android/i18n/addressinput/AddressField.java | |
parent | c29dd2308a9beb970579e2a38ff1d02f218565a7 (diff) | |
parent | 5074e7546d9b6344ece890f6d1a99c3fd9132272 (diff) | |
download | src-master-soong.tar.gz |
Merge from Chromium at DEPS revision db3f05efe0f9HEADwebview-m40_r4webview-m40_r3webview-m40_r2webview-m40_r1android-m-preview-2android-m-preview-1android-m-previewub-webview-m40-releasemaster-soongmastermain
This commit was generated by merge_to_master.py.
Change-Id: I07ba5e568405463b1b643a6e88d60d6d35bba2b7
Diffstat (limited to 'java/src/com/android/i18n/addressinput/AddressField.java')
-rw-r--r-- | java/src/com/android/i18n/addressinput/AddressField.java | 100 |
1 files changed, 50 insertions, 50 deletions
diff --git a/java/src/com/android/i18n/addressinput/AddressField.java b/java/src/com/android/i18n/addressinput/AddressField.java index 17b1817..7d3dbf2 100644 --- a/java/src/com/android/i18n/addressinput/AddressField.java +++ b/java/src/com/android/i18n/addressinput/AddressField.java @@ -24,64 +24,64 @@ import java.util.Map; * formatting. Note that the metadata also has a character for newlines, which is not defined here. */ public enum AddressField { - ADMIN_AREA('S'), - LOCALITY('C'), - RECIPIENT('N'), - ORGANIZATION('O'), - // Deprecated - use A instead. - ADDRESS_LINE_1('1'), - // Deprecated - use A instead. - ADDRESS_LINE_2('2'), - DEPENDENT_LOCALITY('D'), - POSTAL_CODE('Z'), - SORTING_CODE('X'), - STREET_ADDRESS('A'), + ADMIN_AREA('S'), + LOCALITY('C'), + RECIPIENT('N'), + ORGANIZATION('O'), + // Deprecated - use A instead. + ADDRESS_LINE_1('1'), + // Deprecated - use A instead. + ADDRESS_LINE_2('2'), + DEPENDENT_LOCALITY('D'), + POSTAL_CODE('Z'), + SORTING_CODE('X'), + STREET_ADDRESS('A'), - COUNTRY('R'); + COUNTRY('R'); - /** - * Enum for width types of address input fields. - */ - public enum WidthType { - LONG, - SHORT; - } + /** + * Enum for width types of address input fields. + */ + public enum WidthType { + LONG, + SHORT; + } - private static final Map<Character, AddressField> FIELD_MAPPING - = new HashMap<Character, AddressField>(); + private static final Map<Character, AddressField> FIELD_MAPPING + = new HashMap<Character, AddressField>(); - static { - for (AddressField value : values()) { - FIELD_MAPPING.put(value.getChar(), value); - } + static { + for (AddressField value : values()) { + FIELD_MAPPING.put(value.getChar(), value); } + } - private final char mField; + private final char field; - private AddressField(char field) { - mField = field; - } + private AddressField(char field) { + this.field = field; + } - /** - * Gets the corresponding AddressField for the character code. Returns null if the character is - * not recognized. - */ - static AddressField of(char field) { - return FIELD_MAPPING.get(field); - } + /** + * Gets the corresponding AddressField for the character code. Returns null if the character is + * not recognized. + */ + static AddressField of(char field) { + return FIELD_MAPPING.get(field); + } - /** - * Gets the field's identification character, as used in the metadata. - * - * @return identification char. - */ - char getChar() { - return mField; - } + /** + * Gets the field's identification character, as used in the metadata. + * + * @return identification char. + */ + char getChar() { + return field; + } - /** Returns default width type of the address field. */ - WidthType getDefaulWidthType() { - return this.equals(POSTAL_CODE) || this.equals(SORTING_CODE) - ? WidthType.SHORT : WidthType.LONG; - } + /** Returns default width type of the address field. */ + WidthType getDefaulWidthType() { + return this.equals(POSTAL_CODE) || this.equals(SORTING_CODE) + ? WidthType.SHORT : WidthType.LONG; + } } |