blob: b6594fb6c7dc78547b674236e0c6da0ddf479758 (
plain) (
tree)
|
|
class Entry(time: Long) {
def getTime: Long = time
}
object Test {
def extractTime(e: Entry) = e.getTime
implicit val orderEntries: Ordering[Entry] = new Ordering[Entry] {
def compare(first: Entry, second: Entry) = extractTime(first) compare extractTime(second)
}
}
|