Class MapDataType.Builder<M extends Map<K,V>,K,V>
java.lang.Object
com.jeff_media.morepersistentdatatypes.datatypes.collections.MapDataType.Builder<M,K,V>
- Type Parameters:
M
- The map typeK
- The key typeV
- The value type
A builder for
MapDataType
s-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<M1 extends M>
MapDataType<M1,K, V> Builds theMapDataType
<K1 extends K>
MapDataType.Builder<?,K1, V> keyDataType
(PersistentDataType<?, K1> keyDataType) Sets thePersistentDataType
for the keys<V1 extends V>
MapDataType.Builder<?,K, V1> valueDataType
(PersistentDataType<?, V1> valueDataType) Sets thePersistentDataType
for the values
-
Constructor Details
-
Builder
public Builder()
-
-
Method Details
-
keyDataType
@Contract("_ -> this") public <K1 extends K> MapDataType.Builder<?,K1, keyDataTypeV> (@NotNull PersistentDataType<?, K1> keyDataType) Sets thePersistentDataType
for the keys- Type Parameters:
K1
- The key type- Parameters:
keyDataType
- ThePersistentDataType
for the keys- Returns:
- This builder
-
valueDataType
@Contract("_ -> this") public <V1 extends V> MapDataType.Builder<?,K, valueDataTypeV1> (@NotNull PersistentDataType<?, V1> valueDataType) Sets thePersistentDataType
for the values- Type Parameters:
V1
- The value type- Parameters:
valueDataType
- ThePersistentDataType
for the values- Returns:
- This builder
-
build
@Contract("_ -> new") public <M1 extends M> MapDataType<M1,K, buildV> (@NotNull Supplier<? extends M1> mapSupplier) Builds theMapDataType
- Type Parameters:
M1
- The map type- Parameters:
mapSupplier
- TheSupplier
for the map- Returns:
- The
MapDataType
-