mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-15 06:58:41 +00:00
📍Use lombok, reformat, and optimize the code (#1560)
* Use lombok, reformat, and optimize the code * Fix merge conflicts and some sonar issues Co-authored-by: va1m <va1m@email.com>
This commit is contained in:
@@ -25,24 +25,20 @@ package com.iluwatar.databus.data;
|
||||
|
||||
import com.iluwatar.databus.AbstractDataType;
|
||||
import com.iluwatar.databus.DataType;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Getter;
|
||||
|
||||
/**
|
||||
* An event raised when a string message is sent.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@Getter
|
||||
@AllArgsConstructor
|
||||
public class MessageData extends AbstractDataType {
|
||||
|
||||
private final String message;
|
||||
|
||||
public MessageData(String message) {
|
||||
this.message = message;
|
||||
}
|
||||
|
||||
public String getMessage() {
|
||||
return message;
|
||||
}
|
||||
|
||||
public static DataType of(final String message) {
|
||||
return new MessageData(message);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user