public boolean hasMenuEntry ( AdminComponent component , MenuEntry activeMenue ) { if ( null != component && null != component . getMainMenu ( ) ) { Optional < MenuEntry > result = component . getMainMenu ( ) . flattened ( ) . filter ( menu -> checkForNull ( menu , activeMenue ) ? menu . getName ( ) . equals ( activeMenue . getName ( ) ) : false ) . findFirst ( ) ; return result . isPresent ( ) ; } return false ; }
checks if the activeMenue is part of given component