public class Channel extends Object implements Comparable<Channel>
Modifier and Type | Method and Description |
---|---|
int |
compareTo(Channel other)
Compare
getName() with String.compareToIgnoreCase(java.lang.String) . |
boolean |
containsMode(char modeLetter) |
ChannelSnapshot |
createSnapshot()
Create an immutable snapshot of this channel.
|
boolean |
equals(Object o) |
<T extends PircBotX> |
getBot() |
UUID |
getChannelId()
Unique UUID for this channel instance
|
String |
getChannelKey()
Channel key (+k)
|
int |
getChannelLimit()
Channel limit (+l #)
|
long |
getCreateTimestamp()
Timestamp of when channel was created.
|
com.google.common.collect.ImmutableSortedSet<User> |
getHalfOps()
Get all users with Half Operator status in this channel.
|
String |
getMode()
Gets the channel mode.
|
String |
getName()
The name of the channel.
|
com.google.common.collect.ImmutableSortedSet<User> |
getNormalUsers()
Get all users that don't have any special status in this channel.
|
com.google.common.collect.ImmutableSortedSet<User> |
getOps()
Get all opped users in this channel.
|
com.google.common.collect.ImmutableSortedSet<User> |
getOwners()
Get all users with Owner status in this channel.
|
com.google.common.collect.ImmutableSortedSet<User> |
getSuperOps()
Get all users with Super Operator status in this channel.
|
String |
getTopic()
The current channel topic
|
UserHostmask |
getTopicSetter()
Get the user that set the topic.
|
long |
getTopicTimestamp()
Timestamp of when the topic was created.
|
com.google.common.collect.ImmutableSortedSet<UserLevel> |
getUserLevels(User user)
Get all levels the user holds in this channel.
|
com.google.common.collect.ImmutableSortedSet<User> |
getUsers()
Get all users in this channel.
|
com.google.common.collect.ImmutableSortedSet<String> |
getUsersNicks()
Get all the user's nicks in this channel
|
com.google.common.collect.ImmutableSortedSet<User> |
getVoices()
Get all voiced users in this channel.
|
int |
hashCode() |
boolean |
hasTopicProtection()
Check if the channel has topic protection (+t) set.
|
boolean |
hasVoice(User user)
Checks if the given user has Voice in this channel.
|
boolean |
isChannelPrivate()
Private (+p) status
|
boolean |
isHalfOp(User user)
Checks if the given user is a Half Operator in this channel.
|
boolean |
isInviteOnly()
Invite only (+i) status
|
boolean |
isModerated()
Moderated (+m) status
|
boolean |
isNoExternalMessages()
No external messages (+n) status
|
boolean |
isOp(User user)
Checks if the given user is an Operator in this channel
|
boolean |
isOwner(User user)
Checks if the given user is an Owner in this channel.
|
boolean |
isSecret()
Secret (+s) status
|
boolean |
isSuperOp(User user)
Checks if the given user is a Super Operator in this channel.
|
OutputChannel |
send()
Send a line to the channel.
|
String |
toString() |
public OutputChannel send()
OutputChannel
for this channelpublic String getMode()
WARNING: Because of the last checking, a threaded listener manager
like ThreadedListenerManager
is required. Using a single threaded
listener manager like
GenericListenerManager
will mean this
method never returns!
public boolean containsMode(char modeLetter)
public boolean hasTopicProtection()
public com.google.common.collect.ImmutableSortedSet<UserLevel> getUserLevels(User user)
user
- The user to get the levels ofpublic com.google.common.collect.ImmutableSortedSet<User> getNormalUsers()
public com.google.common.collect.ImmutableSortedSet<User> getOps()
public com.google.common.collect.ImmutableSortedSet<User> getVoices()
public com.google.common.collect.ImmutableSortedSet<User> getOwners()
public com.google.common.collect.ImmutableSortedSet<User> getHalfOps()
public com.google.common.collect.ImmutableSortedSet<User> getSuperOps()
public com.google.common.collect.ImmutableSortedSet<User> getUsers()
public com.google.common.collect.ImmutableSortedSet<String> getUsersNicks()
public UserHostmask getTopicSetter()
public boolean isOp(User user)
public boolean hasVoice(User user)
public boolean isSuperOp(User user)
public boolean isOwner(User user)
public boolean isHalfOp(User user)
public ChannelSnapshot createSnapshot()
public int compareTo(Channel other)
getName()
with String.compareToIgnoreCase(java.lang.String)
. This is useful for sorting lists of Channel objects.compareTo
in interface Comparable<Channel>
other
- Other channel to compare topublic <T extends PircBotX> T getBot()
@Generated(value="lombok") public String getName()
@Generated(value="lombok") public UUID getChannelId()
@Generated(value="lombok") public String getTopic()
@Generated(value="lombok") public long getTopicTimestamp()
@Generated(value="lombok") public long getCreateTimestamp()
@Generated(value="lombok") public boolean isModerated()
@Generated(value="lombok") public boolean isNoExternalMessages()
@Generated(value="lombok") public boolean isInviteOnly()
@Generated(value="lombok") public boolean isSecret()
@Generated(value="lombok") public boolean isChannelPrivate()
@Generated(value="lombok") public int getChannelLimit()
@Generated(value="lombok") public String getChannelKey()
Copyright © 2010–2020 Leon Blakey. All rights reserved.