Package dev.jorel.commandapi.arguments
Class MapArgumentBuilder<K,V>
java.lang.Object
dev.jorel.commandapi.arguments.MapArgumentBuilder<K,V>
- Type Parameters:
K- The type of keys this map should containV- The type of values this map should contain
A builder to create a
MapArgument-
Nested Class Summary
Nested Classes -
Constructor Summary
ConstructorsConstructorDescriptionMapArgumentBuilder(String nodeName) Creates a new MapArgumentBuilder with a specified node name.MapArgumentBuilder(String nodeName, char delimiter) Creates a new MapArgumentBuilder with a specified node nameMapArgumentBuilder(String nodeName, char delimiter, String separator) Creates a new MapArgumentBuilder with a specified node name -
Method Summary
Modifier and TypeMethodDescriptionwithKeyMapper(StringParser<K> keyMapper) This starts the builder for theMapArgument
-
Constructor Details
-
MapArgumentBuilder
Creates a new MapArgumentBuilder with a specified node name. Defaults the delimiter for each key/value pair to a colon- Parameters:
nodeName- the name of the node for this argument
-
MapArgumentBuilder
Creates a new MapArgumentBuilder with a specified node name- Parameters:
nodeName- the name of the node for this argumentdelimiter- the separator for each key/value pair
-
MapArgumentBuilder
Creates a new MapArgumentBuilder with a specified node name- Parameters:
nodeName- the name of the node for this argumentdelimiter- the separator for each key/value pairseparator- the separator between a key and a value
-
-
Method Details
-
withKeyMapper
public MapArgumentBuilder<K,V>.MapArgumentBuilderValueMapper withKeyMapper(StringParser<K> keyMapper) This starts the builder for theMapArgument- Returns:
- this map argument builder
-