Skip to main content
aboutsummaryrefslogtreecommitdiffstats
blob: c38358251d93a50e72faf2953dd83fbac8c9d8ad (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
package room.basic.service.logging;




public class LogData {
	
	
	//--------------------- attributes
	protected int logLevel = 0;
	protected String userString = "";
	
	//--------------------- attribute setters and getters
	public void setLogLevel (int logLevel) {
		 this.logLevel = logLevel;
	}
	public int getLogLevel () {
		return this.logLevel;
	}
	public void setUserString (String userString) {
		 this.userString = userString;
	}
	public String getUserString () {
		return this.userString;
	}
	
	//--------------------- operations
	
	// default constructor
	public LogData() {
		super();
		// initialize attributes
		logLevel = 0;
		userString = "";
	}
	
	// constructor using fields
	public LogData(int logLevel, String userString) {
		super();
		this.logLevel = logLevel;
		this.userString = userString;
	}
	
	// deep copy
	public LogData deepCopy() {
		LogData copy = new LogData();
		copy.logLevel = logLevel;
		copy.userString = userString;
		return copy;
	}
};

Back to the top