Class SectionMapBuilder<M extends java.util.Map<K,V>,K,V>
- java.lang.Object
-
- cc.carm.lib.configuration.core.builder.AbstractConfigBuilder<T,B,ConfigurationProvider<?>>
-
- cc.carm.lib.configuration.core.builder.CommonConfigBuilder<M,SectionMapBuilder<M,K,V>>
-
- cc.carm.lib.configuration.core.builder.map.SectionMapBuilder<M,K,V>
-
public class SectionMapBuilder<M extends java.util.Map<K,V>,K,V> extends CommonConfigBuilder<M,SectionMapBuilder<M,K,V>>
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull java.lang.Class<K>
keyClass
protected @NotNull ConfigDataFunction<java.lang.String,K>
keyParser
protected @NotNull ConfigDataFunction<K,java.lang.String>
keySerializer
protected @NotNull java.util.function.Supplier<@NotNull M>
supplier
protected @NotNull java.lang.Class<V>
valueClass
protected @NotNull ConfigDataFunction<ConfigurationWrapper<?>,V>
valueParser
protected @NotNull ConfigDataFunction<V,? extends java.util.Map<java.lang.String,java.lang.Object>>
valueSerializer
-
Fields inherited from class cc.carm.lib.configuration.core.builder.AbstractConfigBuilder
defaultValue, headerComments, inlineComment, path, provider, providerClass
-
-
Constructor Summary
Constructors Constructor Description SectionMapBuilder(@NotNull java.util.function.Supplier<@NotNull M> supplier, @NotNull java.lang.Class<K> keyClass, @NotNull ConfigDataFunction<java.lang.String,K> keyParser, @NotNull java.lang.Class<V> valueClass, @NotNull ConfigDataFunction<ConfigurationWrapper<?>,V> valueParser, @NotNull ConfigDataFunction<K,java.lang.String> keySerializer, @NotNull ConfigDataFunction<V,? extends java.util.Map<java.lang.String,java.lang.Object>> valueSerializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ConfiguredSectionMap<K,V>
build()
@NotNull SectionMapBuilder<M,K,V>
defaults(@NotNull java.util.function.Consumer<M> factory)
protected @NotNull SectionMapBuilder<M,K,V>
getThis()
@NotNull SectionMapBuilder<M,K,V>
parseKey(@NotNull ConfigDataFunction<java.lang.String,K> parser)
@NotNull SectionMapBuilder<M,K,V>
parseValue(@NotNull ConfigDataFunction<ConfigurationWrapper<?>,V> parser)
@NotNull SectionMapBuilder<M,K,V>
serializeKey(@NotNull ConfigDataFunction<K,java.lang.String> serializer)
@NotNull SectionMapBuilder<M,K,V>
serializeValue(@NotNull ConfigDataFunction<V,? extends java.util.Map<java.lang.String,java.lang.Object>> serializer)
@NotNull SectionMapBuilder<M,K,V>
serializeValue(@NotNull java.util.function.BiConsumer<V,java.util.Map<java.lang.String,java.lang.Object>> serializer)
<MAP extends java.util.Map<K,V>>
SectionMapBuilder<MAP,K,V>supplier(@NotNull java.util.function.Supplier<MAP> supplier)
-
Methods inherited from class cc.carm.lib.configuration.core.builder.AbstractConfigBuilder
buildManifest, comments, defaults, defaults, from, headerComments, headerComments, inlineComment, path
-
-
-
-
Field Detail
-
supplier
@NotNull protected final @NotNull java.util.function.Supplier<@NotNull M extends java.util.Map<K,V>> supplier
-
keyClass
@NotNull protected final @NotNull java.lang.Class<K> keyClass
-
keyParser
@NotNull protected @NotNull ConfigDataFunction<java.lang.String,K> keyParser
-
valueClass
@NotNull protected final @NotNull java.lang.Class<V> valueClass
-
valueParser
@NotNull protected @NotNull ConfigDataFunction<ConfigurationWrapper<?>,V> valueParser
-
keySerializer
@NotNull protected @NotNull ConfigDataFunction<K,java.lang.String> keySerializer
-
valueSerializer
@NotNull protected @NotNull ConfigDataFunction<V,? extends java.util.Map<java.lang.String,java.lang.Object>> valueSerializer
-
-
Constructor Detail
-
SectionMapBuilder
public SectionMapBuilder(@NotNull @NotNull java.util.function.Supplier<@NotNull M> supplier, @NotNull @NotNull java.lang.Class<K> keyClass, @NotNull @NotNull ConfigDataFunction<java.lang.String,K> keyParser, @NotNull @NotNull java.lang.Class<V> valueClass, @NotNull @NotNull ConfigDataFunction<ConfigurationWrapper<?>,V> valueParser, @NotNull @NotNull ConfigDataFunction<K,java.lang.String> keySerializer, @NotNull @NotNull ConfigDataFunction<V,? extends java.util.Map<java.lang.String,java.lang.Object>> valueSerializer)
-
-
Method Detail
-
supplier
public <MAP extends java.util.Map<K,V>> SectionMapBuilder<MAP,K,V> supplier(@NotNull @NotNull java.util.function.Supplier<MAP> supplier)
-
defaults
@NotNull public @NotNull SectionMapBuilder<M,K,V> defaults(@NotNull @NotNull java.util.function.Consumer<M> factory)
-
parseKey
@NotNull public @NotNull SectionMapBuilder<M,K,V> parseKey(@NotNull @NotNull ConfigDataFunction<java.lang.String,K> parser)
-
parseValue
@NotNull public @NotNull SectionMapBuilder<M,K,V> parseValue(@NotNull @NotNull ConfigDataFunction<ConfigurationWrapper<?>,V> parser)
-
serializeKey
@NotNull public @NotNull SectionMapBuilder<M,K,V> serializeKey(@NotNull @NotNull ConfigDataFunction<K,java.lang.String> serializer)
-
serializeValue
@NotNull public @NotNull SectionMapBuilder<M,K,V> serializeValue(@NotNull @NotNull ConfigDataFunction<V,? extends java.util.Map<java.lang.String,java.lang.Object>> serializer)
-
serializeValue
@NotNull public @NotNull SectionMapBuilder<M,K,V> serializeValue(@NotNull @NotNull java.util.function.BiConsumer<V,java.util.Map<java.lang.String,java.lang.Object>> serializer)
-
getThis
@NotNull protected @NotNull SectionMapBuilder<M,K,V> getThis()
- Specified by:
getThis
in classAbstractConfigBuilder<M extends java.util.Map<K,V>,SectionMapBuilder<M extends java.util.Map<K,V>,K,V>,ConfigurationProvider<?>>
-
build
@NotNull public @NotNull ConfiguredSectionMap<K,V> build()
- Specified by:
build
in classAbstractConfigBuilder<M extends java.util.Map<K,V>,SectionMapBuilder<M extends java.util.Map<K,V>,K,V>,ConfigurationProvider<?>>
-
-