Class KeyValueSource<K>
java.lang.Object
io.github.projectunified.valuevenue.common.KeyValueSource<K>
- Type Parameters:
K- type of the key
A
ValueSource whose values are maps, exposed as the <key>_<name> variables.-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionKeyValueSource(String key, Collection<? extends Map<String, Object>> values) Creates the stream.KeyValueSource(Collection<? extends Map<String, Object>> values) Creates the stream withDEFAULT_KEY. -
Method Summary
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.github.projectunified.valuevenue.core.ValueSource
apply, getSourceValueStream, isSourceValueActivated
-
Field Details
-
DEFAULT_KEY
The key used when none is given.- See Also:
-
-
Constructor Details
-
KeyValueSource
Creates the stream withDEFAULT_KEY.- Parameters:
values- the maps to expose
-
KeyValueSource
Creates the stream.- Parameters:
key- prefix of the variables, without the trailing underscorevalues- the maps to expose
-
-
Method Details
-
replace
Description copied from interface:ValueSourceResolves a variable of the source value. -
getSourceValueStream
Description copied from interface:ValueSourceAll source values that do not depend on a key.Empty by default: a source that only knows its values through
ValueSource.getSourceValueStream(Object)needs no override.- Specified by:
getSourceValueStreamin interfaceValueSource<K,Map<String, Object>> - Returns:
- stream of every key-independent source value
-