Added: Add annotations and modifiers

This commit is contained in:
agnostic-apollo
2022-01-22 04:46:24 +05:00
parent 1fb4fe2510
commit bf10c72661
8 changed files with 49 additions and 32 deletions

View File

@@ -25,7 +25,7 @@ public class Errno {
public static final Errno ERRNO_FAILED = new Errno(TYPE, Activity.RESULT_FIRST_USER + 1, "Failed");
/** The errno type. */
protected String type;
protected final String type;
/** The errno code. */
protected final int code;
/** The errno message. */
@@ -34,7 +34,7 @@ public class Errno {
private static final String LOG_TAG = "Errno";
public Errno(final String type, final int code, final String message) {
public Errno(@NonNull final String type, final int code, @NonNull final String message) {
this.type = type;
this.code = code;
this.message = message;
@@ -47,19 +47,22 @@ public class Errno {
return "type=" + type + ", code=" + code + ", message=\"" + message + "\"";
}
@NonNull
public String getType() {
return type;
}
public String getMessage() {
return message;
}
public int getCode() {
return code;
}
@NonNull
public String getMessage() {
return message;
}
/**
* Get the {@link Errno} of a specific type and code.
*