程序包 org.jsfr.json

类 Collector


  • public class Collector
    extends Object
    • 方法详细资料

      • collectOne

        public <T> ValueBox<T> collectOne​(JsonPath jsonPath,
                                          Class<T> tClass)
        Collect single value into box
        类型参数:
        T - target class
        参数:
        jsonPath - JsonPath
        返回:
        value box
      • collectOne

        public <T> ValueBox<T> collectOne​(String jsonPath,
                                          Class<T> tClass)
        Collect single value into box
        类型参数:
        T - target class
        参数:
        jsonPath - JsonPath
        返回:
        value box
      • collectOne

        public ValueBox<Object> collectOne​(String jsonPath)
        Collect single value into box
        参数:
        jsonPath - JsonPath
        返回:
        value box
      • collectAll

        public <T> ValueBox<Collection<T>> collectAll​(JsonPath jsonPath,
                                                      Class<T> tClass)
        Collect multiple value into box
        类型参数:
        T - target class
        参数:
        jsonPath - JsonPath
        返回:
        value box
      • collectAll

        public <T> ValueBox<Collection<T>> collectAll​(String jsonPath,
                                                      Class<T> tClass)
        Collect multiple value into box
        类型参数:
        T - target class
        参数:
        jsonPath - JsonPath
        返回:
        value box
      • collectAll

        public ValueBox<Collection<Object>> collectAll​(String jsonPath)
        Collect multiple value into box
        参数:
        jsonPath - JsonPath
        返回:
        value box
      • exec

        public void exec()
        Collector can only be executed once