blob: b4af3610bb9fbbaad3c2c9042b12564806a5a2e1 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
|
class Entry(time: Long) {
def getTime: Long = time
}
object Test {
def extractTime(e: Entry) = e.getTime
implicit val orderEntries = new Ordering[Entry] {
def compare(first: Entry, second: Entry) = extractTime(first) compare extractTime(second)
}
}
|