Class ObjectParameters

  • All Implemented Interfaces:
    Parameters<com.google.gson.JsonObject>, Supplier<com.google.gson.JsonObject>

    public final class ObjectParameters
    extends Object
    implements Parameters<com.google.gson.JsonObject>
    Represents the params in object format.
    Since:
    0.1.0
    Author:
    Elias*
    See Also:
    JSON-RPC Specification
    • Constructor Detail

      • ObjectParameters

        public ObjectParameters​(com.google.gson.JsonObject params)
        Creates an ObjectParameters.
        Parameters:
        params - The parameters to be used
    • Method Detail

      • get

        public com.google.gson.JsonObject get()
        Getter for the actual parameters.
        Specified by:
        get in interface Supplier<com.google.gson.JsonObject>
        Returns:
        The actual parameters
      • write

        public void write​(com.google.gson.stream.JsonWriter out)
                   throws IOException
        Writes a JsonObject to out.
        Specified by:
        write in interface Parameters<com.google.gson.JsonObject>
        Parameters:
        out - The JsonWriter used as output
        Throws:
        IOException - If serialization fails
      • hashCode

        public int hashCode()
        Returns the hash code for this ObjectParameters.
        Overrides:
        hashCode in class Object
        Returns:
        The hash code of the JsonObject
      • equals

        public boolean equals​(Object obj)
        Two ObjectParameters objects are equal if their underlying JsonObject is equal.
        Overrides:
        equals in class Object
        Parameters:
        obj - The object to be checked
        Returns:
        true if the object is equal as described above
      • toString

        public String toString()
        Returns the string representation for this ObjectParameters.
        Overrides:
        toString in class Object
        Returns:
        The value of the JsonObject as string