Class Phone


  • public final class Phone
    extends java.lang.Object
    • Constructor Detail

      • Phone

        public Phone()
      • Phone

        public Phone​(CountryCode countryCode,
                     java.lang.String number)
        Creates a new Phone instance.
        Parameters:
        countryCode - The international country calling code.
        number - The phone number.
    • Method Detail

      • getCountryCode

        public CountryCode getCountryCode()
        The international country calling code.
      • getNumber

        public java.lang.String getNumber()
        The phone number.
      • setCountryCode

        public void setCountryCode​(CountryCode countryCode)
        The international country calling code.
      • setNumber

        public void setNumber​(java.lang.String number)
        The phone number.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object