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 chatboolean
admin()
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 viewerboolean
bot()
Indicates if this user is the botbot
(boolean bot) Updates if this viewer is the botboolean
Indicates if this user is the broadcasterbroadcaster
(boolean broadcaster) Updates the broadcaster status of the viewerboolean
boolean
Indicates if this user has had their attributes set from an IRC event, such as moderator statusint
hashCode()
id()
The Twitch user idboolean
inChat()
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 nameboolean
Indicates 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 seenboolean
staff()
Indicates if this user is a Twitch staff memberstaff
(boolean staff) Updates the Twitch staff status of the viewerboolean
Indicates if this user is a subscriber of the channelsubscriber
(boolean subscriber) Updates the Twitch subscriber status of the viewerboolean
turbo()
Indicates if this user is a Twitch turbo memberturbo
(boolean turbo) Updates the Twitch turbo status of the viewerboolean
vip()
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.MIN
if 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
false
but for some attributes to be set if an API lookup was performed- Returns:
true
if the user has had their attributes set
-
admin
Updates the Twitch admin status of the viewer- Parameters:
admin
-true
if the user is a Twitch admin- Returns:
this
-
admin
public boolean admin()Indicates if this user is a Twitch admin- Returns:
true
if the user is a Twitch admin
-
bot
Updates if this viewer is the bot- Parameters:
bot
-true
if the user is the bot- Returns:
this
-
bot
public boolean bot()Indicates if this user is the bot- Returns:
true
if the user is the bot
-
broadcaster
Updates the broadcaster status of the viewer- Parameters:
broadcaster
-true
if the user is the broadcaster- Returns:
this
-
broadcaster
public boolean broadcaster()Indicates if this user is the broadcaster- Returns:
true
if the user is the broadcaster
-
inChat
Updates if this viewer is in chat- Parameters:
inChat
-true
if the user is in chat- Returns:
this
-
inChat
public boolean inChat()Indicates if this user is in chat- Returns:
true
if the user is in chat
-
moderator
Updates the moderator status of the viewer- Parameters:
moderator
-true
if the user is a moderator- Returns:
this
-
moderator
public boolean moderator()Indicates if this user is a moderator- Returns:
true
if the user is a moderator
-
staff
Updates the Twitch staff status of the viewer- Parameters:
staff
-true
if the user is a Twitch staff member- Returns:
this
-
staff
public boolean staff()Indicates if this user is a Twitch staff member- Returns:
true
if the user is a Twitch staff member
-
subscriber
Updates the Twitch subscriber status of the viewer- Parameters:
subscriber
-true
if 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:
true
if the user is a subscriber of the channel
-
turbo
Updates the Twitch turbo status of the viewer- Parameters:
turbo
-true
if the user is a Twitch turbo member- Returns:
this
-
turbo
public boolean turbo()Indicates if this user is a Twitch turbo member- Returns:
true
if the user is a Twitch turbo member
-
vip
Updates the Twitch VIP status of the viewer- Parameters:
vip
-true
if the user is a VIP- Returns:
this
-
vip
public boolean vip()Indicates if this user is a VIP- Returns:
true
if the user is a VIP
-
hashCode
public int hashCode() -
equals
-