Class SelectorManager
java.lang.Object
xyz.srnyx.annoyingapi.command.selector.SelectorManager
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription@NotNull Collection<String> addKeysTo(@NotNull Collection<String> collection) Adds all registered selector keys to a collection
This modifies the input collection!@NotNull Collection<String> addKeysTo(@NotNull Collection<String> collection, @NotNull Class<?> type) Adds all registered selector keys for a specific type to a collection
This modifies the input collection!getKeys()Gets a list of all registered selector keysGets a list of all registered selector keys for a specific typevoid@NotNull Collection<String> withKeys(@NotNull Collection<String> collection) Adds all registered selector keys to the beginning of a collection
This returns a NEW List, it does not modify the input collection!withKeys(@NotNull Collection<String> collection, @NotNull Class<?> type) Adds all registered selector keys for a specific type to the beginning of a collection
This returns a NEW List, it does not modify the input collection!
-
Field Details
-
selectors
Set of registeredSelectors by the plugin
-
-
Constructor Details
-
SelectorManager
-
-
Method Details
-
registerSelectors
public void registerSelectors() -
getKeys
Gets a list of all registered selector keys- Returns:
- a list of all registered selector keys
-
getKeys
Gets a list of all registered selector keys for a specific type- Parameters:
type- the type to filter by- Returns:
- a list of all registered selector keys for the specified type
-
withKeys
@NotNull public @NotNull Collection<String> withKeys(@NotNull @NotNull Collection<String> collection) Adds all registered selector keys to the beginning of a collection
This returns a NEW List, it does not modify the input collection!- Parameters:
collection- the collection to add to- Returns:
- the collection with all registered selector keys added
- See Also:
-
withKeys
@NotNull public @NotNull List<String> withKeys(@NotNull @NotNull Collection<String> collection, @NotNull @NotNull Class<?> type) Adds all registered selector keys for a specific type to the beginning of a collection
This returns a NEW List, it does not modify the input collection!- Parameters:
collection- the collection to add totype- the type to filter by- Returns:
- the collection with all registered selector keys for the specified type added
- See Also:
-
addKeysTo
@NotNull public @NotNull Collection<String> addKeysTo(@NotNull @NotNull Collection<String> collection) Adds all registered selector keys to a collection
This modifies the input collection!- Parameters:
collection- the collection to add to- Returns:
- the collection with all registered selector keys added (for convenience)
- See Also:
-
addKeysTo
@NotNull public @NotNull Collection<String> addKeysTo(@NotNull @NotNull Collection<String> collection, @NotNull @NotNull Class<?> type) Adds all registered selector keys for a specific type to a collection
This modifies the input collection!- Parameters:
collection- the collection to add totype- the type to filter by- Returns:
- the collection with all registered selector keys added (for convenience)
- See Also:
-