I have two nested List type as here:

```
    List<Team> team;

    public class Team{
        private String teamId;
        private List<TeamUsers> teamUsers;
        --getter setter...
    }

    public class TeamUsers{
        private int TeamUsersId;
        private int active;
        --getter setter...

    }

```

I want to return all List, and inside each Team object, if the TeamUsers object active = 0, then don't return this TeamUsers object in the nested List.
Here is my code:

```
List<Team> alldata = (List<Team>) teamRepo.findAll();
List<Team> finalResult = alldata.stream()
                .filter(a -> a.getTeam_users().stream().allMatch(b -> b.getActive() == 1)).collect(Collectors.toList());

```

It's only return me the first team which all TeamUsers.active = 1.

In the second Team I do have some TeamUsers.active = 1 and some TeamUsers.active = 0.

What mistake I made?