Package org.kingdoms.locale.compiler
Class MessageObject
java.lang.Object
org.kingdoms.locale.compiler.MessageObject
- All Implemented Interfaces:
MessageObjectBuilder
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionMessageObject(MessagePiece[] pieces, Boolean usePrefix, MessageCompilerSettings compilerSettings) -
Method Summary
Modifier and TypeMethodDescriptionvoidbuild(ComplexMessageBuilderContextProvider contextProvider) voidbuild(PlainMessageBuilderContextProvider contextProvider) intcount(Predicate<MessagePiece> filter) evaluatePlaceholdersOnly(MessageBuilder placeholderContextProvider) EvaluatesMessagePiece.Variableinto their own individual pieces after being translated.findColorPieces(int colorIndex, boolean backwards) booleanhasPiece(Predicate<MessagePiece> filter) merge(MessageObject other) splitBy(Predicate<MessagePiece> predicate) toString()validateAll(Predicate<MessagePiece> validator) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface org.kingdoms.locale.compiler.builders.MessageObjectBuilder
build, buildComplex, buildPlain
-
Field Details
-
NULL
-
pieces
-
-
Constructor Details
-
MessageObject
public MessageObject(MessagePiece[] pieces, Boolean usePrefix, MessageCompilerSettings compilerSettings)
-
-
Method Details
-
getCompilerSettings
-
validateAll
-
getPieces
-
splitBy
-
hasPiece
-
count
-
merge
-
findLastColors
-
findColorPieces
-
build
- Specified by:
buildin interfaceMessageObjectBuilder
-
build
- Specified by:
buildin interfaceMessageObjectBuilder
-
evaluatePlaceholdersOnly
Description copied from interface:MessageObjectBuilderEvaluatesMessagePiece.Variableinto their own individual pieces after being translated. This is useful for knowing the exact length and structure of the message which can be used to obtain the last colors in a message which itself is useful for multi-line situations such as color in items.- Specified by:
evaluatePlaceholdersOnlyin interfaceMessageObjectBuilder
-
getSimpleProvider
-
getExtraProvider
-
toString
-