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

ceylon.language.byItem.ceylon Maven / Gradle / Ivy

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




© 2015 - 2024 Weber Informatics LLC | Privacy Policy