I came a cross a problem I didn;t manage to solve...
I have 3 types of objects
- MyObject1 - with fields id and name
- MyObject2 - with fields id and error
- MyJoinObject - with fields id, name and error
I have 2 lists:
- List of MyObject1
- List of MyObject2
I want to create a third list of MyJoinObject, which is a join of the 2 lists. There will be MyJoinObject objects as MyObject1 objects, but they will also contain the error if exists (joined by id). I want to do that with Java 8 streams.