Skip to content

Instantly share code, notes, and snippets.

@calindotgabriel
Created November 27, 2015 18:17
Show Gist options
  • Save calindotgabriel/4220d095841c8c165f53 to your computer and use it in GitHub Desktop.
Save calindotgabriel/4220d095841c8c165f53 to your computer and use it in GitHub Desktop.
public class NetworkService {
@IntDef({OK, SV_DOWN, SV_INVALID, UNKNOWN})
@Retention(RetentionPolicy.SOURCE)
public @interface Response{}
public static final int OK = 0;
public static final int SV_DOWN = 1;
public static final int SV_INVALID = 2;
public static final int UNKNOWN = 3;
public static void setResponse(@Response int response) {
//do stuff
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment