@Immutable public class ErrorObject extends Object
| Constructor and Description |
|---|
ErrorObject(String code)
Creates a new error with the specified code.
|
ErrorObject(String code,
String description)
Creates a new error with the specified code and description.
|
ErrorObject(String code,
String description,
int httpStatusCode)
Creates a new error with the specified code, description and HTTP
status code.
|
ErrorObject(String code,
String description,
int httpStatusCode,
URL uri)
Creates a new error with the specified code, description, HTTP
status code and page URI.
|
| Modifier and Type | Method and Description |
|---|---|
ErrorObject |
appendDescription(String text)
Appends the specified text to the error description.
|
boolean |
equals(Object object) |
String |
getCode()
Gets the error code.
|
String |
getDescription()
Gets the error description.
|
int |
getHTTPStatusCode()
Gets the HTTP status code.
|
URL |
getURI()
Gets the error page URI.
|
int |
hashCode() |
ErrorObject |
setDescription(String description)
Sets the error description.
|
ErrorObject |
setHTTPStatusCode(int httpStatusCode)
Sets the HTTP status code.
|
ErrorObject |
setURI(URL uri)
Sets the error page URI.
|
String |
toString() |
public ErrorObject(String code)
code - The error code, null if not specified.public ErrorObject(String code, String description)
code - The error code, null if not specified.description - The error description, null if not
specified.public ErrorObject(String code, String description, int httpStatusCode)
code - The error code, null if not specified.description - The error description, null if not
specified.httpStatusCode - The HTTP status code, zero if not specified.public ErrorObject(String code, String description, int httpStatusCode, URL uri)
code - The error code, null if not specified.description - The error description, null if not
specified.httpStatusCode - The HTTP status code, zero if not specified.uri - The error page URI, null if not
specified.public String getDescription()
null if not specified.public ErrorObject setDescription(String description)
description - The error description, null if not
specified.public ErrorObject appendDescription(String text)
text - The text to append to the error description,
null if not specified.public int getHTTPStatusCode()
public ErrorObject setHTTPStatusCode(int httpStatusCode)
httpStatusCode - The HTTP status code, zero if not specified.public URL getURI()
null if not specified.public ErrorObject setURI(URL uri)
uri - The error page URI, null if not specified.Copyright © 2013 NimbusDS. All Rights Reserved.