public static Map < Status , Long > getStatusMapWithNonZeroValues ( final Map < Status , Long > statusTotalCountMap ) { return statusTotalCountMap . entrySet ( ) . stream ( ) . filter ( p -> p . getValue ( ) > 0 ) . collect ( Collectors . toMap ( p -> p . getKey ( ) , p -> p . getValue ( ) ) ) ; }
Returns the map with status having non zero values .