Package com.xpdustry.distributor.api.key
Interface MutableKeyContainer
- All Superinterfaces:
KeyContainer
A mutable version of
KeyContainer.-
Method Summary
Modifier and TypeMethodDescriptionstatic MutableKeyContainercreate()Creates an empty mutable container.<V> @Nullable VRemoves the value associated with the givenkey.<V> @Nullable VSets thevalueassociated with the givenkey.static MutableKeyContainersettings()Returns a mutable container view ofCore.settings.Methods inherited from interface com.xpdustry.distributor.api.key.KeyContainer
contains, get, getKeys, getOptional, getRequired
-
Method Details
-
create
Creates an empty mutable container. -
settings
Returns a mutable container view ofCore.settings.Warning: This container currently only supports primitive types and mindustry collections.
-
set
Sets thevalueassociated with the givenkey.- Type Parameters:
V- the type of the value- Parameters:
key- the keyvalue- the value- Returns:
- the previous value associated with the key, or
nullif there was none
-
remove
Removes the value associated with the givenkey.- Type Parameters:
V- the type of the value- Parameters:
key- the key- Returns:
- the previous value associated with the key, or
nullif there was none
-