diff --git a/lib/src/main/java/com/team2813/lib2813/preferences/PersistedConfiguration.java b/lib/src/main/java/com/team2813/lib2813/preferences/PersistedConfiguration.java index 203750e8..c4f0ca30 100644 --- a/lib/src/main/java/com/team2813/lib2813/preferences/PersistedConfiguration.java +++ b/lib/src/main/java/com/team2813/lib2813/preferences/PersistedConfiguration.java @@ -149,10 +149,10 @@ public final class PersistedConfiguration { *
To be stored in preferences, the type of the record components can be any of the following: * *
To be stored in preferences, the type of the record components can be any of the following: * *
Note: this interface exists to avoid ugly casts in the code that uses the reflection APIs.
*/
@FunctionalInterface
- private interface PreferenceFactory {
+ private interface PreferenceFetcher {
/**
* Gets a value from Preferences for the given component.
*
@@ -368,50 +365,41 @@ private interface PreferenceFactory {
* @param initializePreference Whether the preference should be initialized.
* @return The value; will match the type in "component";
*/
- Object create(
+ Object getValue(
RecordComponent component, String key, Object defaultValue, boolean initializePreference);
}
- private static final Map