Class SourceMapBuilder<M extends java.util.Map<K,V>,S,K,V>
- java.lang.Object
-
- cc.carm.lib.configuration.core.builder.AbstractConfigBuilder<T,B,ConfigurationProvider<?>>
-
- cc.carm.lib.configuration.core.builder.CommonConfigBuilder<M,SourceMapBuilder<M,S,K,V>>
-
- cc.carm.lib.configuration.core.builder.map.SourceMapBuilder<M,S,K,V>
-
public class SourceMapBuilder<M extends java.util.Map<K,V>,S,K,V> extends CommonConfigBuilder<M,SourceMapBuilder<M,S,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.lang.Class<S>
sourceClass
protected @NotNull ConfigDataFunction<java.lang.Object,S>
sourceParser
protected @NotNull ConfigDataFunction<S,java.lang.Object>
sourceSerializer
protected @NotNull java.util.function.Supplier<@NotNull M>
supplier
protected @NotNull java.lang.Class<V>
valueClass
protected @NotNull ConfigDataFunction<S,V>
valueParser
protected @NotNull ConfigDataFunction<V,S>
valueSerializer
-
Fields inherited from class cc.carm.lib.configuration.core.builder.AbstractConfigBuilder
defaultValue, headerComments, inlineComment, path, provider, providerClass
-
-
Constructor Summary
Constructors Constructor Description SourceMapBuilder(@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<S> sourceClass, @NotNull ConfigDataFunction<java.lang.Object,S> sourceParser, @NotNull java.lang.Class<V> valueClass, @NotNull ConfigDataFunction<S,V> valueParser, @NotNull ConfigDataFunction<K,java.lang.String> keySerializer, @NotNull ConfigDataFunction<V,S> valueSerializer, @NotNull ConfigDataFunction<S,java.lang.Object> sourceSerializer)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description @NotNull ConfiguredMap<K,V>
build()
@NotNull SourceMapBuilder<M,S,K,V>
defaults(@NotNull java.util.function.Consumer<M> factory)
protected @NotNull SourceMapBuilder<M,S,K,V>
getThis()
@NotNull SourceMapBuilder<M,S,K,V>
parseKey(@NotNull ConfigDataFunction<java.lang.String,K> parser)
@NotNull SourceMapBuilder<M,S,K,V>
parseSource(@NotNull ConfigDataFunction<java.lang.Object,S> parser)
@NotNull SourceMapBuilder<M,S,K,V>
parseValue(@NotNull ConfigDataFunction<S,V> parser)
@NotNull SourceMapBuilder<M,S,K,V>
serializeKey(@NotNull ConfigDataFunction<K,java.lang.String> serializer)
@NotNull SourceMapBuilder<M,S,K,V>
serializeSource(@NotNull ConfigDataFunction<S,java.lang.Object> serializer)
@NotNull SourceMapBuilder<M,S,K,V>
serializeValue(@NotNull ConfigDataFunction<V,S> serializer)
<MAP extends java.util.Map<K,V>>
SourceMapBuilder<MAP,S,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
-
sourceClass
@NotNull protected final @NotNull java.lang.Class<S> sourceClass
-
sourceParser
@NotNull protected @NotNull ConfigDataFunction<java.lang.Object,S> sourceParser
-
valueClass
@NotNull protected final @NotNull java.lang.Class<V> valueClass
-
valueParser
@NotNull protected @NotNull ConfigDataFunction<S,V> valueParser
-
keySerializer
@NotNull protected @NotNull ConfigDataFunction<K,java.lang.String> keySerializer
-
valueSerializer
@NotNull protected @NotNull ConfigDataFunction<V,S> valueSerializer
-
sourceSerializer
@NotNull protected @NotNull ConfigDataFunction<S,java.lang.Object> sourceSerializer
-
-
Constructor Detail
-
SourceMapBuilder
public SourceMapBuilder(@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<S> sourceClass, @NotNull @NotNull ConfigDataFunction<java.lang.Object,S> sourceParser, @NotNull @NotNull java.lang.Class<V> valueClass, @NotNull @NotNull ConfigDataFunction<S,V> valueParser, @NotNull @NotNull ConfigDataFunction<K,java.lang.String> keySerializer, @NotNull @NotNull ConfigDataFunction<V,S> valueSerializer, @NotNull @NotNull ConfigDataFunction<S,java.lang.Object> sourceSerializer)
-
-
Method Detail
-
supplier
public <MAP extends java.util.Map<K,V>> SourceMapBuilder<MAP,S,K,V> supplier(@NotNull @NotNull java.util.function.Supplier<MAP> supplier)
-
defaults
@NotNull public @NotNull SourceMapBuilder<M,S,K,V> defaults(@NotNull @NotNull java.util.function.Consumer<M> factory)
-
parseKey
@NotNull public @NotNull SourceMapBuilder<M,S,K,V> parseKey(@NotNull @NotNull ConfigDataFunction<java.lang.String,K> parser)
-
parseSource
@NotNull public @NotNull SourceMapBuilder<M,S,K,V> parseSource(@NotNull @NotNull ConfigDataFunction<java.lang.Object,S> parser)
-
parseValue
@NotNull public @NotNull SourceMapBuilder<M,S,K,V> parseValue(@NotNull @NotNull ConfigDataFunction<S,V> parser)
-
serializeKey
@NotNull public @NotNull SourceMapBuilder<M,S,K,V> serializeKey(@NotNull @NotNull ConfigDataFunction<K,java.lang.String> serializer)
-
serializeValue
@NotNull public @NotNull SourceMapBuilder<M,S,K,V> serializeValue(@NotNull @NotNull ConfigDataFunction<V,S> serializer)
-
serializeSource
@NotNull public @NotNull SourceMapBuilder<M,S,K,V> serializeSource(@NotNull @NotNull ConfigDataFunction<S,java.lang.Object> serializer)
-
getThis
@NotNull protected @NotNull SourceMapBuilder<M,S,K,V> getThis()
- Specified by:
getThis
in classAbstractConfigBuilder<M extends java.util.Map<K,V>,SourceMapBuilder<M extends java.util.Map<K,V>,S,K,V>,ConfigurationProvider<?>>
-
build
@NotNull public @NotNull ConfiguredMap<K,V> build()
- Specified by:
build
in classAbstractConfigBuilder<M extends java.util.Map<K,V>,SourceMapBuilder<M extends java.util.Map<K,V>,S,K,V>,ConfigurationProvider<?>>
-
-