@ -3,29 +3,7 @@ package org.openrs2.cache
import io.netty.buffer.ByteBuf
import io.netty.buffer.ByteBuf
public inline class Js5MasterIndex ( public val entries : MutableList < Entry > = mutableListOf ( ) ) {
public inline class Js5MasterIndex ( public val entries : MutableList < Entry > = mutableListOf ( ) ) {
public class Entry ( public var version : Int , public var checksum : Int ) {
public data class Entry ( public var version : Int , public var checksum : Int )
override fun equals ( other : Any ? ) : Boolean {
if ( this === other ) return true
if ( javaClass != other ?. javaClass ) return false
other as Entry
if ( version != other . version ) return false
if ( checksum != other . checksum ) return false
return true
}
override fun hashCode ( ) : Int {
var result = version
result = 31 * result + checksum
return result
}
override fun toString ( ) : String {
return " Entry{version= $version , checksum= $checksum } "
}
}
public fun write ( buf : ByteBuf ) {
public fun write ( buf : ByteBuf ) {
for ( entry in entries ) {
for ( entry in entries ) {