Class PhoneNumberIdentifier


  • public final class PhoneNumberIdentifier
    extends CommunicationIdentifier
    Communication identifier for Communication Services Phone Numbers
    • Constructor Summary

      Constructors 
      Constructor Description
      PhoneNumberIdentifier​(java.lang.String phoneNumber)
      Creates a PhoneNumberIdentifier object
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object that)  
      java.lang.String getAssertedId()
      Gets the asserted ID for the phone number, distinguishing it from other connections made through the same number.
      java.lang.String getPhoneNumber()  
      int hashCode()  
      boolean isAnonymous()
      Checks if the phone number is anonymous, e.g., used to represent a hidden caller ID.
      PhoneNumberIdentifier setRawId​(java.lang.String rawId)
      Set full id of the identifier RawId is the encoded format for identifiers to store in databases or as stable keys in general.
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • PhoneNumberIdentifier

        public PhoneNumberIdentifier​(java.lang.String phoneNumber)
        Creates a PhoneNumberIdentifier object
        Parameters:
        phoneNumber - the string identifier representing the PhoneNumber in E.164 format. E.164 is a phone number formatted as +[CountryCode][AreaCode][LocalNumber] eg. "+18005555555"
        Throws:
        java.lang.IllegalArgumentException - thrown if phoneNumber parameter fail the validation.
    • Method Detail

      • getPhoneNumber

        public java.lang.String getPhoneNumber()
        Returns:
        the string identifier representing the object identity
      • isAnonymous

        public boolean isAnonymous()
        Checks if the phone number is anonymous, e.g., used to represent a hidden caller ID.
        Returns:
        true if the phone number is anonymous, false otherwise.
      • getAssertedId

        public java.lang.String getAssertedId()
        Gets the asserted ID for the phone number, distinguishing it from other connections made through the same number.
        Returns:
        the string identifier representing the asserted ID for the phone number.
      • setRawId

        public PhoneNumberIdentifier setRawId​(java.lang.String rawId)
        Set full id of the identifier RawId is the encoded format for identifiers to store in databases or as stable keys in general.
        Overrides:
        setRawId in class CommunicationIdentifier
        Parameters:
        rawId - full id of the identifier
        Returns:
        PhoneNumberIdentifier object itself