Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add MemoryPreference artifact? #114

Open
NightlyNexus opened this issue Mar 13, 2018 · 5 comments
Open

Add MemoryPreference artifact? #114

NightlyNexus opened this issue Mar 13, 2018 · 5 comments

Comments

@NightlyNexus
Copy link
Contributor

I have rewritten MemoryPreference a few times in various projects for tests and mock mode.

public final class MemoryPreference<T> implements Preference<T> {
  private final String key;
  private final T defaultValue;
  @Nullable private volatile T value;
  ...
}

Maybe there should be an artifact here for it?

@f2prateek
Copy link
Owner

Is there a strong reason to prefer a memory backed preference over just a normal preference?

@f2prateek
Copy link
Owner

Actually, I guess it might make sense if you're not using Robolectric.

@NightlyNexus
Copy link
Contributor Author

Yes, I don't use Robolectric.

@MrVilkaman
Copy link

@NightlyNexus show full code, please =)

@ShaishavGandhi
Copy link

Is this still on the table? I basically have a small test class that i end up copying in every project I use this library in. Would be nice to have an official artifact. Happy to contribute a PR or continue on the existing one

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants