From 9d884523741364580d5348bb78d95086cd3b6424 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?To=CF=80?= Date: Tue, 12 Sep 2023 17:52:48 +0200 Subject: [PATCH] finish renaming --- .../topi314/lavasearch/SearchManager.java | 20 +++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/main/src/main/java/com/github/topi314/lavasearch/SearchManager.java b/main/src/main/java/com/github/topi314/lavasearch/SearchManager.java index 2c51809..b28b50b 100644 --- a/main/src/main/java/com/github/topi314/lavasearch/SearchManager.java +++ b/main/src/main/java/com/github/topi314/lavasearch/SearchManager.java @@ -9,19 +9,19 @@ public class SearchManager { - private final List sourceManagers; + private final List searchManagers; public SearchManager() { - this.sourceManagers = new ArrayList<>(); + this.searchManagers = new ArrayList<>(); } - public void registerSourceManager(AudioSearchManager sourceManager) { - sourceManagers.add(sourceManager); + public void registerSearchManager(AudioSearchManager sourceManager) { + searchManagers.add(sourceManager); } @Nullable - public T source(Class klass) { - for (var sourceManager : sourceManagers) { + public T search(Class klass) { + for (var sourceManager : searchManagers) { if (klass.isAssignableFrom(sourceManager.getClass())) { return klass.cast(sourceManager); } @@ -30,19 +30,19 @@ public T source(Class klass) { return null; } - public List getSourceManagers() { - return this.sourceManagers; + public List getSearchManagers() { + return this.searchManagers; } public void shutdown() { - for (var sourceManager : this.sourceManagers) { + for (var sourceManager : this.searchManagers) { sourceManager.shutdown(); } } @Nullable public AudioSearchResult loadSearch(String query, Set types) { - for (var sourceManager : this.sourceManagers) { + for (var sourceManager : this.searchManagers) { var searchResults = sourceManager.loadSearch(query, types); if (searchResults != null) { return searchResults;