Class SourceListBuilder<S,V>
- java.lang.Object
-
- cc.carm.lib.configuration.core.builder.AbstractConfigBuilder<T,B,ConfigurationProvider<?>>
-
- cc.carm.lib.configuration.core.builder.CommonConfigBuilder<java.util.List<V>,SourceListBuilder<S,V>>
-
- cc.carm.lib.configuration.core.builder.list.SourceListBuilder<S,V>
-
public class SourceListBuilder<S,V> extends CommonConfigBuilder<java.util.List<V>,SourceListBuilder<S,V>>
-
-
Field Summary
Fields Modifier and Type Field Description protected @NotNull java.lang.Class<? super S>
sourceClass
protected @NotNull ConfigDataFunction<java.lang.Object,S>
sourceParser
protected @NotNull ConfigDataFunction<S,java.lang.Object>
sourceSerializer
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 SourceListBuilder(@NotNull java.lang.Class<? super S> sourceClass, @NotNull ConfigDataFunction<java.lang.Object,S> sourceParser, @NotNull java.lang.Class<V> valueClass, @NotNull ConfigDataFunction<S,V> valueParser, @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 ConfiguredList<V>
build()
@NotNull SourceListBuilder<S,V>
defaults(@NotNull java.util.Collection<V> values)
@NotNull SourceListBuilder<S,V>
defaults(@NotNull V... values)
protected @NotNull SourceListBuilder<S,V>
getThis()
@NotNull SourceListBuilder<S,V>
parseSource(ConfigDataFunction<java.lang.Object,S> sourceParser)
@NotNull SourceListBuilder<S,V>
parseValue(ConfigDataFunction<S,V> valueParser)
@NotNull SourceListBuilder<S,V>
serializeSource(ConfigDataFunction<S,java.lang.Object> serializer)
@NotNull SourceListBuilder<S,V>
serializeValue(ConfigDataFunction<V,S> serializer)
-
Methods inherited from class cc.carm.lib.configuration.core.builder.AbstractConfigBuilder
buildManifest, comments, defaults, defaults, from, headerComments, headerComments, inlineComment, path
-
-
-
-
Field Detail
-
sourceClass
@NotNull protected final @NotNull java.lang.Class<? super 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
-
valueSerializer
@NotNull protected @NotNull ConfigDataFunction<V,S> valueSerializer
-
sourceSerializer
@NotNull protected @NotNull ConfigDataFunction<S,java.lang.Object> sourceSerializer
-
-
Constructor Detail
-
SourceListBuilder
public SourceListBuilder(@NotNull @NotNull java.lang.Class<? super 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<V,S> valueSerializer, @NotNull @NotNull ConfigDataFunction<S,java.lang.Object> sourceSerializer)
-
-
Method Detail
-
defaults
@SafeVarargs @NotNull public final @NotNull SourceListBuilder<S,V> defaults(@NotNull @NotNull V... values)
-
defaults
@NotNull public final @NotNull SourceListBuilder<S,V> defaults(@NotNull @NotNull java.util.Collection<V> values)
-
parseSource
@NotNull public @NotNull SourceListBuilder<S,V> parseSource(ConfigDataFunction<java.lang.Object,S> sourceParser)
-
parseValue
@NotNull public @NotNull SourceListBuilder<S,V> parseValue(ConfigDataFunction<S,V> valueParser)
-
serializeValue
@NotNull public @NotNull SourceListBuilder<S,V> serializeValue(ConfigDataFunction<V,S> serializer)
-
serializeSource
@NotNull public @NotNull SourceListBuilder<S,V> serializeSource(ConfigDataFunction<S,java.lang.Object> serializer)
-
getThis
@NotNull protected @NotNull SourceListBuilder<S,V> getThis()
- Specified by:
getThis
in classAbstractConfigBuilder<java.util.List<V>,SourceListBuilder<S,V>,ConfigurationProvider<?>>
-
build
@NotNull public @NotNull ConfiguredList<V> build()
- Specified by:
build
in classAbstractConfigBuilder<java.util.List<V>,SourceListBuilder<S,V>,ConfigurationProvider<?>>
-
-