Class SimpleMessage<S,T>

java.lang.Object
ch.raffael.meldioc.model.messages.SimpleMessage<S,T>
All Implemented Interfaces:
Message<S,T>

public abstract class SimpleMessage<S,T> extends Object implements Message<S,T>
A standard implementation of Message.
  • 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

      public static <S, T> SimpleMessage<S,T> of(Message.Id id, SrcElement<S,T> element, String message)
    • id

      @Parameter public abstract io.vavr.control.Option<Message.Id> id()
      Specified by:
      id in interface Message<S,T>
    • element

      @Parameter public abstract SrcElement<S,T> element()
      Specified by:
      element in interface Message<S,T>
    • message

      @Parameter public abstract String message()
      Specified by:
      message in interface Message<S,T>
    • conflicts

      @Parameter public abstract io.vavr.collection.Seq<SrcElement<S,T>> conflicts()
      Specified by:
      conflicts in interface Message<S,T>
    • languageError

      @Default public boolean languageError()
      Specified by:
      languageError in interface Message<S,T>
    • withLanguageError

      public abstract SimpleMessage<S,T> withLanguageError(boolean value)
    • withOrigins

      SimpleMessage<S,T> withOrigins(io.vavr.collection.Seq<Message<S,T>> value)
      Copy the current immutable object by setting a value for the origins attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for origins
      Returns:
      A modified copy of the this object
    • withId

      SimpleMessage<S,T> withId(io.vavr.control.Option<Message.Id> value)
      Copy the current immutable object by setting a value for the id attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for id
      Returns:
      A modified copy of the this object
    • withElement

      SimpleMessage<S,T> withElement(SrcElement<S,T> value)
      Copy the current immutable object by setting a value for the element attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for element
      Returns:
      A modified copy of the this object
    • withMessage

      SimpleMessage<S,T> withMessage(String value)
      Copy the current immutable object by setting a value for the message attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for message
      Returns:
      A modified copy of the this object
    • withConflicts

      SimpleMessage<S,T> withConflicts(io.vavr.collection.Seq<SrcElement<S,T>> value)
      Copy the current immutable object by setting a value for the conflicts attribute. A shallow reference equality check is used to prevent copying of the same value by returning this.
      Parameters:
      value - A new value for conflicts
      Returns:
      A modified copy of the this object