I have several methods that have the following pattern:

```java
int status = method0();
if(status = success){
  status = method1();
}
if(status = success){
  status = method2();
}
if(status = success){
  status = method3();
}
if(status = success){
  status = method4();
}
return status

```

And I would like to make this more readable. I imagine something like this:

```java
final CommandPipe pipe = new CommandPipe();
status = pipe.next(() -> method0(arg0))
              .next(() -> method1(arg1))
              .next(() -> method2(arg2))
              .next(() -> method3(arg3))
              .next(() -> method4(arg4))
              .getResult();
return status; 

```

Is there an object doing this in Java 8 ?