2016-08-30 21:44:58 +03:00
|
|
|
/**
|
|
|
|
* Tae Won Ha - http://taewon.de - @hataewon
|
|
|
|
* See LICENSE
|
|
|
|
*/
|
|
|
|
|
|
|
|
import Foundation
|
|
|
|
import RxSwift
|
|
|
|
|
|
|
|
class ScoredFileItem: Comparable {
|
2016-09-08 21:16:37 +03:00
|
|
|
let score: Int
|
2016-09-04 00:13:52 +03:00
|
|
|
unowned let url: NSURL
|
2016-08-30 21:44:58 +03:00
|
|
|
|
2016-09-08 21:16:37 +03:00
|
|
|
init(score: Int, url: NSURL) {
|
2016-08-30 21:44:58 +03:00
|
|
|
self.score = score
|
|
|
|
self.url = url
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
func == (left: ScoredFileItem, right: ScoredFileItem) -> Bool {
|
|
|
|
return left.score == right.score
|
|
|
|
}
|
|
|
|
|
|
|
|
func <(left: ScoredFileItem, right: ScoredFileItem) -> Bool {
|
|
|
|
return left.score < right.score
|
|
|
|
}
|