Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- List<String> titles = Arrays.asList("First Name", "Last Name");
- for (FirstClass first : firstClassList) {
- for (SecondClass second : first.getSecondClassList()) {
- for (ThirdClass third : second.getThirdClassList()) {
- if(!titles.contains(third.getField())) {
- second.getThirdClassList().remove(third);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement