io.agora.rtc

## Class AgoraParameter

- java.lang.Object
- - io.agora.rtc.AgoraParameter

-     public class AgoraParameter
      extends java.lang.Object

  Wrapper for setting and getting Agora SDK parameters.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `private long` | `cptr` Native pointer to the parameter object.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `AgoraParameter(long cptr)` Constructor for AgoraParameter.

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `destroy()` Destroys the AgoraParameter object.
    `int` | `getBool(java.lang.String key, Out<java.lang.Boolean> value)` Gets a boolean parameter.
    `int` | `getInt(java.lang.String key, Out<java.lang.Integer> value)` Gets an integer parameter.
    `int` | `getNumber(java.lang.String key, Out<java.lang.Double> value)` Gets a numeric parameter.
    `int` | `getString(java.lang.String key, Out<java.lang.String> value)` Gets a string parameter.
    `int` | `getUint(java.lang.String key, Out<java.lang.Integer> value)` Gets an unsigned integer parameter.
    `private void` | `nativeDestroy(long cptr)` Releases the native parameter object handle.
    `private int` | `nativeGetBool(long cptr, java.lang.String key, Out<java.lang.Boolean> value)` Gets a boolean parameter natively.
    `private int` | `nativeGetInt(long cptr, java.lang.String key, Out<java.lang.Integer> value)` Gets an integer parameter natively.
    `private int` | `nativeGetNumber(long cptr, java.lang.String key, Out<java.lang.Double> value)` Gets a numeric parameter natively.
    `private int` | `nativeGetString(long cptr, java.lang.String key, Out<java.lang.String> value)` Gets a string parameter natively.
    `private int` | `nativeGetUint(long cptr, java.lang.String key, Out<java.lang.Integer> value)` Gets an unsigned integer parameter natively.
    `private int` | `nativeSetArray(long cptr, java.lang.String key, java.lang.String json_src)` Sets an array parameter natively using JSON.
    `private int` | `nativeSetBool(long cptr, java.lang.String key, boolean value)` Sets a boolean parameter natively.
    `private int` | `nativeSetInt(long cptr, java.lang.String key, int value)` Sets an integer parameter natively.
    `private int` | `nativeSetNumber(long cptr, java.lang.String key, double value)` Sets a numeric parameter natively.
    `private int` | `nativeSetParameters(long cptr, java.lang.String json_src)` Sets multiple parameters natively using JSON.
    `private int` | `nativeSetString(long cptr, java.lang.String key, java.lang.String value)` Sets a string parameter natively.
    `private int` | `nativeSetUint(long cptr, java.lang.String key, int value)` Sets an unsigned integer parameter natively.
    `int` | `setArray(java.lang.String key, java.lang.String json_src)` Sets an array parameter using a JSON string.
    `int` | `setBool(java.lang.String key, boolean value)` Sets a boolean parameter.
    `int` | `setInt(java.lang.String key, int value)` Sets an integer parameter.
    `int` | `setNumber(java.lang.String key, double value)` Sets a numeric parameter.
    `int` | `setParameters(java.lang.String json_src)` Sets multiple parameters using a JSON string.
    `int` | `setString(java.lang.String key, java.lang.String value)` Sets a string parameter.
    `int` | `setUint(java.lang.String key, int value)` Sets an unsigned integer parameter.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### cptr

          private long cptr

      Native pointer to the parameter object.

  - ### Constructor Detail

    - #### AgoraParameter

          AgoraParameter(long cptr)

      Constructor for AgoraParameter.
      Parameters:
        `cptr` - Pointer to the native parameter object.

  - ### Method Detail

    - #### destroy

          public void destroy()

      Destroys the AgoraParameter object.

    - #### setInt

          public int setInt(java.lang.String key,
                            int value)

      Sets an integer parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - The integer value to set.
      Returns:
        0 on success, <0 on failure.

    - #### setBool

          public int setBool(java.lang.String key,
                             boolean value)

      Sets a boolean parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - The boolean value to set.
      Returns:
        0 on success, <0 on failure.

    - #### setUint

          public int setUint(java.lang.String key,
                             int value)

      Sets an unsigned integer parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - The unsigned integer value to set.
      Returns:
        0 on success, <0 on failure.

    - #### setNumber

          public int setNumber(java.lang.String key,
                               double value)

      Sets a numeric parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - The numeric value to set.
      Returns:
        0 on success, <0 on failure.

    - #### setString

          public int setString(java.lang.String key,
                               java.lang.String value)

      Sets a string parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - The string value to set.
      Returns:
        0 on success, <0 on failure.

    - #### setArray

          public int setArray(java.lang.String key,
                              java.lang.String json_src)

      Sets an array parameter using a JSON string.
      Parameters:
        `key` - The key of the parameter.
        `json_src` - The JSON string representing the array.
      Returns:
        0 on success, <0 on failure.

    - #### setParameters

          public int setParameters(java.lang.String json_src)

      Sets multiple parameters using a JSON string.
      Parameters:
        `json_src` - The JSON string containing multiple parameters.
      Returns:
        0 on success, <0 on failure.

    - #### getInt

          public int getInt(java.lang.String key,
                            Out<java.lang.Integer> value)

      Gets an integer parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - An Out object to store the integer value.
      Returns:
        0 on success, <0 on failure.

    - #### getBool

          public int getBool(java.lang.String key,
                             Out<java.lang.Boolean> value)

      Gets a boolean parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - An Out object to store the boolean value.
      Returns:
        0 on success, <0 on failure.

    - #### getUint

          public int getUint(java.lang.String key,
                             Out<java.lang.Integer> value)

      Gets an unsigned integer parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - An Out object to store the unsigned integer value.
      Returns:
        0 on success, <0 on failure.

    - #### getNumber

          public int getNumber(java.lang.String key,
                               Out<java.lang.Double> value)

      Gets a numeric parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - An Out object to store the numeric value.
      Returns:
        0 on success, <0 on failure.

    - #### getString

          public int getString(java.lang.String key,
                               Out<java.lang.String> value)

      Gets a string parameter.
      Parameters:
        `key` - The key of the parameter.
        `value` - An Out object to store the string value.
      Returns:
        0 on success, <0 on failure.

    - #### nativeSetInt

          private int nativeSetInt(long cptr,
                                   java.lang.String key,
                                   int value)

      Sets an integer parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Integer value
      Returns:
        0 on success, <0 on failure

    - #### nativeSetBool

          private int nativeSetBool(long cptr,
                                    java.lang.String key,
                                    boolean value)

      Sets a boolean parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Boolean value
      Returns:
        0 on success, <0 on failure

    - #### nativeSetUint

          private int nativeSetUint(long cptr,
                                    java.lang.String key,
                                    int value)

      Sets an unsigned integer parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Unsigned integer value
      Returns:
        0 on success, <0 on failure

    - #### nativeSetNumber

          private int nativeSetNumber(long cptr,
                                      java.lang.String key,
                                      double value)

      Sets a numeric parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Numeric value
      Returns:
        0 on success, <0 on failure

    - #### nativeSetString

          private int nativeSetString(long cptr,
                                      java.lang.String key,
                                      java.lang.String value)

      Sets a string parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - String value
      Returns:
        0 on success, <0 on failure

    - #### nativeSetArray

          private int nativeSetArray(long cptr,
                                     java.lang.String key,
                                     java.lang.String json_src)

      Sets an array parameter natively using JSON.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `json_src` - JSON string representing the array
      Returns:
        0 on success, <0 on failure

    - #### nativeSetParameters

          private int nativeSetParameters(long cptr,
                                          java.lang.String json_src)

      Sets multiple parameters natively using JSON.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `json_src` - JSON string containing multiple parameters
      Returns:
        0 on success, <0 on failure

    - #### nativeGetInt

          private int nativeGetInt(long cptr,
                                   java.lang.String key,
                                   Out<java.lang.Integer> value)

      Gets an integer parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Out object to store the value
      Returns:
        0 on success, <0 on failure

    - #### nativeGetBool

          private int nativeGetBool(long cptr,
                                    java.lang.String key,
                                    Out<java.lang.Boolean> value)

      Gets a boolean parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Out object to store the value
      Returns:
        0 on success, <0 on failure

    - #### nativeGetUint

          private int nativeGetUint(long cptr,
                                    java.lang.String key,
                                    Out<java.lang.Integer> value)

      Gets an unsigned integer parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Out object to store the value
      Returns:
        0 on success, <0 on failure

    - #### nativeGetNumber

          private int nativeGetNumber(long cptr,
                                      java.lang.String key,
                                      Out<java.lang.Double> value)

      Gets a numeric parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Out object to store the value
      Returns:
        0 on success, <0 on failure

    - #### nativeGetString

          private int nativeGetString(long cptr,
                                      java.lang.String key,
                                      Out<java.lang.String> value)

      Gets a string parameter natively.
      Parameters:
        `cptr` - Native pointer to the parameter object
        `key` - Parameter key
        `value` - Out object to store the value
      Returns:
        0 on success, <0 on failure

    - #### nativeDestroy

          private void nativeDestroy(long cptr)

      Releases the native parameter object handle.
      Parameters:
        `cptr` - Native pointer to the parameter object