Skip to content

Instantly share code, notes, and snippets.

@Laimiux
Created April 23, 2017 10:51
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Laimiux/2c196a4822178ba5ed7aa9a246f2075f to your computer and use it in GitHub Desktop.
Save Laimiux/2c196a4822178ba5ed7aa9a246f2075f to your computer and use it in GitHub Desktop.
// Lce -> Loading / Content / Error
class Lce<T> {
public static <T> Lce<T> data(T data) {
// implementation
}
public static <T> Lce<T> error(Throwable error) {
// implementation
}
public static <T> Lce<T> loading() {
// implementation
}
boolean isLoading();
boolean hasError();
Throwable getError();
T getData();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment