aboutsummaryrefslogblamecommitdiff
path: root/app/src/main/java/ml/docilealligator/infinityforreddit/NetworkState.java
blob: 319de6b207c433a6b13939f8aec41e47705e2a20 (plain) (tree)
1
2
3
4
5
6
7
8
9
10

                                             
                           

                                             
 



                                                              



                                
                                                    



                             






                               





                        
 
package ml.docilealligator.infinityforreddit;

public class NetworkState {
    public static final NetworkState LOADED;
    public static final NetworkState LOADING;

    static {
        LOADED = new NetworkState(Status.SUCCESS, "Success");
        LOADING = new NetworkState(Status.LOADING, "Loading");
    }

    private final Status status;
    private final String msg;

    public NetworkState(Status status, String msg) {
        this.status = status;
        this.msg = msg;
    }

    public Status getStatus() {
        return status;
    }

    public String getMsg() {
        return msg;
    }

    public enum Status {
        LOADING,
        SUCCESS,
        FAILED
    }
}