summaryrefslogtreecommitdiff
path: root/src/main/kotlin/tech/thatgravyboat/rewardclaim/MappedImageCache.kt
blob: e47c6498ca6013ab96eb42a8b1da862e73f7bab4 (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
    }
}