Class PhoneNumber (2.0.0)

public final class PhoneNumber implements Serializable, Comparable<PhoneNumber>

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.

Inheritance

java.lang.Object > PhoneNumber

Static Fields

serialVersionUID

public static final long serialVersionUID
Field Value
Type Description
long

Constructors

PhoneNumber(String number)

public PhoneNumber(String number)
Parameter
Name Description
number String

Methods

compareTo(PhoneNumber o)

public int compareTo(PhoneNumber o)
Parameter
Name Description
o PhoneNumber
Returns
Type Description
int

equals(@Nullable Object o)

public boolean equals(@Nullable Object o)
Parameter
Name Description
o @org.checkerframework.checker.nullness.qual.Nullable java.lang.Object
Returns
Type Description
boolean
Overrides

getNumber()

public String getNumber()
Returns
Type Description
String

hashCode()

public int hashCode()
Returns
Type Description
int
Overrides