@Test public void testGet() throws Exception { assertNull(mNullPref.get()); Employee sheik = mSheikPref.get(); assertNotNull(sheik); assertEquals(sheik.mId, SHEIK_ID); assertEquals(sheik.mName, SHEIK_NAME); }
@Override public T get() { if (exists()) { return getGson().fromJson(mStringPreference.get(), mType); } else { return getDefaultValue(); } }
GsonPreference extends Preference<T> { @Override public T get() { if (exists()) { return getGson().fromJson(mStringPreference.get(), mType); } else { return getDefaultValue(); } } }
GsonPreference extends Preference<T> { @Override public T get() { if (exists()) { return getGson().fromJson(mStringPreference.get(), mType); } else { return getDefaultValue(); } } GsonPreference(final String name, final String key, final Type type,
            @Nullable final T defaultValue); }
GsonPreference extends Preference<T> { @Override public T get() { if (exists()) { return getGson().fromJson(mStringPreference.get(), mType); } else { return getDefaultValue(); } } GsonPreference(final String name, final String key, final Type type,
            @Nullable final T defaultValue); @Override boolean exists(); @Override T get(); @NonNull final Gson getGson(); }
GsonPreference extends Preference<T> { @Override public T get() { if (exists()) { return getGson().fromJson(mStringPreference.get(), mType); } else { return getDefaultValue(); } } GsonPreference(final String name, final String key, final Type type,
            @Nullable final T defaultValue); @Override boolean exists(); @Override T get(); @NonNull final Gson getGson();  }