Package xyz.srnyx.annoyingapi
Class PluginPlatform.Multi
- All Implemented Interfaces:
Serializable,Cloneable,Iterable<PluginPlatform>,Collection<PluginPlatform>,NavigableSet<PluginPlatform>,SequencedCollection<PluginPlatform>,SequencedSet<PluginPlatform>,Set<PluginPlatform>,SortedSet<PluginPlatform>
- Enclosing class:
PluginPlatform
A collection of
PluginPlatforms- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionMulti()Creates a new emptyPluginPlatform.MultiMulti(@NotNull Collection<PluginPlatform> pluginPlatforms) Creates a newPluginPlatform.Multiwith the givenPluginPlatformsMulti(@NotNull PluginPlatform... pluginPlatforms) Creates a newPluginPlatform.Multiwith the givenPluginPlatforms -
Method Summary
Modifier and TypeMethodDescription@NotNull Optional<PluginPlatform> get(@NotNull PluginPlatform.Platform platform) Gets thePluginPlatformfor the givenPluginPlatform.PlatformgetIdentifier(@NotNull PluginPlatform.Platform platform) Gets thePluginPlatform.identifierfor the givenPluginPlatform.Platformstatic @NotNull TreeSet<PluginPlatform> load(@NotNull com.google.gson.JsonObject json) Loads aPluginPlatform.Multifrom the givenJsonObjectstatic @NotNull PluginPlatform.MultiLoads aPluginPlatform.Multifrom the givenConfigurationSectionbooleanremove(@NotNull PluginPlatform.Platform platforms) Removes thePluginPlatformfor the givenplatformsMethods inherited from class java.util.TreeSet
add, addAll, addFirst, addLast, ceiling, clear, clone, comparator, contains, descendingIterator, descendingSet, first, floor, headSet, headSet, higher, isEmpty, iterator, last, lower, pollFirst, pollLast, remove, size, spliterator, subSet, subSet, tailSet, tailSetMethods inherited from class java.util.AbstractSet
equals, hashCode, removeAllMethods inherited from class java.util.AbstractCollection
containsAll, retainAll, toArray, toArray, toStringMethods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.util.Collection
parallelStream, removeIf, stream, toArrayMethods inherited from interface java.util.NavigableSet
removeFirst, removeLast, reversed
-
Constructor Details
-
Multi
public Multi()Creates a new emptyPluginPlatform.Multi -
Multi
Creates a newPluginPlatform.Multiwith the givenPluginPlatforms -
Multi
Creates a newPluginPlatform.Multiwith the givenPluginPlatforms
-
-
Method Details
-
load
@NotNull public static @NotNull PluginPlatform.Multi load(@NotNull @NotNull org.bukkit.configuration.ConfigurationSection section, @NotNull @NotNull String key) Loads aPluginPlatform.Multifrom the givenConfigurationSection- Parameters:
section- theConfigurationSectionto load fromkey- the key to load from- Returns:
- the loaded
PluginPlatform.Multi
-
load
@NotNull public static @NotNull TreeSet<PluginPlatform> load(@NotNull @NotNull com.google.gson.JsonObject json) Loads aPluginPlatform.Multifrom the givenJsonObject -
get
@NotNull public @NotNull 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 Optional<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
-
remove
Removes thePluginPlatformfor the givenplatforms- Parameters:
platforms- thePluginPlatform.Platformto remove theplugin platformsfor- Returns:
- whether a
plugin platformwas removed
-