PhoneNumberUtil.PhoneNumberFormat
Date: 2011-05-04

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD

## com.google.i18n.phonenumbers
Enum PhoneNumberUtil.PhoneNumberFormat

    java.lang.Object
      java.lang.Enum<PhoneNumberUtil.PhoneNumberFormat>
          com.google.i18n.phonenumbers.PhoneNumberUtil.PhoneNumberFormat

All Implemented Interfaces:
  java.io.Serializable, java.lang.Comparable<PhoneNumberUtil.PhoneNumberFormat>

Enclosing class:
  PhoneNumberUtil

    public static enum PhoneNumberUtil.PhoneNumberFormat

extends java.lang.Enum<PhoneNumberUtil.PhoneNumberFormat>

INTERNATIONAL and NATIONAL formats are consistent with the definition in ITU-T Recommendation E. 123. For example, the number of the Google Zurich office will be written as "+41 44 668 1800" in INTERNATIONAL format, and as "044 668 1800" in NATIONAL format. E164 format is as per INTERNATIONAL format but with no formatting applied, e.g. +41446681800. RFC3966 is as per INTERNATIONAL format, but with all spaces and other separating symbols replaced with a hyphen, and with any phone number extension appended with ";ext=". Note: If you are considering storing the number in a neutral format, you are highly advised to use the PhoneNumber class.

Enum Constant Summary
`E164`
`INTERNATIONAL`
`NATIONAL`
`RFC3966`

Method Summary
`static PhoneNumberUtil.PhoneNumberFormat` | `valueOf(java.lang.String name)` Returns the enum constant of this type with the specified name.
`static PhoneNumberUtil.PhoneNumberFormat[]` | `values()` Returns an array containing the constants of this enum type, in the order they are declared.

Methods inherited from class java.lang.Enum
`clone, compareTo, equals, finalize, getDeclaringClass, hashCode, name, ordinal, toString, valueOf`

Methods inherited from class java.lang.Object
`getClass, notify, notifyAll, wait, wait, wait`

Enum Constant Detail

### E164

    public static final PhoneNumberUtil.PhoneNumberFormat E164

### INTERNATIONAL

    public static final PhoneNumberUtil.PhoneNumberFormat INTERNATIONAL

### NATIONAL

    public static final PhoneNumberUtil.PhoneNumberFormat NATIONAL

### RFC3966

    public static final PhoneNumberUtil.PhoneNumberFormat RFC3966

Method Detail

### values

    public static PhoneNumberUtil.PhoneNumberFormat[] values()

  Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:

      for (PhoneNumberUtil.PhoneNumberFormat c : PhoneNumberUtil.PhoneNumberFormat.values())
          System.out.println(c);

  Returns:
    an array containing the constants of this enum type, in the order they are declared

### valueOf

    public static PhoneNumberUtil.PhoneNumberFormat valueOf(java.lang.String name)

  Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)

  Parameters:
    `name` - the name of the enum constant to be returned.
  Returns:
    the enum constant with the specified name
  Throws:
    `java.lang.IllegalArgumentException` - if this enum type has no constant with the specified name
    `java.lang.NullPointerException` - if the argument is null

Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | ENUM CONSTANTS | FIELD | METHOD | DETAIL: ENUM CONSTANTS | FIELD | METHOD