Details
-
Improvement
-
Status: Closed
-
Trivial
-
Resolution: Fixed
-
1.7.3
-
None
-
Patch
Description
This improvement adds the following methods to Set:
union - for completeness, a synonym for plus (to match intersect)
This improvement adds the following methods to Map:
Set domain() - a synonym for keySet
Set codomain() - returns a set of unique values
Set range() - a synonym for codomain
Map domainRestrict(Set s) - returns a map of those entries whose keys appear in set s
Map rangeRestrict(Set s) - returns a map of those entries whose values appear in set s
Set image(Set s) - returns a set of unique values of a map whose domain appears in set s. Note image is equivalent to map.domainRestrict(s).range()
Map invert(Map m) - returns a map with the key value relationship inverted.