Remove unused class
This commit is contained in:
parent
736da72ca7
commit
cdaae2f9fa
@ -81,30 +81,6 @@ open class MatteryContainer(var listener: ContainerListener, private val size: I
|
|||||||
var changeset = 0
|
var changeset = 0
|
||||||
private set
|
private set
|
||||||
|
|
||||||
inner class Cache<T>(private val supplier: (MatteryContainer) -> T) : Supplier<T> {
|
|
||||||
private var thisChangeset = -1
|
|
||||||
private var value: T? = null
|
|
||||||
private var isDisabled = false
|
|
||||||
|
|
||||||
fun disable() {
|
|
||||||
isDisabled = true
|
|
||||||
}
|
|
||||||
|
|
||||||
fun enable() {
|
|
||||||
isDisabled = false
|
|
||||||
}
|
|
||||||
|
|
||||||
override fun get(): T {
|
|
||||||
if (thisChangeset == changeset && !isDisabled) {
|
|
||||||
return value as T
|
|
||||||
}
|
|
||||||
|
|
||||||
value = supplier.invoke(this@MatteryContainer)
|
|
||||||
thisChangeset = changeset
|
|
||||||
return value as T
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fun clearSlotFilters() {
|
fun clearSlotFilters() {
|
||||||
Arrays.fill(filters, null)
|
Arrays.fill(filters, null)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user