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

net.labymod.serverapi.discord.Party   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 28
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 22
dl 0
loc 28
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setPartySize(int) 0 5 1
A setPartyId(String) 0 5 1
A setPartyMax(int) 0 5 1
1
package net.labymod.serverapi.discord;
2
3
import java.util.Observable;
4
5
import lombok.Builder;
6
import lombok.Getter;
7
import lombok.NonNull;
8
9
@Builder
10
@Getter
11
public class Party extends Observable
12
{
13
	@NonNull
14
	private String partyId;
15
	private int partySize;
0 ignored issues
show
Comprehensibility Code Smell introduced by
Remove the "partySize" field and declare it as a local variable in the relevant methods.
Loading history...
16
	private int partyMax;
0 ignored issues
show
Comprehensibility Code Smell introduced by
Remove the "partyMax" field and declare it as a local variable in the relevant methods.
Loading history...
17
	
18
	public void setPartyId(String partyId)
19
	{
20
		this.partyId = partyId;
21
		setChanged();
22
		notifyObservers();
23
	}
24
25
	public void setPartySize(int partySize)
26
	{
27
		this.partySize = partySize;
28
		setChanged();
29
		notifyObservers();
30
	}
31
32
	public void setPartyMax(int partyMax)
33
	{
34
		this.partyMax = partyMax;
35
		setChanged();
36
		notifyObservers();
37
	}
38
}
39