All Downloads are FREE. Search and download functionalities are using the official Maven repository.

ceylon.language.byKey.ceylon Maven / Gradle / Ivy

There is a newer version: 1.3.3
Show newest version
"A comparator for [[Entry]]s which compares their keys 
 according to the given [[comparing]] function.
 
     value sortedEntries = map.sort(byKey(byIncreasing(String.lowercased)));
 
 This function is intended for use with [[Iterable.sort]]
 and [[Iterable.max]]."
see (`function byItem`)
tagged("Comparisons")
shared Comparison byKey(Comparison comparing(Key x, Key y))
            (Key->Object x, Key->Object y) 
        given Key satisfies Object =>
                comparing(x.key, y.key);




© 2015 - 2024 Weber Informatics LLC | Privacy Policy