模块 data.core

接口 Array

  • 所有超级接口:
    DataSet
    所有已知实现类:
    ListArray

    public interface Array
    extends DataSet
    列表结构的只读数据集
    从以下版本开始:
    2.0.0 Array 接口 类似于 JsonArray 但为什么不取名为 json 呢,因它不止是 json,它还可以是 xml、yml、protobuf 等任何一种格式的数据
    • 方法详细资料

      • getMapper

        Mapper getMapper​(int index)
        参数:
        index - 元素下标
        返回:
        子 JsonObj
      • getArray

        Array getArray​(int index)
        参数:
        index - 元素下标
        返回:
        子 JsonArr
      • getBool

        boolean getBool​(int index)
        参数:
        index - 元素下标
        返回:
        boolean 值
      • getInt

        int getInt​(int index)
        参数:
        index - 元素下标
        返回:
        int 值
      • getLong

        long getLong​(int index)
        参数:
        index - 元素下标
        返回:
        long 值
      • getFloat

        float getFloat​(int index)
        参数:
        index - 元素下标
        返回:
        float 值
      • getDouble

        double getDouble​(int index)
        参数:
        index - 元素下标
        返回:
        double 值
      • getString

        String getString​(int index)
        参数:
        index - 元素下标
        返回:
        String 值
      • forEach

        default void forEach​(BiConsumer<Integer,​DataSet.Data> consumer)
        遍历 Array
        参数:
        consumer - 消费者
        从以下版本开始:
        2.5.1
      • toList

        default <T> List<T> toList​(Class<T> type)
        类型参数:
        T - 目标泛型
        参数:
        type - 目标类型
        返回:
        转 JavaBean 列表
        从以下版本开始:
        v1.2.0