Class TextParser<RECEIVER,SELF extends TextParser<RECEIVER,SELF>>
- java.lang.Object
-
- cc.carm.lib.configuration.value.text.function.ContentHandler<RECEIVER,SELF>
-
- cc.carm.lib.configuration.value.text.function.TextParser<RECEIVER,SELF>
-
- All Implemented Interfaces:
Insertable<RECEIVER,SELF>,Replaceable<RECEIVER,SELF>
- Direct Known Subclasses:
TextCompiler
public abstract class TextParser<RECEIVER,SELF extends TextParser<RECEIVER,SELF>> extends ContentHandler<RECEIVER,SELF>
-
-
Field Summary
-
Fields inherited from class cc.carm.lib.configuration.value.text.function.ContentHandler
disableInsertion, inserters, insertion, lineSeparator, paramReplacer, params, parser, replacers
-
-
Constructor Summary
Constructors Constructor Description TextParser()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidhandle(RECEIVER receiver, @NotNull java.util.function.Consumer<java.lang.String> lineConsumer)java.util.List<java.lang.String>parse(RECEIVER receiver)Parse the texts for the receiver.<V> java.util.List<V>parse(RECEIVER receiver, @NotNull java.util.function.BiFunction<RECEIVER,java.lang.String,V> compiler)Parse the texts for the receiver.@Nullable java.lang.StringparseLine(RECEIVER receiver)Parse the texts as a single line for the receiver.<V> VparseLine(RECEIVER receiver, @NotNull java.util.function.BiFunction<RECEIVER,java.lang.String,V> compiler)Parse the texts as a single line for the receiver.abstract TextContentstexts()-
Methods inherited from class cc.carm.lib.configuration.value.text.function.ContentHandler
buildParams, disableInsertion, enableInsertion, getInsertion, handle, insert, inserter, inserters, inserting, lineSeparator, noneInsertion, paramReplacer, params, parse, parser, placeholder, placeholders, placeholders, placeholders, removeInsert, replacer, replacers, self, setPlaceholders
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface cc.carm.lib.configuration.value.text.function.inserter.Insertable
insert, insert, insert
-
Methods inherited from interface cc.carm.lib.configuration.value.text.function.replacer.Replaceable
applyReplacements, replace, replace, replace, replace, replace, replace, replace, replacer
-
-
-
-
Method Detail
-
texts
public abstract TextContents texts()
-
parse
public java.util.List<java.lang.String> parse(@Nullable RECEIVER receiver)Parse the texts for the receiver.- Parameters:
receiver- the receiver- Returns:
- the parsed line
-
parse
public <V> java.util.List<V> parse(@Nullable RECEIVER receiver, @NotNull @NotNull java.util.function.BiFunction<RECEIVER,java.lang.String,V> compiler)Parse the texts for the receiver.- Type Parameters:
V- the type of the message- Parameters:
receiver- the receivercompiler- the compiler- Returns:
- the parsed line
-
parseLine
@Nullable public @Nullable java.lang.String parseLine(@Nullable RECEIVER receiver)Parse the texts as a single line for the receiver.- Parameters:
receiver- the receiver- Returns:
- the parsed line
-
parseLine
@Nullable public <V> V parseLine(@Nullable RECEIVER receiver, @NotNull @NotNull java.util.function.BiFunction<RECEIVER,java.lang.String,V> compiler)Parse the texts as a single line for the receiver.- Type Parameters:
V- the type of the message- Parameters:
receiver- the receiver- Returns:
- the parsed line
-
handle
public void handle(@Nullable RECEIVER receiver, @NotNull @NotNull java.util.function.Consumer<java.lang.String> lineConsumer)
-
-