Last active
January 23, 2018 18:27
-
-
Save khunzohn/8eb5ac9f4cf1b240c2de9bdb7fce582b to your computer and use it in GitHub Desktop.
Data object that contains States information
This file contains 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 User { | |
public final String id; | |
public final String name; | |
public final Throwable error; // the reason for failing to fetch will be stored here | |
public final State state; //either of SUCCESS,PROGRESS,ERROR enum | |
public User(Throwable error, State state, String id, String name) { | |
this.error = error; | |
this.state = state; | |
this.id = id; | |
this.name = name; | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment