ModeType
- type of modes being listedpublic class DefaultModeStatusList<ModeType extends Mode> extends Object implements ModeStatusList<ModeType>
Modifier and Type | Method and Description |
---|---|
boolean |
contains(ModeType mode)
Gets if the given mode is present in the list.
|
boolean |
containsMode(char mode)
Gets if the given mode character is present in the list.
|
static @NonNull DefaultModeStatusList<ChannelMode> |
fromChannel(@NonNull Client client,
@NonNull String string)
Creates a list from a given string input such as "+o Kittens".
|
static @NonNull DefaultModeStatusList<UserMode> |
fromUser(@NonNull Client client,
@NonNull String string)
Creates a list from a given string input such as "+iZ".
|
@NonNull List<ModeStatus<ModeType>> |
getAll()
Gets the list of statuses.
|
@NonNull String |
getAsString()
Gets the statuses in a convenient String format.
|
@NonNull List<ModeStatus<ModeType>> |
getByMode(char mode)
Gets all mode statuses of a given mode character.
|
@NonNull List<ModeStatus<ModeType>> |
getByMode(ModeType mode)
Gets all mode statuses of a given mode.
|
static <ModeType extends Mode> |
of(@NonNull Collection<ModeStatus<ModeType>> statuses)
Creates a list of the given statuses.
|
static <ModeType extends Mode> |
of(ModeStatus<ModeType>... statuses)
Creates a list of the given statuses.
|
@NonNull String |
toString() |
public static @NonNull DefaultModeStatusList<ChannelMode> fromChannel(@NonNull Client client, @NonNull String string)
client
- client for which this list existsstring
- string to parsepublic static @NonNull DefaultModeStatusList<UserMode> fromUser(@NonNull Client client, @NonNull String string)
client
- client for which this list existsstring
- string to parsepublic static <ModeType extends Mode> @NonNull DefaultModeStatusList<ModeType> of(ModeStatus<ModeType>... statuses)
ModeType
- type of modes being listedstatuses
- statusespublic static <ModeType extends Mode> @NonNull DefaultModeStatusList<ModeType> of(@NonNull Collection<ModeStatus<ModeType>> statuses)
ModeType
- type of modes being listedstatuses
- statusespublic boolean contains(ModeType mode)
ModeStatusList
contains
in interface ModeStatusList<ModeType extends Mode>
mode
- mode to checkpublic boolean containsMode(char mode)
ModeStatusList
containsMode
in interface ModeStatusList<ModeType extends Mode>
mode
- mode to checkpublic @NonNull List<ModeStatus<ModeType>> getByMode(ModeType mode)
ModeStatusList
getByMode
in interface ModeStatusList<ModeType extends Mode>
mode
- mode to checkpublic @NonNull List<ModeStatus<ModeType>> getByMode(char mode)
ModeStatusList
getByMode
in interface ModeStatusList<ModeType extends Mode>
mode
- mode to checkpublic @NonNull List<ModeStatus<ModeType>> getAll()
ModeStatusList
getAll
in interface ModeStatusList<ModeType extends Mode>
public @NonNull String getAsString()
ModeStatusList
getAsString
in interface ModeStatusList<ModeType extends Mode>
Copyright © 2013–2021 Kitteh. All rights reserved.