mirror of
https://github.com/CarmJos/EasyConfiguration.git
synced 2026-06-04 10:38:19 +08:00
chore: Fixed the param errors.
This commit is contained in:
+3
-3
@@ -22,7 +22,7 @@ import java.util.function.Consumer;
|
|||||||
*/
|
*/
|
||||||
public class ConfiguredText<MSG, RECEIVER> extends ConfiguredValue<TextContents> {
|
public class ConfiguredText<MSG, RECEIVER> extends ConfiguredValue<TextContents> {
|
||||||
|
|
||||||
public static <M, R> Builder<M, R, ?> builder() {
|
public static <M, R> Builder<M, R, ?> create() {
|
||||||
return new StardardBuilder<>();
|
return new StardardBuilder<>();
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -38,7 +38,7 @@ public class ConfiguredText<MSG, RECEIVER> extends ConfiguredValue<TextContents>
|
|||||||
|
|
||||||
protected final @NotNull String[] params; // The parameters of the message.
|
protected final @NotNull String[] params; // The parameters of the message.
|
||||||
|
|
||||||
public ConfiguredText(@NotNull ValueManifest<TextContents> manifest,
|
public ConfiguredText(@NotNull ValueManifest<TextContents, TextContents> manifest,
|
||||||
@NotNull BiFunction<RECEIVER, String, String> parser,
|
@NotNull BiFunction<RECEIVER, String, String> parser,
|
||||||
@NotNull BiFunction<RECEIVER, String, MSG> compiler,
|
@NotNull BiFunction<RECEIVER, String, MSG> compiler,
|
||||||
@NotNull BiConsumer<RECEIVER, List<MSG>> dispatcher,
|
@NotNull BiConsumer<RECEIVER, List<MSG>> dispatcher,
|
||||||
@@ -121,7 +121,7 @@ public class ConfiguredText<MSG, RECEIVER> extends ConfiguredValue<TextContents>
|
|||||||
}
|
}
|
||||||
|
|
||||||
public abstract static class Builder<MSG, RECEIVER, SELF extends Builder<MSG, RECEIVER, SELF>>
|
public abstract static class Builder<MSG, RECEIVER, SELF extends Builder<MSG, RECEIVER, SELF>>
|
||||||
extends AbstractConfigBuilder<TextContents, ConfiguredText<MSG, RECEIVER>, ConfigurationHolder<?>, SELF> {
|
extends AbstractConfigBuilder<TextContents, TextContents, ConfiguredText<MSG, RECEIVER>, ConfigurationHolder<?>, SELF> {
|
||||||
protected @NotNull TextContents.Builder defaultBuilder = TextContents.builder();
|
protected @NotNull TextContents.Builder defaultBuilder = TextContents.builder();
|
||||||
protected @NotNull String[] params = new String[0];
|
protected @NotNull String[] params = new String[0];
|
||||||
|
|
||||||
|
|||||||
+2
-1
@@ -17,7 +17,8 @@ public class ConfiguredMsg extends ConfiguredText<String, PrintStream> {
|
|||||||
return builder().defaults(text).build();
|
return builder().defaults(text).build();
|
||||||
}
|
}
|
||||||
|
|
||||||
public ConfiguredMsg(@NotNull ValueManifest<TextContents> manifest, @NotNull String[] params) {
|
public ConfiguredMsg(@NotNull ValueManifest<TextContents, TextContents> manifest,
|
||||||
|
@NotNull String[] params) {
|
||||||
super(
|
super(
|
||||||
manifest,
|
manifest,
|
||||||
(p, s) -> s,
|
(p, s) -> s,
|
||||||
|
|||||||
@@ -75,10 +75,10 @@ public class SQLSource extends ConfigureSource<SourcedSection, Map<String, Objec
|
|||||||
List<Object[]> dataValues = new ArrayList<>();
|
List<Object[]> dataValues = new ArrayList<>();
|
||||||
|
|
||||||
SourcedSection section = section();
|
SourcedSection section = section();
|
||||||
Map<String, ConfigValue<?>> values = holder().registeredValues();
|
Map<String, ConfigValue<?, ?>> values = holder().registeredValues();
|
||||||
for (Map.Entry<String, ConfigValue<?>> entry : values.entrySet()) {
|
for (Map.Entry<String, ConfigValue<?, ?>> entry : values.entrySet()) {
|
||||||
@NotNull String path = entry.getKey();
|
@NotNull String path = entry.getKey();
|
||||||
@NotNull ConfigValue<?> config = entry.getValue();
|
@NotNull ConfigValue<?, ?> config = entry.getValue();
|
||||||
@Nullable Object value = section.get(path);
|
@Nullable Object value = section.get(path);
|
||||||
|
|
||||||
if (value instanceof SourcedSection) {
|
if (value instanceof SourcedSection) {
|
||||||
|
|||||||
Reference in New Issue
Block a user