A human-readable phone number. No validation is performed because phone numbers have many
different formats - local, long distance, domestic, international, internal extension, TTY, VOIP,
SMS, and alternative networks like Skype, XFire and Roger Wilco. They all have their own
numbering and addressing formats.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-09-04 UTC."],[[["\u003cp\u003e\u003ccode\u003ePhoneNumber\u003c/code\u003e is a class for representing human-readable phone numbers, and it does not perform any validation on the number's format.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003ePhoneNumber\u003c/code\u003e class implements the \u003ccode\u003eSerializable\u003c/code\u003e and \u003ccode\u003eComparable<PhoneNumber>\u003c/code\u003e interfaces, allowing it to be serialized and compared with other \u003ccode\u003ePhoneNumber\u003c/code\u003e objects.\u003c/p\u003e\n"],["\u003cp\u003eThis class inherits several methods from the \u003ccode\u003eObject\u003c/code\u003e class, including \u003ccode\u003eclone()\u003c/code\u003e, \u003ccode\u003eequals()\u003c/code\u003e, \u003ccode\u003ehashCode()\u003c/code\u003e, and \u003ccode\u003etoString()\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe class provides a constructor \u003ccode\u003ePhoneNumber(String number)\u003c/code\u003e to create a \u003ccode\u003ePhoneNumber\u003c/code\u003e object from a string, and methods such as \u003ccode\u003ecompareTo()\u003c/code\u003e, \u003ccode\u003eequals()\u003c/code\u003e, \u003ccode\u003egetNumber()\u003c/code\u003e, and \u003ccode\u003ehashCode()\u003c/code\u003e to manipulate and retrieve data from it.\u003c/p\u003e\n"],["\u003cp\u003e\u003ccode\u003ePhoneNumber\u003c/code\u003e has a static field called \u003ccode\u003eserialVersionUID\u003c/code\u003e which is of the \u003ccode\u003elong\u003c/code\u003e data type.\u003c/p\u003e\n"]]],[],null,["# Class PhoneNumber (2.0.0)\n\n public final class PhoneNumber implements Serializable, Comparable\u003cPhoneNumber\u003e\n\nA human-readable phone number. No validation is performed because phone numbers have many\ndifferent formats - local, long distance, domestic, international, internal extension, TTY, VOIP,\nSMS, and alternative networks like Skype, XFire and Roger Wilco. They all have their own\nnumbering and addressing formats. \n\nInheritance\n-----------\n\n[java.lang.Object](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html) \\\u003e PhoneNumber \n\nImplements\n----------\n\n[Serializable](https://docs.oracle.com/javase/8/docs/api/java/io/Serializable.html), [Comparable\\\u003cPhoneNumber\\\u003e](https://docs.oracle.com/javase/8/docs/api/java/lang/Comparable\u003ccom/google/appengine/api/datastore/PhoneNumber\u003e.html) \n\nInherited Members\n-----------------\n\n[Object.clone()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone--) \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-) \n[Object.finalize()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#finalize--) \n[Object.getClass()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#getClass--) \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--) \n[Object.notify()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notify--) \n[Object.notifyAll()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#notifyAll--) \n[Object.toString()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#toString--) \n[Object.wait()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait--) \n[Object.wait(long)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-) \n[Object.wait(long,int)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#wait-long-int-)\n\nStatic Fields\n-------------\n\n### serialVersionUID\n\n public static final long serialVersionUID\n\nConstructors\n------------\n\n### PhoneNumber(String number)\n\n public PhoneNumber(String number)\n\nMethods\n-------\n\n### compareTo(PhoneNumber o)\n\n public int compareTo(PhoneNumber o)\n\n### equals(@Nullable Object o)\n\n public boolean equals(@Nullable Object o)\n\n**Overrides** \n[Object.equals(Object)](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#equals-java.lang.Object-)\n\n### getNumber()\n\n public String getNumber()\n\n### hashCode()\n\n public int hashCode()\n\n**Overrides** \n[Object.hashCode()](https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#hashCode--)"]]