@@ -0,0 +1,1099 @@
+package stexfires.core.message;%0A%0Aimport stexfires.core.Record;%0Aimport stexfires.core.filter.RecordFilter;%0A%0Aimport java.util.Objects;%0A%0A/**%0A * @author Mathias Kalb%0A * @since 0.1%0A */%0Apublic class ConditionalMessage%3CT extends Record%3E implements RecordMessage%3CT%3E %7B%0A%0A    protected final RecordFilter%3C? super T%3E condition;%0A    protected final RecordMessage%3C? super Record%3E trueMessage;%0A    protected final RecordMessage%3C? super Record%3E falseMessage;%0A%0A    public ConditionalMessage(RecordFilter%3C? super T%3E condition,%0A                              RecordMessage%3C? super Record%3E trueMessage,%0A                              RecordMessage%3C? super Record%3E falseMessage) %7B%0A        Objects.requireNonNull(condition);%0A        Objects.requireNonNull(trueMessage);%0A        Objects.requireNonNull(falseMessage);%0A        this.condition = condition;%0A        this.trueMessage = trueMessage;%0A        this.falseMessage = falseMessage;%0A    %7D%0A%0A    @Override%0A    public String createMessage(T record) %7B%0A        return condition.isValid(record) ? trueMessage.createMessage(record) : falseMessage.createMessage(record);%0A    %7D%0A%0A%7D%0A

Add ConditionalMessage