Class ArrayParameters

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

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

      • ArrayParameters

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

      • get

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

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

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

        public boolean equals​(Object obj)
        Two ArrayParameters objects are equal if their underlying JsonArray 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 ArrayParameters.
        Overrides:
        toString in class Object
        Returns:
        The value of the JsonArray as string