Java - JxPath - Spring
I have List<MyClass> myClassList
filled with MyClass
objects. I am trying to find a cleanest and fastest way to get Set<String> a
property out of myClassList
.
class MyClass{
private String a;
private String b;
// setters getters
}
I am using jxpath for searching but I am not sure it can also do what I mentioned above.
JXPathContext ctx = JXPathContext.newContext(myClassList);
Iterate<String> aProps = ctx.iterate("? what to write");
Can you help?