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

net.labymod.serverapi.discord.Party   A

Complexity

Total Complexity 3

Size/Duplication

Total Lines 24
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
wmc 3
eloc 19
dl 0
loc 24
rs 10
c 0
b 0
f 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A setPartySize(int) 0 4 1
A setPartyId(String) 0 4 1
A setPartyMax(int) 0 4 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
	@NonNull
13
	private String partyId;
14
	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...
15
	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...
16
	
17
	public void setPartyId(String partyId) {
18
		this.partyId = partyId;
19
		setChanged();
20
		notifyObservers();
21
	}
22
23
	public void setPartySize(int partySize) {
24
		this.partySize = partySize;
25
		setChanged();
26
		notifyObservers();
27
	}
28
29
	public void setPartyMax(int partyMax) {
30
		this.partyMax = partyMax;
31
		setChanged();
32
		notifyObservers();
33
	}
34
}
35