@Test public void saveBoolean() { boolean expected = true; String key = "testKey"; BooleanPreference preference = new BooleanPreference(preferences, key); preference.set(expected); assertThat(preferences.getBoolean(key, false)).isTrue(); }
@Override public void set(Boolean value) { if (value == null) throw new NullPointerException("value"); this.set((boolean) value); }
BooleanPreference extends AbsPreference<Boolean> { @Override public void set(Boolean value) { if (value == null) throw new NullPointerException("value"); this.set((boolean) value); } }
BooleanPreference extends AbsPreference<Boolean> { @Override public void set(Boolean value) { if (value == null) throw new NullPointerException("value"); this.set((boolean) value); } BooleanPreference(SharedPreferences preferences, String key);  BooleanPreference(SharedPreferences preferences, String key, boolean defaultValue); }
BooleanPreference extends AbsPreference<Boolean> { @Override public void set(Boolean value) { if (value == null) throw new NullPointerException("value"); this.set((boolean) value); } BooleanPreference(SharedPreferences preferences, String key);  BooleanPreference(SharedPreferences preferences, String key, boolean defaultValue); @Override Boolean get(); @Override void set(Boolean value); @SuppressLint("CommitPrefEdits") void set(boolean value); }
BooleanPreference extends AbsPreference<Boolean> { @Override public void set(Boolean value) { if (value == null) throw new NullPointerException("value"); this.set((boolean) value); } BooleanPreference(SharedPreferences preferences, String key);  BooleanPreference(SharedPreferences preferences, String key, boolean defaultValue); @Override Boolean get(); @Override void set(Boolean value); @SuppressLint("CommitPrefEdits") void set(boolean value);  }