public class ChannelManager
extends java.lang.Object
TextChannel
or VoiceChannel
.Constructor and Description |
---|
ChannelManager(Channel channel) |
Modifier and Type | Method and Description |
---|---|
void |
delete()
Deletes this Channel
This method takes immediate effect
|
Channel |
getChannel()
Returns the
Channel object of this Manager. |
ChannelManager |
setName(java.lang.String name)
Sets the name of this Channel.
|
ChannelManager |
setPosition(int newPosition)
Sets the position of this Channel.
|
ChannelManager |
setTopic(java.lang.String topic)
Sets the topic of this Channel.
|
void |
update()
This method will apply all accumulated changes received by setters
|
public ChannelManager(Channel channel)
public ChannelManager setName(java.lang.String name)
update()
is called.
So multiple changes can be made at once.name
- The new name of the Channel, or null to keep current onepublic Channel getChannel()
Channel
object of this Manager. Useful if this Manager was returned via a create functionpublic ChannelManager setTopic(java.lang.String topic)
VoiceChannels
and will result in a UnsupportedOperationException
.
This change will only be applied, if update()
is called.
So multiple changes can be made at once.topic
- The new topic of the Channel, or null to keep current onejava.lang.UnsupportedOperationException
- thrown when attempting to set the topic for a VoiceChannel
public ChannelManager setPosition(int newPosition)
update()
is called.
So multiple changes can be made at once.newPosition
- The new position of the Channel, or -1 to keep current onepublic void delete()
public void update()