Question: I don't know how to describe the goal I want to achieve with a good title. I have a list of objects where each have a boolean member. I want to filter this list to get at the end the first objects from the list which all have this boolean member set to true.

This is how I would do it without streams, add every object to a new list for which the getter method returns true and stop when the first element returns false.

```
int i = 0;
while(i < list.size()){
    if(!list.get(i).isMemberTrue()){
        break;
    }
    else{
        newList.add(list.get(i));
    }
    i++;
}

```

Is this somehow possible with a sequential stream?

Answer: 
you can use this code to get list

```
list.subList(0,list.indexOf(list.stream()
                    .filter(member->!member::isMemberTrue)
                    .findFirst()
                    .orElse(list.size()))

```

or you can use it as

```
int endIndex=list.indexOf(list.stream()
                    .filter(member->!member::isMemberTrue)
                    .findFirst()
                    .orElse(list.size());

```

then 

```
list.sublist(0,endIndex);

```

In this I am getting new list by making use of List::sublist(..)`and then I am using`lambda` to fetch all members before the condition goes false.

After being reviewed by [Flown](https://stackoverflow.com/users/4105457/flown), I updated the answer 
Hope this helps! :)
You can achieve the solution with streams. Just remember the predecessor in the list.

```
public class ListTest
{

    @Test
    public void test()
    {

        List<Foo> list = new ArrayList<>();
        list.add(new Foo(true));
        list.add(new Foo(true));
        list.add(new Foo(true));
        list.add(new Foo(false));
        list.add(new Foo(false));
        list.add(new Foo(true));
        list.add(new Foo(true));

        List<Foo> firstSequence = list.stream().filter(new Predicate<Foo>() {

            private boolean inFirstSequence = true;

            @Override
            public boolean test(Foo foo)
            {
                // turns into false, if first false value is found
                inFirstSequence = inFirstSequence && foo.b;

                return inFirstSequence;                
            }
        }).collect(Collectors.toList());

        Assert.assertEquals(3, firstSequence.size());
    }

    private class Foo
    {
        public Foo(boolean b)
        {
            super();
            this.b = b;
        }

        boolean b = true;
    }
}

```