class Preference {

    public Action1<? super T> asAction() {
        return new Action1<T>() {
            @Override
            public void call(T value) {
                SharedPreferences.Editor editor = preferences.edit();
                proxy.set(key, value, editor);
                editor.apply();
            }
        };
    }

      Preference(SharedPreferences preferences, final String key, T defValue, Proxy<T> proxy, Observable<String> keyChanges);

}