我想使用 lambdaJ 从列表中选择特定值,
List<someFriends> newFriends = select(firendsCollection,having(on(someFriends.class).getDescription(), Matchers.containsString(("michael"))));
我希望它选择像给定字符串一样的值,在这个例子中它工作正常,但只有当单词是“michael”时它才不会识别“Michael”,有没有办法用 LambdaJ 做到这一点?
最佳答案
您可以尝试如下;
List<someFriends> newFriends = select(firendsCollection,having(on(someFriends.class).getDescription(), Matchers.containsString(("michael")).and(Matchers.containsString(("Michael")))));
关于java - 选择大写或小写的字符串,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/16808805/