MapEx<D , S > extension
Methods
any (bool predicate (D key , S value ) )
→ bool
Returns true if there is at least one entry that matches the given predicate
.
predicate
must not be null.
filter (bool predicate (MapEntry <D , S > entry ) )
→ Map <D , S >
Returns a new map containing all key-value pairs matching the given predicate
.
The returned map preserves the entry iteration order of the original map.
getCount ([bool predicate (MapEntry <D , S > )? ])
→ int
Returns the number of entries matching the given predicate
or the number
of entries when predicate = null
.
isMapEmpty ()
→ Map <D , S >
Check is Map Empty or Null, Will default returns an empty Map .
maxBy <R extends Comparable > (R selector (MapEntry <D , S > ) )
→ MapEntry <D , S > ?
Returns the first entry yielding the largest value of the given
function or null
if there are no entries.
maxWith (Comparator <MapEntry <D , S > > comparator )
→ MapEntry <D , S > ?
Returns the first entry having the largest value according
to the provided comparator
or null
if there are no entries.
minBy <R extends Comparable > (R selector (MapEntry <D , S > ) )
→ MapEntry <D , S > ?
Returns the first entry yielding the smallest value
of the given function or null
if there are no entries.
minWith (Comparator <MapEntry <D , S > > comparator )
→ MapEntry <D , S > ?
Returns the first entry having the smallest value according to the provided
comparator
or null
if there are no entries.
predicate (bool predicate (D key , S value ) )
→ bool
Returns true
if there is no entries in the map that match the given predicate .
predicate must not be null.