public boolean hasAnyFavorites ( IUserLayout layout ) { Validate . notNull ( layout , "Cannot determine whether a null layout contains favorites." ) ; // (premature) performance optimization: short circuit returns true if nonzero favorite // portlets return ( ! getFavoritePortletLayoutNodes ( layout ) . isEmpty ( ) || ! getFavoriteCollections ( layout ) . isEmpty ( ) ) ; }
True if the layout contains any favorited collections or favorited individual portlets false otherwise .