summaryrefslogtreecommitdiff
path: root/src/main/kotlin/tech/thatgravyboat/rewardclaim/MappedImageCache.kt
blob: e3dc1b3832406cbce182c6511437b69513f7ee7c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package tech.thatgravyboat.rewardclaim

import gg.essential.elementa.components.image.ImageCache
import java.awt.image.BufferedImage
import java.net.URL

object MappedImageCache : ImageCache {

    private val IMAGES = hashMapOf<URL, BufferedImage>()

    override fun get(url: URL) = IMAGES[url]

    override fun set(url: URL, image: BufferedImage) {
        IMAGES[url] = image
    }
}