public abstract class ListResourceBundle extends ResourceBundle
Base class for programmatic resources, including non-String objects. Contents are evaluated once, validated and indexed in a hash map. Each row contains exactly a String key and a non-null Object value. Duplicate keys keep the last row. Subclasses must not subsequently mutate their values if the bundle is shared between threads.
import klyn.collections
import klyn.i18n
class Labels extends ListResourceBundle:
protected override readonly property contents as Object[][]:
get:
entry = Object[2]
entry[0] = "save"
entry[1] = "Save"
return f:[entry]
assert Labels().getString("save") == "Save"