Class Value


  • public final class Value
    extends Object
    The value type, which is used by XML-RPC.
    • Method Detail

      • of

        public static Value of​(Integer integer)
        Creates an integer value.
        Parameters:
        integer - The integer value.
        Returns:
        The value element.
      • of

        public static Value of​(String string)
        Creates a string value.
        Parameters:
        string - The string value.
        Returns:
        The value element.
      • of

        public static Value of​(Double d)
        Creates a double value.
        Parameters:
        d - The double value.
        Returns:
        The value element.
      • of

        public static Value of​(byte[] bytes)
        Creates a binary (base64) value.
        Parameters:
        bytes - The binary value.
        Returns:
        The value element.
      • of

        public static Value of​(boolean b)
        Creates a boolean value.
        Parameters:
        b - The boolean value.
        Returns:
        The value element.
      • of

        public static Value of​(OffsetDateTime dateTime)
        Creates a date value.
        Parameters:
        dateTime - The date time value.
        Returns:
        The value element.
      • of

        public static Value of​(Collection<Value> list)
        Creates an array type value.
        Parameters:
        list - The array type value.
        Returns:
        The value element.
      • of

        public static Value of​(Map<String,​Value> map)
        Creates a struct type value.
        Parameters:
        map - The struct type value.
        Returns:
        The value element.
      • getAsInteger

        public final Integer getAsInteger()
        Gets the value as integer or null.
        Returns:
        The integer or null.
      • getAsDouble

        public final Double getAsDouble()
        Gets the value as double or null.
        Returns:
        The double or null.
      • getAsString

        public final String getAsString()
        Gets the value as string or null.
        Returns:
        The string or null.
      • getAsByteArray

        public final byte[] getAsByteArray()
        Gets the value as byte array or null.
        Returns:
        The byte array or null.
      • getAsBoolean

        public final boolean getAsBoolean()
        Gets the value as boolean.
        Returns:
        The boolean.
      • getAsInstant

        public final OffsetDateTime getAsInstant()
        Gets the value as date or null.
        Returns:
        The date or null.
      • getAsArray

        public final List<Value> getAsArray()
        Gets the value as array or null.
        Returns:
        The array or null.
      • getAsMap

        public final Map<String,​Value> getAsMap()
        Gets the value as map or null.
        Returns:
        The map or null.
      • hashCode

        public final int hashCode()
        Overrides:
        hashCode in class Object