Passed
Pull Request — master (#7)
by
unknown
02:39
created

setGameMode(String)   A

Complexity

Conditions 1

Size

Total Lines 5
Code Lines 5

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
eloc 5
dl 0
loc 5
rs 10
c 0
b 0
f 0
cc 1
1
package net.labymod.serverapi.discord;
2
3
import java.time.Instant;
4
import java.util.Observable;
5
6
import lombok.Builder;
7
import lombok.Getter;
8
import lombok.NonNull;
9
10
@Builder
11
@Getter
12
public class Game extends Observable
13
{
14
	@NonNull
15
	private String gameMode;
16
	private Instant startTime;
0 ignored issues
show
Comprehensibility Code Smell introduced by
Remove the "startTime" field and declare it as a local variable in the relevant methods.
Loading history...
17
	private Instant endTime;
0 ignored issues
show
Comprehensibility Code Smell introduced by
Remove the "endTime" field and declare it as a local variable in the relevant methods.
Loading history...
18
	
19
	public void setGameMode(String gameMode)
20
	{
21
		this.gameMode = gameMode;
22
		setChanged();
23
		notifyObservers();
24
	}
25
	public void setStartTime(Instant startTime)
26
	{
27
		this.startTime = startTime;
28
		setChanged();
29
		notifyObservers();
30
	}
31
	public void setEndTime(Instant endTime)
32
	{
33
		this.endTime = endTime;
34
		setChanged();
35
		notifyObservers();
36
	}
37
}
38