public List < Action > getRootActions ( ) { final List < Action > rootActions = srcUpdTrees . stream ( ) . map ( t -> originalActionsSrc . get ( t ) ) . collect ( Collectors . toList ( ) ) ; rootActions . addAll ( srcDelTrees . stream ( ) // . filter ( t -> ! srcDelTrees . contains ( t . getParent ( ) ) && ! srcUpdTrees . contains ( t . getParent ( ) ) ) // . map ( t -> originalActionsSrc . get ( t ) ) // . collect ( Collectors . toList ( ) ) ) ; rootActions . addAll ( dstAddTrees . stream ( ) // . filter ( t -> ! dstAddTrees . contains ( t . getParent ( ) ) && ! dstUpdTrees . contains ( t . getParent ( ) ) ) // . map ( t -> originalActionsDst . get ( t ) ) // . collect ( Collectors . toList ( ) ) ) ; rootActions . addAll ( dstMvTrees . stream ( ) // . filter ( t -> ! dstMvTrees . contains ( t . getParent ( ) ) ) // . map ( t -> originalActionsDst . get ( t ) ) // . collect ( Collectors . toList ( ) ) ) ; rootActions . removeAll ( Collections . singleton ( null ) ) ; return rootActions ; }
This method retrieves ONLY the ROOT actions