Class ApiResponseSet

    • Constructor Detail

      • ApiResponseSet

        @Deprecated
        public ApiResponseSet​(java.lang.String name,
                              java.lang.String[] attributes)
        Deprecated.
        (1.1.0) Unused, there's no replacement.
        Constructs an ApiResponseSet with the given name and attributes.
        Parameters:
        name - the name of the API response
        attributes - the attributes
      • ApiResponseSet

        public ApiResponseSet​(java.lang.String name,
                              java.util.Map<java.lang.String,​ApiResponse> values)
    • Method Detail

      • getAttributes

        @Deprecated
        public java.lang.String[] getAttributes()
        Deprecated.
        (1.1.0) Unused, there's no replacement.
        Gets the attributes.
        Returns:
        the attributes, might be null.
        See Also:
        getValues()
      • getAttribute

        @Deprecated
        public java.lang.String getAttribute​(java.lang.String key)
        Deprecated.
        Gets the value for the given key.
        Parameters:
        key - the key of the value
        Returns:
        the value, or null if no value exists for the given key.
      • getValue

        public ApiResponse getValue​(java.lang.String key)
        Gets the value for the given key.
        Parameters:
        key - the key of the value
        Returns:
        the value, or null if no value exists for the given key.
        Since:
        1.1.0
        See Also:
        getKeys(), getStringValue(String)
      • getStringValue

        public java.lang.String getStringValue​(java.lang.String key)
        Gets the value for the given key as String.

        For ApiResponseElements it returns its value, for other ApiResponse types it returns the conversion to String.

        Parameters:
        key - the key of the value
        Returns:
        the value, or null if no value exists for the given key.
        Since:
        1.1.0
        See Also:
        getKeys(), getValue(String)
      • getValuesMap

        public java.util.Map<java.lang.String,​ApiResponse> getValuesMap()
        Gets a Map with the keys and values.

        The returned Map is unmodifiable, any attempt to modify it will result in an UnsupportedOperationException.

        Returns:
        the map with the keys/values, never null.
        Since:
        1.1.0
      • getKeys

        public java.util.Set<java.lang.String> getKeys()
        Gets the keys of the values.

        The returned Set is unmodifiable, any attempt to modify it will result in an UnsupportedOperationException.

        Returns:
        the keys, never null.
        Since:
        1.1.0
        See Also:
        getValue(String), getStringValue(String), getValues(), getValuesMap()
      • getValues

        public java.util.Collection<ApiResponse> getValues()
        Gets the values.

        The returned Collection is unmodifiable, any attempt to modify it will result in an UnsupportedOperationException.

        Returns:
        the values, never null.
        Since:
        1.1.0
        See Also:
        getValue(String), getStringValue(String)
      • toString

        public java.lang.String toString​(int indent)
        Specified by:
        toString in class ApiResponse