1
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:
2025-03-17 01:39:08 +08:00
parent 82cca5eca2
commit dbec551c84
3 changed files with 8 additions and 7 deletions
@@ -22,7 +22,7 @@ import java.util.function.Consumer;
*/
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<>();
}
@@ -38,7 +38,7 @@ public class ConfiguredText<MSG, RECEIVER> extends ConfiguredValue<TextContents>
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, MSG> compiler,
@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>>
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 String[] params = new String[0];
@@ -17,7 +17,8 @@ public class ConfiguredMsg extends ConfiguredText<String, PrintStream> {
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(
manifest,
(p, s) -> s,
@@ -75,10 +75,10 @@ public class SQLSource extends ConfigureSource<SourcedSection, Map<String, Objec
List<Object[]> dataValues = new ArrayList<>();
SourcedSection section = section();
Map<String, ConfigValue<?>> values = holder().registeredValues();
for (Map.Entry<String, ConfigValue<?>> entry : values.entrySet()) {
Map<String, ConfigValue<?, ?>> values = holder().registeredValues();
for (Map.Entry<String, ConfigValue<?, ?>> entry : values.entrySet()) {
@NotNull String path = entry.getKey();
@NotNull ConfigValue<?> config = entry.getValue();
@NotNull ConfigValue<?, ?> config = entry.getValue();
@Nullable Object value = section.get(path);
if (value instanceof SourcedSection) {