public class DefaultChannel extends DefaultStaleable implements Channel
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultChannel.DefaultChannelCommands
Default channel commands.
|
Channel.Commands, Channel.Topic| Constructor and Description |
|---|
DefaultChannel(Client.WithManagement client,
String name,
Channel.Topic topic,
ModeStatusList<ChannelMode> channelModes,
Map<Character,List<ModeInfo>> modeInfoLists,
Map<String,SortedSet<ChannelUserMode>> modes,
List<String> names,
Map<String,User> nickMap,
List<User> users,
boolean complete,
DefaultChannel.DefaultChannelCommands commands)
Constructs the channel snapshot.
|
| Modifier and Type | Method and Description |
|---|---|
Channel.Commands |
commands()
Provides access to
Commands. |
boolean |
equals(Object o) |
String |
getMessagingName()
Gets the name used when sending messages.
|
Optional<List<ModeInfo>> |
getModeInfoList(ChannelMode mode)
Gets the tracked mode info for the channel, if tracked.
|
ModeStatusList<ChannelMode> |
getModes()
Gets the channel's current known modes.
|
List<String> |
getNicknames()
Gets the nicknames of users in the channel, if the client is in the
channel.
|
Channel.Topic |
getTopic()
Gets the channel's topic.
|
Optional<User> |
getUser(String nick)
Gets a user by their nick, if they are known to the client.
|
Optional<SortedSet<ChannelUserMode>> |
getUserModes(String nick)
Gets the user modes of a given nickname in the channel.
|
List<User> |
getUsers()
Gets all Users known to be in the channel.
|
boolean |
hasCompleteUserData()
Gets if this Channel has complete user data available, only possible
if the Client is in the channel and the WHO list has sent.
|
int |
hashCode() |
void |
setModeInfoTracking(ChannelMode mode,
boolean track)
Sets whether a particular type A mode should be tracked for this
channel, and sends a request for the full list.
|
String |
toString() |
isStalegetClient, getCreationTime, getNameclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetLatest, getUserModes, join, join, kick, kick, part, part, setTopicgetLowerCaseMessagingName, sendCtcpMessage, sendMessage, sendMultiLineMessage, sendMultiLineMessage, sendMultiLineNotice, sendMultiLineNotice, sendNoticegetLowerCaseName, getNamegetCreationTimegetClientpublic DefaultChannel(@Nonnull Client.WithManagement client, @Nonnull String name, @Nonnull Channel.Topic topic, @Nonnull ModeStatusList<ChannelMode> channelModes, @Nonnull Map<Character,List<ModeInfo>> modeInfoLists, @Nonnull Map<String,SortedSet<ChannelUserMode>> modes, @Nonnull List<String> names, @Nonnull Map<String,User> nickMap, @Nonnull List<User> users, boolean complete, @Nonnull DefaultChannel.DefaultChannelCommands commands)
client - clientname - channel nametopic - topicchannelModes - channel modesmodeInfoLists - modeinfolistsmodes - modesnames - who is in the channelnickMap - map of nicks to Usersusers - userscomplete - true if WHO completedcommands - commands object@Nonnull public String getMessagingName()
MessageReceivergetMessagingName in interface MessageReceiver@Nonnull public Optional<List<ModeInfo>> getModeInfoList(@Nonnull ChannelMode mode)
ChannelgetModeInfoList in interface Channelmode - type A mode to acquire@Nonnull public ModeStatusList<ChannelMode> getModes()
Channel@Nonnull public List<String> getNicknames()
ChannelgetNicknames in interface Channel@Nonnull public Channel.Topic getTopic()
Channel@Nonnull public Optional<User> getUser(@Nonnull String nick)
ChannelgetUser in interface Channelnick - user's nickChannel.hasCompleteUserData(),
ChannelUsersUpdatedEvent@Nonnull public Optional<SortedSet<ChannelUserMode>> getUserModes(@Nonnull String nick)
ChannelgetUserModes in interface Channelnick - user's nick@Nonnull public List<User> getUsers()
ChannelChannel.getNicknames().getUsers in interface ChannelChannel.hasCompleteUserData(),
ChannelUsersUpdatedEventpublic boolean hasCompleteUserData()
ChannelhasCompleteUserData in interface ChannelChannelUsersUpdatedEventpublic void setModeInfoTracking(@Nonnull ChannelMode mode, boolean track)
ChannelRequestedChannelJoinCompleteEvent to ensure it's always set.setModeInfoTracking in interface Channelmode - mode to tracktrack - true to track, false to stop trackingChannelModeInfoListEvent@Nonnull public Channel.Commands commands()
ChannelCommands.@Nonnull public String toString()
toString in class DefaultActorCopyright © 2013–2019 Kitteh. All rights reserved.