Package com.gmt2001.twitch.cache
Class Viewer
java.lang.Object
com.gmt2001.twitch.cache.Viewer
Contains information about a specific viewer in a
ViewerCache- Author:
- gmt2001
-
Method Summary
Modifier and TypeMethodDescriptionactive()Updates the last time this user was active in chatbooleanadmin()Indicates if this user is a Twitch adminadmin(boolean admin) Updates the Twitch admin status of the viewerMarks that the attributes have been set on this viewerbooleanbot()Indicates if this user is the botbot(boolean bot) Updates if this viewer is the botbooleanIndicates if this user is the broadcasterbroadcaster(boolean broadcaster) Updates the broadcaster status of the viewerbooleanbooleanIndicates if this user has had their attributes set from an IRC event, such as moderator statusinthashCode()id()The Twitch user idbooleaninChat()Indicates if this user is in chatinChat(boolean inChat) Updates if this viewer is in chatThe last time this user was active in chatlastSeen()The last time this user was seenlogin()The Twitch user login nameUpdates the Twitch user login namebooleanIndicates if this user is a moderatormoderator(boolean moderator) Updates the moderator status of the viewername()The Twitch user display nameUpdates the Twitch user display nameseen()Updates the last time this user was seenbooleanstaff()Indicates if this user is a Twitch staff memberstaff(boolean staff) Updates the Twitch staff status of the viewerbooleanIndicates if this user is a subscriber of the channelsubscriber(boolean subscriber) Updates the Twitch subscriber status of the viewerbooleanturbo()Indicates if this user is a Twitch turbo memberturbo(boolean turbo) Updates the Twitch turbo status of the viewerbooleanvip()Indicates if this user is a VIPvip(boolean vip) Updates the Twitch VIP status of the viewer
-
Method Details
-
id
The Twitch user id- Returns:
- The Twitch user id
-
login
Updates the Twitch user login name- Parameters:
login- The Twitch user login name- Returns:
this
-
login
The Twitch user login name- Returns:
- The Twitch user login name; Empty string
""if the login name has not been looked up yet
-
name
Updates the Twitch user display name- Parameters:
name- The Twitch user display name- Returns:
this
-
name
The Twitch user display name- Returns:
- The Twitch user display name; Empty string
""if the display name has not been looked up yet
-
active
Updates the last time this user was active in chat- Returns:
this
-
lastActive
The last time this user was active in chat- Returns:
- The last time this user was active in chat;
Instant.MINif the user was never active
-
seen
Updates the last time this user was seenThis is used for garbage collection
- Returns:
this
-
lastSeen
The last time this user was seenThis is used for garbage collection
- Returns:
- The last time this user was seen
-
attributes
Marks that the attributes have been set on this viewer -
hasAttributes
public boolean hasAttributes()Indicates if this user has had their attributes set from an IRC event, such as moderator statusIt is possible for this to return
falsebut for some attributes to be set if an API lookup was performed- Returns:
trueif the user has had their attributes set
-
admin
Updates the Twitch admin status of the viewer- Parameters:
admin-trueif the user is a Twitch admin- Returns:
this
-
admin
public boolean admin()Indicates if this user is a Twitch admin- Returns:
trueif the user is a Twitch admin
-
bot
Updates if this viewer is the bot- Parameters:
bot-trueif the user is the bot- Returns:
this
-
bot
public boolean bot()Indicates if this user is the bot- Returns:
trueif the user is the bot
-
broadcaster
Updates the broadcaster status of the viewer- Parameters:
broadcaster-trueif the user is the broadcaster- Returns:
this
-
broadcaster
public boolean broadcaster()Indicates if this user is the broadcaster- Returns:
trueif the user is the broadcaster
-
inChat
Updates if this viewer is in chat- Parameters:
inChat-trueif the user is in chat- Returns:
this
-
inChat
public boolean inChat()Indicates if this user is in chat- Returns:
trueif the user is in chat
-
moderator
Updates the moderator status of the viewer- Parameters:
moderator-trueif the user is a moderator- Returns:
this
-
moderator
public boolean moderator()Indicates if this user is a moderator- Returns:
trueif the user is a moderator
-
staff
Updates the Twitch staff status of the viewer- Parameters:
staff-trueif the user is a Twitch staff member- Returns:
this
-
staff
public boolean staff()Indicates if this user is a Twitch staff member- Returns:
trueif the user is a Twitch staff member
-
subscriber
Updates the Twitch subscriber status of the viewer- Parameters:
subscriber-trueif the user is a subscriber of the channel- Returns:
this
-
subscriber
public boolean subscriber()Indicates if this user is a subscriber of the channel- Returns:
trueif the user is a subscriber of the channel
-
turbo
Updates the Twitch turbo status of the viewer- Parameters:
turbo-trueif the user is a Twitch turbo member- Returns:
this
-
turbo
public boolean turbo()Indicates if this user is a Twitch turbo member- Returns:
trueif the user is a Twitch turbo member
-
vip
Updates the Twitch VIP status of the viewer- Parameters:
vip-trueif the user is a VIP- Returns:
this
-
vip
public boolean vip()Indicates if this user is a VIP- Returns:
trueif the user is a VIP
-
hashCode
public int hashCode() -
equals
-