com.nu.art.storage.StringPreference Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of local-storage Show documentation
Show all versions of local-storage Show documentation
A collection of core tools I use
/*
* cyborg-core is an extendable module based framework for Android.
*
* Copyright (C) 2018 Adam van der Kruk aka TacB0sS
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package com.nu.art.storage;
import com.nu.art.storage.PreferencesModule.StorageImpl;
public final class StringPreference
extends PreferenceKey {
public StringPreference() {}
public StringPreference(String key, String defaultValue) {
super(key, defaultValue);
}
@Override
protected String _get(StorageImpl preferences, String key, String defaultValue) {
return preferences.get(key, defaultValue);
}
@Override
protected void _set(StorageImpl preferences, String key, String value) {
preferences.put(key, value);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy