查询Java数据结构

mai*_*rgs 3 java sql collections java-ee data-structures

有没有办法在Java数据结构上执行SQL Like Queries或Filtering?

我想通过其中包含的对象的字段过滤ArrayList和HashMap中的对象.

小智 5

你可能会喜欢Quaere,这是一个相当丰富的java对象图查询语言:

Integer[] numbers={5, 4, 1, 3, 9, 8, 7, 2, 0};
Iterable<Integer> lowNumbers=
    from("n").in(numbers).
    where(lt("n",5).
    select("n");
Run Code Online (Sandbox Code Playgroud)