T - data type parameterpublic class ErrorObject<T> extends Object implements Serializable
| Modifier and Type | Class and Description |
|---|---|
static class |
ErrorObject.NoData
Represents error objects without
data attribute. |
static class |
ErrorObject.UnknownData
Represents error objects of unknown type of
data attribute. |
| Modifier and Type | Field and Description |
|---|---|
static int |
CODE_INTERNAL_ERROR |
static int |
CODE_INVALID_PARAMS |
static int |
CODE_INVALID_REQUEST |
static int |
CODE_METHOD_NOT_FOUND |
static int |
CODE_PARSE_ERROR |
static int |
MAX_CODE_SERVER_ERROR |
static int |
MAX_RESERVED_CODE
The maximum value for reserved codes.
|
static int |
MIN_CODE_SERVER_ERROR |
static int |
MIN_RESERVED_CODE
The minimum value for reserved codes.
|
| Constructor and Description |
|---|
ErrorObject() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object o) |
int |
getCode()
Returns current value of
code attribute. |
T |
getData()
Returns current value of
data attribute. |
String |
getMessage()
Returns current value of
message attribute. |
int |
hashCode() |
boolean |
isCodeReserved()
Checks the current value of
code attribute is between MIN_RESERVED_CODE and MAX_RESERVED_CODE (both inclusive). |
void |
setCode(int code)
Replaces value of
code attribute with given. |
void |
setData(T data)
Replaces value of
data attribute with given. |
void |
setMessage(String message)
Replaces value of
message attribute with given. |
String |
toString() |
public static final int MIN_RESERVED_CODE
public static final int MAX_RESERVED_CODE
public static final int CODE_PARSE_ERROR
public static final int CODE_INVALID_REQUEST
public static final int CODE_METHOD_NOT_FOUND
public static final int CODE_INVALID_PARAMS
public static final int CODE_INTERNAL_ERROR
public static final int MIN_CODE_SERVER_ERROR
public static final int MAX_CODE_SERVER_ERROR
public int getCode()
code attribute.code attribute.public void setCode(int code)
code attribute with given.code - new value for code attributepublic boolean isCodeReserved()
code attribute is between MIN_RESERVED_CODE and MAX_RESERVED_CODE (both inclusive).public String getMessage()
message attribute.message attributepublic void setMessage(String message)
message attribute with given.message - new value for message attributepublic T getData()
data attribute.data attributepublic void setData(T data)
data attribute with given.data - new value for data attributeCopyright © 2019 Jinahya, Inc.. All rights reserved.