Created
June 4, 2019 17:04
-
-
Save alaershov/5eac25ef8717a17e4a279b4656a14ba7 to your computer and use it in GitHub Desktop.
Toothpick: User repository with no DI
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public final class UserRepository { | |
private final SharedPreferences sharedPreferences; | |
public UserRepository(SharedPreferences sharedPreferences) { | |
this.sharedPreferences = sharedPreferences; | |
} | |
public User getUser() { | |
// ... | |
} | |
public void saveUser(User user) { | |
// ... | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment