public void createBreadcrumbs ( List < Category > categories ) { categories . forEach ( category -> { category . setBreadcrumb ( getBreadcrumb ( ) + BREADCRUMB_DELIMITER + category . getDescription ( ) ) ; if ( ! Objects . equals ( category . getGroups ( ) , null ) ) { category . getGroups ( ) . forEach ( group -> group . addToBreadcrumb ( getBreadcrumb ( ) ) ) ; } if ( ! Objects . equals ( category . getChildren ( ) , null ) ) { category . createBreadcrumbs ( category . getChildren ( ) ) ; } } ) ; }
Creates and defines all of the breadcrumbs for all of the categories .