public abstract class ConfigMessageList<M,T extends AbstractText<R>,R> extends cc.carm.lib.configuration.core.value.type.ConfiguredList<T> implements BaseMessage<R,java.util.List<M>>
限定符和类型 | 字段和说明 |
---|---|
protected @NotNull java.util.function.BiFunction<R,java.lang.String,M> |
messageParser |
protected @NotNull java.lang.String[] |
params |
protected @NotNull java.util.function.BiConsumer<R,java.util.List<M>> |
sendFunction |
protected @NotNull java.util.function.Function<java.lang.String,T> |
textBuilder |
构造器和说明 |
---|
ConfigMessageList(@NotNull cc.carm.lib.configuration.core.value.ValueManifest<java.util.List<T>> manifest,
@NotNull java.lang.Class<T> textClazz,
@NotNull java.lang.String[] params,
@NotNull java.util.function.BiFunction<R,java.lang.String,M> messageParser,
@NotNull java.util.function.BiConsumer<R,java.util.List<M>> sendFunction,
@NotNull java.util.function.Function<java.lang.String,T> textBuilder) |
限定符和类型 | 方法和说明 |
---|---|
void |
apply(R receiver,
@NotNull java.util.List<M> message)
向接收者发送消息的根方法。
|
protected java.util.List<T> |
buildText(java.util.List<java.lang.String> values) |
java.lang.String[] |
getParams()
得到消息中的通过
MessageValueBuilder.params(String...) 已定变量名(按定义顺序) |
@Nullable java.util.List<M> |
parse(R receiver,
@NotNull java.util.Map<java.lang.String,java.lang.Object> placeholders)
为某位接收者解析消息
|
M |
parseToLine(R receiver,
@NotNull java.util.Map<java.lang.String,java.lang.Object> placeholders) |
M |
parseToLine(R receiver,
java.lang.Object... values) |
M |
parseToLine(R receiver,
@NotNull java.lang.String delimiter,
@NotNull java.util.Map<java.lang.String,java.lang.Object> placeholders) |
void |
setMessages(@Nullable java.util.List<java.lang.String> values) |
void |
setMessages(java.lang.String... values) |
add, add, addAll, addAll, builderOf, clear, contains, containsAll, copy, get, get, handle, indexOf, isEmpty, iterator, lastIndexOf, listIterator, listIterator, modify, of, of, remove, remove, removeAll, retainAll, set, set, size, subList, toArray, toArray
getCachedOrDefault, getCachedOrDefault, getCachedValue, getDefaultFirst, isExpired, updateCache
builder, getNotNull, getOptional, getOrDefault, initialize, isDefault, setDefault, setDefault
getConfigPath, getConfiguration, getDefaultValue, getHeaderComments, getInlineComment, getProvider, getValue, initialize, of, of, setDefaultValue, setValue
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
broadcast, broadcast, getAllReceivers, parse, prepare, send, send, sendToAll, sendToAll, sendToEach, sendToEach
@NotNull protected final @NotNull java.lang.String[] params
@NotNull protected final @NotNull java.util.function.BiFunction<R,java.lang.String,M> messageParser
@NotNull protected final @NotNull java.util.function.BiConsumer<R,java.util.List<M>> sendFunction
@NotNull protected final @NotNull java.util.function.Function<java.lang.String,T extends AbstractText<R>> textBuilder
public ConfigMessageList(@NotNull @NotNull cc.carm.lib.configuration.core.value.ValueManifest<java.util.List<T>> manifest, @NotNull @NotNull java.lang.Class<T> textClazz, @NotNull @NotNull java.lang.String[] params, @NotNull @NotNull java.util.function.BiFunction<R,java.lang.String,M> messageParser, @NotNull @NotNull java.util.function.BiConsumer<R,java.util.List<M>> sendFunction, @NotNull @NotNull java.util.function.Function<java.lang.String,T> textBuilder)
public java.lang.String[] getParams()
BaseMessage
MessageValueBuilder.params(String...)
已定变量名(按定义顺序)getParams
在接口中 BaseMessage<R,java.util.List<M>>
public void apply(@NotNull R receiver, @NotNull @NotNull java.util.List<M> message)
BaseMessage
apply
在接口中 BaseMessage<R,java.util.List<M>>
receiver
- 接收者message
- 消息内容@Nullable public @Nullable java.util.List<M> parse(@Nullable R receiver, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> placeholders)
parse
在接口中 BaseMessage<R,java.util.List<M>>
receiver
- 消息的接收者placeholders
- 消息中的变量与对应参数@Nullable public M parseToLine(@Nullable R receiver, @NotNull java.lang.Object... values)
@Nullable public M parseToLine(@Nullable R receiver, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> placeholders)
@Nullable public M parseToLine(@Nullable R receiver, @NotNull @NotNull java.lang.String delimiter, @NotNull @NotNull java.util.Map<java.lang.String,java.lang.Object> placeholders)
public void setMessages(@NotNull java.lang.String... values)
public void setMessages(@Nullable @Nullable java.util.List<java.lang.String> values)
protected java.util.List<T> buildText(java.util.List<java.lang.String> values)
Copyright © 2024. All rights reserved.