Class Contact
Contact class represents a contact of the current user.
A Contact can be another user, a radio gateway, a group channel or a dynamic channel (see ContactType).-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns the display name for theContact.Returns the full name of theContact.booleangetMuted()Returns whether theContactis muted or not.getName()Returns the identifying name of theContact.booleanReturns whether the channel has the no disconnect setting enabled or not.Returns theContactStatusfor theContact.Returns the custom status message for theContact.getTitle()Returns the title for theContact.getType()Returns theContactTypefor theContact.intReturns the number of online users in the channel.intReturns the number of total users in the channel.booleanisValid()Check if the object is empty.voidreset()Resets theContactinstance back to the default values.
-
Constructor Details
-
Contact
public Contact()
-
-
Method Details
-
reset
public void reset()Resets the
Contactinstance back to the default values.This method only resets the values for this copied instance of the
Contact. -
clone
-
isValid
public boolean isValid()Check if the object is empty.- Returns:
- true if the object represents a valid contact.
-
getName
Returns the identifying name of the
Contact.For
and @link ContactType#GROUPthe value is the channel name. ForContactType.USERandContactType.GATEWAYthe value is the username. ForContactType.CONVERSATIONthe value is a unique conversation ID.- Returns:
- Name of the
Contact.
-
getFullName
Returns the full name of theContact.- Returns:
- Nullable; Full name of the
Contact.
-
getDisplayName
Returns the display name for the
Contact.Use this function if you need to show the contact on the screen as it uses the best available data to build the human-readable name.
- Returns:
- Nullable; Display Name for the
Contact.
-
getType
Returns theContactTypefor theContact.- Returns:
ContactTypefor theContact.
-
getStatus
Returns theContactStatusfor theContact.- Returns:
ContactStatusfor theContact.
-
getStatusMessage
Returns the custom status message for theContact.- Returns:
- Nullable; The status message for the
Contact.
-
getUsersCount
public int getUsersCount()Returns the number of online users in the channel.
For
ContactType.CHANNEL.ContactType.GROUPand andContactType.CONVERSATIONthis value is the number of users online in the channel or group, respectively. ForContactType.USERandContactType.GATEWAYthis value is not defined (0is returned).- Returns:
- number of online users under the
Contactfor theContactType.
-
getUsersTotal
public int getUsersTotal()Returns the number of total users in the channel.
For
ContactType.GROUPandContactType.CONVERSATIONthis value is the number of total users in the channel or group, respectively. ForContactType.USER,ContactType.GATEWAYandContactType.CHANNELthis value is not defined (0is returned).- Returns:
- number of total users under the
Contactfor theContactType.
-
getTitle
Returns the title for the
Contact.For
ContactType.CHANNELandContactType.GROUPthis value is not defined (nullis returned)- Returns:
- Nullable; The title for the
Contact.
-
getMuted
public boolean getMuted()Returns whether theContactis muted or not.- Returns:
- boolean indicating if the
Contactis muted.
-
getNoDisconnect
public boolean getNoDisconnect()Returns whether the channel has the no disconnect setting enabled or not.For
ContactType.USER,ContactType.GATEWAYandContactType.CONVERSATIONthis value is not defined (falseis returned).- Returns:
- boolean indicating if the
Contacthas the no disconnect setting enabled.
-