Class ResponseObject<ResultType,​ErrorType extends ResponseObject.ErrorObject<?>,​IdType>

    • Field Detail

      • PROPERTY_NAME_RESULT

        public static final String PROPERTY_NAME_RESULT
        The property name for $.result. The value is "result".
        See Also:
        Constant Field Values
      • PROPERTY_NAME_ERROR

        public static final String PROPERTY_NAME_ERROR
        The property name for $.error. The value is "error".
        See Also:
        Constant Field Values
    • Constructor Detail

      • ResponseObject

        public ResponseObject()
        Creates a new instance.
    • Method Detail

      • toString

        public String toString()
        Returns a string representation of the object.
        Overrides:
        toString in class JsonrpcObject<IdType>
        Returns:
        a string representation of the object.
      • equals

        public boolean equals​(Object obj)
        Indicates whether some other object is "equal to" this one.
        Overrides:
        equals in class JsonrpcObject<IdType>
        Parameters:
        obj - the reference object with which to compare.
        Returns:
        true if this object is the same as the obj argument; false otherwise.
      • hashCode

        public int hashCode()
        Returns a hash code value for the object.
        Overrides:
        hashCode in class JsonrpcObject<IdType>
        Returns:
        a hash code value for this object.
      • isResultNull

        protected boolean isResultNull()
        Indicates whether the current value of "result" property is semantically null.

        The isResultNull() method of ResponseObject class returns the value of following expression.

        getResult() == null
        Returns:
        true if the current value of "result" property is semantically null; false otherwise.
      • isErrorNull

        protected boolean isErrorNull()
        Indicates whether the current value of "error" property is semantically null.

        The isErrorNull() method of ResponseObject class returns the value of following expression.

        getError() == null
        Returns:
        true if the current value of "error" property is semantically null; false otherwise.
      • isResultErrorExclusive

        @AssertTrue
        protected @javax.validation.constraints.AssertTrue boolean isResultErrorExclusive()
        Indicates either "result" property or "error" property is set exclusively. The isResultErrorExclusive() method of ResponseObject class returns the value of following expression.
        isResultNull() ^ isErrorNull()
        Returns:
        true if either "result" property or "error" property is set exclusively; false otherwise.
        See Also:
        isResultNull(), isErrorNull()
      • getResult

        public ResultType getResult()
        Returns the current value of "result" property.
        Returns:
        the current value of "result" property.
      • setResult

        public void setResult​(ResultType result)
        Replaces the current value of "result" property with specified value.
        Parameters:
        result - new value for "result" property.
      • getError

        public ErrorType getError()
        Returns the current value of "error" property.
        Returns:
        the current value of "error" property.
      • setError

        public void setError​(ErrorType error)
        Replaces the current value of "error" property with specified value.
        Parameters:
        error - new value for "error" property.