Class SimpleMessage<S,T>
java.lang.Object
ch.raffael.meldioc.model.messages.SimpleMessage<S,T>
- All Implemented Interfaces:
Message<S,T>
A standard implementation of
Message.-
Nested Class Summary
Nested classes/interfaces inherited from interface ch.raffael.meldioc.model.messages.Message
Message.Id, Message.Suppression -
Field Summary
Fields inherited from interface ch.raffael.meldioc.model.messages.Message
RENDER_ATTRIBUTE_EXTRACTORS, RENDER_SUBSTITUTION_RE -
Method Summary
Modifier and TypeMethodDescriptionabstract io.vavr.collection.Seq<SrcElement<S,T>> abstract SrcElement<S,T> element()abstract io.vavr.control.Option<Message.Id>id()booleanabstract Stringmessage()static <S,T> SimpleMessage<S, T> of(Message.Id id, SrcElement<S, T> element, String message) static <S,T> SimpleMessage<S, T> of(Message.Id id, SrcElement<S, T> element, String message, SrcElement<S, T>... conflicts) static <S,T> SimpleMessage<S, T> of(Message.Id id, SrcElement<S, T> element, String message, io.vavr.collection.Seq<SrcElement<S, T>> conflicts) withConflicts(io.vavr.collection.Seq<SrcElement<S, T>> value) Copy the current immutable object by setting a value for theconflictsattribute.withElement(SrcElement<S, T> value) Copy the current immutable object by setting a value for theelementattribute.withId(io.vavr.control.Option<Message.Id> value) Copy the current immutable object by setting a value for theidattribute.abstract SimpleMessage<S,T> withLanguageError(boolean value) withMessage(String value) Copy the current immutable object by setting a value for themessageattribute.withOrigins(io.vavr.collection.Seq<Message<S, T>> value) Copy the current immutable object by setting a value for theoriginsattribute.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ch.raffael.meldioc.model.messages.Message
isId, origins, renderMessage
-
Method Details
-
of
@SafeVarargs public static <S,T> SimpleMessage<S,T> of(Message.Id id, SrcElement<S, T> element, String message, SrcElement<S, T>... conflicts) -
of
public static <S,T> SimpleMessage<S,T> of(Message.Id id, SrcElement<S, T> element, String message, io.vavr.collection.Seq<SrcElement<S, T>> conflicts) -
of
-
id
-
element
-
message
-
conflicts
-
languageError
@Default public boolean languageError()- Specified by:
languageErrorin interfaceMessage<S,T>
-
withLanguageError
-
withOrigins
Copy the current immutable object by setting a value for theoriginsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for origins- Returns:
- A modified copy of the
thisobject
-
withId
Copy the current immutable object by setting a value for theidattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for id- Returns:
- A modified copy of the
thisobject
-
withElement
Copy the current immutable object by setting a value for theelementattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for element- Returns:
- A modified copy of the
thisobject
-
withMessage
Copy the current immutable object by setting a value for themessageattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for message- Returns:
- A modified copy of the
thisobject
-
withConflicts
Copy the current immutable object by setting a value for theconflictsattribute. A shallow reference equality check is used to prevent copying of the same value by returningthis.- Parameters:
value- A new value for conflicts- Returns:
- A modified copy of the
thisobject
-