Package eliasstar.jsonrpc.objects
Class Error
- java.lang.Object
-
- eliasstar.jsonrpc.objects.Error
-
public final class Error extends Object
Represents a JSON-RPC error contained in aResponse.- Since:
- 0.1.0
- Author:
- Elias*
- See Also:
- JSON-RPC Specification
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description longcode()Getter for error code field.protected StringcontentAsJsonString()Optional<com.google.gson.JsonElement>data()Getter for error data field.booleanequals(Object obj)This method returnstrueif the argument is aErrorand all properties are equal, otherwise returnsfalse.inthashCode()This method is implemented usingObjects.hash().Stringmessage()Getter for error message field.StringtoString()
-
-
-
Method Detail
-
code
public long code()
Getter for error code field.- Returns:
- The error code
-
message
public String message()
Getter for error message field.- Returns:
- The message
-
data
public Optional<com.google.gson.JsonElement> data()
Getter for error data field.- Returns:
- The additional data
-
hashCode
public int hashCode()
This method is implemented usingObjects.hash().
-
equals
public boolean equals(Object obj)
This method returnstrueif the argument is aErrorand all properties are equal, otherwise returnsfalse.
-
toString
public String toString()
-
-