Use List.of().
This commit is contained in:
parent
c53143ef4f
commit
ca26fcb0eb
17 changed files with 75 additions and 102 deletions
|
|
@ -3,8 +3,6 @@ package org.schabi.newpipe.settings.preferencesearch;
|
|||
import androidx.preference.PreferenceCategory;
|
||||
import androidx.preference.PreferenceScreen;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
import java.util.stream.Stream;
|
||||
|
|
@ -12,9 +10,9 @@ import java.util.stream.Stream;
|
|||
public class PreferenceSearchConfiguration {
|
||||
private PreferenceSearchFunction searcher = new PreferenceFuzzySearchFunction();
|
||||
|
||||
private final List<String> parserIgnoreElements = Collections.singletonList(
|
||||
PreferenceCategory.class.getSimpleName());
|
||||
private final List<String> parserContainerElements = Arrays.asList(
|
||||
private final List<String> parserIgnoreElements = List.of(PreferenceCategory.class
|
||||
.getSimpleName());
|
||||
private final List<String> parserContainerElements = List.of(
|
||||
PreferenceCategory.class.getSimpleName(),
|
||||
PreferenceScreen.class.getSimpleName());
|
||||
|
||||
|
|
|
|||
|
|
@ -3,7 +3,6 @@ package org.schabi.newpipe.settings.preferencesearch;
|
|||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.XmlRes;
|
||||
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
|
|
@ -92,11 +91,7 @@ public class PreferenceSearchItem {
|
|||
}
|
||||
|
||||
public List<String> getAllRelevantSearchFields() {
|
||||
return Arrays.asList(
|
||||
getTitle(),
|
||||
getSummary(),
|
||||
getEntries(),
|
||||
getBreadcrumbs());
|
||||
return List.of(getTitle(), getSummary(), getEntries(), getBreadcrumbs());
|
||||
}
|
||||
|
||||
@NonNull
|
||||
|
|
|
|||
|
|
@ -10,8 +10,6 @@ import com.grack.nanojson.JsonStringWriter;
|
|||
import com.grack.nanojson.JsonWriter;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Arrays;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
|
|
@ -20,11 +18,9 @@ import java.util.List;
|
|||
public final class TabsJsonHelper {
|
||||
private static final String JSON_TABS_ARRAY_KEY = "tabs";
|
||||
|
||||
private static final List<Tab> FALLBACK_INITIAL_TABS_LIST = Collections.unmodifiableList(
|
||||
Arrays.asList(
|
||||
Tab.Type.DEFAULT_KIOSK.getTab(),
|
||||
Tab.Type.SUBSCRIPTIONS.getTab(),
|
||||
Tab.Type.BOOKMARKS.getTab()));
|
||||
private static final List<Tab> FALLBACK_INITIAL_TABS_LIST = List.of(
|
||||
Tab.Type.DEFAULT_KIOSK.getTab(), Tab.Type.SUBSCRIPTIONS.getTab(),
|
||||
Tab.Type.BOOKMARKS.getTab());
|
||||
|
||||
private TabsJsonHelper() { }
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue