package net.moltendorf.Bukkit.IntelliDoors

import java.util.*

class CanonicalSet<T> {
  private val map = HashMap<T, T>()

  operator fun get(key: T): T {
    val cached = map[key]

    return if (cached == null) {
      map[key] = key
      key
    } else {
      cached
    }
  }
}

Add canonical set for storage of door states
Add canonical set for storage of door states

moltendorf/IntelliDoors