com.aispeech.dui.dsk.duiwidget

## Class DuiWidget

- java.lang.Object
- - com.aispeech.dui.dsk.duiwidget.DuiWidget

- Direct Known Subclasses:
    ContentWidget, ListWidget, MediaWidget, TextWidget, WebWidget

      public class DuiWidget
      extends java.lang.Object

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static java.lang.String` | `TYPE_CONTENT`
    `static java.lang.String` | `TYPE_LIST`
    `static java.lang.String` | `TYPE_MEDIA`
    `static java.lang.String` | `TYPE_TEXT`
    `static java.lang.String` | `TYPE_WEB`
    `static java.lang.String` | `WIDGET_EXTRA`
    `static java.lang.String` | `WIDGET_IMAGEURL`
    `static java.lang.String` | `WIDGET_LABEL`
    `static java.lang.String` | `WIDGET_LINKURL`
    `static java.lang.String` | `WIDGET_SUBTITLE`
    `static java.lang.String` | `WIDGET_TEXT`
    `static java.lang.String` | `WIDGET_TITLE`
    `static java.lang.String` | `WIDGET_URL`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `DuiWidget(java.lang.String type)` DuiWidget构造方法

  - ### Method Summary

    All Methods Instance Methods Concrete Methods
    Modifier and Type | Method and Description
    --- | ---
    `DuiWidget` | `addContent(java.lang.String contentName, java.lang.String contentValue)` 设置k,v对
    `DuiWidget` | `addExtra(java.lang.String key, java.lang.Object value)` 增加自定义参数的k,v对
    `DuiWidget` | `addExtra(java.lang.String key, java.lang.String value)` 增加自定义参数的k,v对
    `DuiWidget` | `addWidget(DuiWidget widget)` 增加widget
    `DuiWidget` | `setType(java.lang.String type)` 设置widget类型
    `java.lang.String` | `toString()` toString

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

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

- - ### Field Detail

    - #### TYPE_TEXT

          public static final java.lang.String TYPE_TEXT

      See Also:
        Constant Field Values

    - #### TYPE_CONTENT

          public static final java.lang.String TYPE_CONTENT

      See Also:
        Constant Field Values

    - #### TYPE_LIST

          public static final java.lang.String TYPE_LIST

      See Also:
        Constant Field Values

    - #### TYPE_MEDIA

          public static final java.lang.String TYPE_MEDIA

      See Also:
        Constant Field Values

    - #### TYPE_WEB

          public static final java.lang.String TYPE_WEB

      See Also:
        Constant Field Values

    - #### WIDGET_TEXT

          public static final java.lang.String WIDGET_TEXT

      See Also:
        Constant Field Values

    - #### WIDGET_TITLE

          public static final java.lang.String WIDGET_TITLE

      See Also:
        Constant Field Values

    - #### WIDGET_SUBTITLE

          public static final java.lang.String WIDGET_SUBTITLE

      See Also:
        Constant Field Values

    - #### WIDGET_LABEL

          public static final java.lang.String WIDGET_LABEL

      See Also:
        Constant Field Values

    - #### WIDGET_IMAGEURL

          public static final java.lang.String WIDGET_IMAGEURL

      See Also:
        Constant Field Values

    - #### WIDGET_LINKURL

          public static final java.lang.String WIDGET_LINKURL

      See Also:
        Constant Field Values

    - #### WIDGET_URL

          public static final java.lang.String WIDGET_URL

      See Also:
        Constant Field Values

    - #### WIDGET_EXTRA

          public static final java.lang.String WIDGET_EXTRA

      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### DuiWidget

          public DuiWidget(java.lang.String type)

      DuiWidget构造方法
      Parameters:
        `type` - widget类型

  - ### Method Detail

    - #### setType

          public DuiWidget setType(java.lang.String type)

      设置widget类型
      Parameters:
        `type` - widget类型
      Returns:
        DuiWidget DuiWidget实例

    - #### addContent

          public DuiWidget addContent(java.lang.String contentName,
                                      java.lang.String contentValue)

      设置k,v对
      Parameters:
        `contentName` - 键
        `contentValue` - 值
      Returns:
        DuiWidget DuiWidget实例

    - #### addWidget

          public DuiWidget addWidget(DuiWidget widget)

      增加widget
      Parameters:
        `widget` - DuiWidget实例
      Returns:
        DuiWidget DuiWidget实例

    - #### addExtra

          public DuiWidget addExtra(java.lang.String key,
                                    java.lang.String value)

      增加自定义参数的k,v对
      Parameters:
        `key` - 键
        `value` - 值
      Returns:
        DuiWidget DuiWidget实例

    - #### addExtra

          public DuiWidget addExtra(java.lang.String key,
                                    java.lang.Object value)

      增加自定义参数的k,v对
      Parameters:
        `key` - 键
        `value` - 值
      Returns:
        DuiWidget DuiWidget实例

    - #### toString

          public java.lang.String toString()

      toString
      Overrides:
        `toString` in class `java.lang.Object`
      Returns:
        String String