mirror of
https://github.com/tiennm99/java-design-patterns.git
synced 2026-05-14 20:58:35 +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:
@@ -26,24 +26,20 @@ package com.iluwatar.databus.data;
|
||||
import com.iluwatar.databus.AbstractDataType;
|
||||
import com.iluwatar.databus.DataType;
|
||||
import java.time.LocalDateTime;
|
||||
import lombok.Getter;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
|
||||
/**
|
||||
* An event raised when applications stops, containing the stop time of the application.
|
||||
*
|
||||
* @author Paul Campbell (pcampbell@kemitix.net)
|
||||
*/
|
||||
@RequiredArgsConstructor
|
||||
@Getter
|
||||
public class StoppingData extends AbstractDataType {
|
||||
|
||||
private final LocalDateTime when;
|
||||
|
||||
public StoppingData(LocalDateTime when) {
|
||||
this.when = when;
|
||||
}
|
||||
|
||||
public LocalDateTime getWhen() {
|
||||
return when;
|
||||
}
|
||||
|
||||
public static DataType of(final LocalDateTime when) {
|
||||
return new StoppingData(when);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user