Package xyz.srnyx.annoyingapi
Class PluginPlatform.Multi
- java.lang.Object
-
- xyz.srnyx.javautilities.parents.Stringable
-
- xyz.srnyx.annoyingapi.PluginPlatform.Multi
-
- Enclosing class:
- PluginPlatform
public static class PluginPlatform.Multi extends xyz.srnyx.javautilities.parents.StringableA collection ofPluginPlatforms
-
-
Field Summary
Fields Modifier and Type Field Description @NotNull java.util.Set<PluginPlatform>pluginPlatformsThePluginPlatformsin thisMulti
-
Constructor Summary
Constructors Constructor Description Multi()Creates a new emptyPluginPlatform.MultiMulti(@NotNull java.util.Collection<PluginPlatform> pluginPlatforms)Creates a newPluginPlatform.Multiwith the givenPluginPlatformsMulti(@NotNull PluginPlatform... pluginPlatforms)Creates a newPluginPlatform.Multiwith the givenPluginPlatforms
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanadd(@NotNull PluginPlatform... pluginPlatforms)Adds the givenplugin platformsto thisPluginPlatform.MultibooleanaddIfAbsent(@NotNull PluginPlatform... pluginPlatforms)Adds the givenplugin platformsto thisPluginPlatform.Multiif they don't already exist@NotNull java.util.Optional<PluginPlatform>get(@NotNull PluginPlatform.Platform platform)Gets thePluginPlatformfor the givenPluginPlatform.Platform@NotNull java.util.Optional<java.lang.String>getIdentifier(@NotNull PluginPlatform.Platform platform)Gets thePluginPlatform.identifierfor the givenPluginPlatform.Platformstatic @NotNull PluginPlatform.Multiload(@NotNull org.bukkit.configuration.ConfigurationSection section, @NotNull java.lang.String key)Loads aPluginPlatform.Multifrom the givenConfigurationSectionbooleanremove(@NotNull PluginPlatform.Platform... platforms)Removes theplugin platformsfor the givenplatforms@NotNull java.lang.StringtoString()
-
-
-
Field Detail
-
pluginPlatforms
@NotNull public final @NotNull java.util.Set<PluginPlatform> pluginPlatforms
ThePluginPlatformsin thisMulti
-
-
Constructor Detail
-
Multi
public Multi()
Creates a new emptyPluginPlatform.Multi
-
Multi
public Multi(@NotNull @NotNull java.util.Collection<PluginPlatform> pluginPlatforms)Creates a newPluginPlatform.Multiwith the givenPluginPlatforms- Parameters:
pluginPlatforms-pluginPlatforms
-
Multi
public Multi(@NotNull @NotNull PluginPlatform... pluginPlatforms)Creates a newPluginPlatform.Multiwith the givenPluginPlatforms- Parameters:
pluginPlatforms-pluginPlatforms
-
-
Method Detail
-
load
@NotNull public static @NotNull PluginPlatform.Multi load(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section, @NotNull @NotNull java.lang.String key)
Loads aPluginPlatform.Multifrom the givenConfigurationSection- Parameters:
section- theConfigurationSectionto load fromkey- the key to load from- Returns:
- the loaded
PluginPlatform.Multi
-
get
@NotNull public @NotNull java.util.Optional<PluginPlatform> get(@NotNull @NotNull PluginPlatform.Platform platform)
Gets thePluginPlatformfor the givenPluginPlatform.Platform- Parameters:
platform- thePluginPlatform.Platformto get thePluginPlatformfor- Returns:
- the
PluginPlatformfor the givenPluginPlatform.Platform
-
getIdentifier
@NotNull public @NotNull java.util.Optional<java.lang.String> getIdentifier(@NotNull @NotNull PluginPlatform.Platform platform)Gets thePluginPlatform.identifierfor the givenPluginPlatform.Platform- Parameters:
platform- thePluginPlatform.Platformto get thePluginPlatform.identifierfor- Returns:
- the
PluginPlatform.identifierfor the givenPluginPlatform.Platform
-
add
public boolean add(@NotNull @NotNull PluginPlatform... pluginPlatforms)Adds the givenplugin platformsto thisPluginPlatform.Multi- Parameters:
pluginPlatforms- theplugin platformsto add- Returns:
- whether a
plugin platformwas added
-
addIfAbsent
public boolean addIfAbsent(@NotNull @NotNull PluginPlatform... pluginPlatforms)Adds the givenplugin platformsto thisPluginPlatform.Multiif they don't already exist- Parameters:
pluginPlatforms- theplugin platformsto add- Returns:
- whether a
plugin platformwas added
-
remove
public boolean remove(@NotNull @NotNull PluginPlatform.Platform... platforms)Removes theplugin platformsfor the givenplatforms- Parameters:
platforms- theplatformsto remove theplugin platformsfor- Returns:
- whether a
plugin platformwas removed
-
toString
@NotNull public @NotNull java.lang.String toString()
- Overrides:
toStringin classxyz.srnyx.javautilities.parents.Stringable
-
-