File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
src/test/kotlin/com/igorwojda/cache/advancedlru Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -11,11 +11,11 @@ private object Solution1 {
1111
1212 fun put (key : String , value : Int , priority : Int , expiryTime : Long ) {
1313 if (map.containsKey(key)) {
14- this . remove(key)
14+ remove(key)
1515 }
1616
1717 if (map.size == capacity) {
18- this . clearCache()
18+ clearCache()
1919 }
2020
2121 val item = CacheItem (key, value, priority, expiryTime)
@@ -69,9 +69,9 @@ private object Solution1 {
6969
7070 override fun compareTo (other : CacheItem ): Int {
7171 return when {
72- this . expiryTime != other.expiryTime -> this . expiryTime.compareTo(other.expiryTime)
73- this . priority != other.priority -> this . priority.compareTo(other.priority)
74- else -> this . lastUsed.compareTo(other.lastUsed)
72+ expiryTime != other.expiryTime -> expiryTime.compareTo(other.expiryTime)
73+ priority != other.priority -> priority.compareTo(other.priority)
74+ else -> lastUsed.compareTo(other.lastUsed)
7575 }
7676 }
7777 }
You can’t perform that action at this time.
0 commit comments