I am working with classes with multi level depth. I am trying to filter in the inner depth but i am receiving the error
Bad return type in lambda expression: Stream<InnerClassName> cannot be converted to boolean
The structure of my Classes is
class A {
List<B> B;
Integer Id;
}
class B {
List<C> C;
Integer Id;
}
class C {
Integer Id;
}
If I have List called AList
I have tried doing
AList.getBlist().stream().filter(bList -> bList.getId.equals(5));
Which works fine. What i am trying to accomplish is filter with values inside Class C which could be obtained by Blist.getClist
List<A>orList<C>?