IADConfig.java
769 Bytes
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
package com.controller;
import java.util.Random;
public class IADConfig {
private boolean open;
private int type;
public IADConfig(boolean isOpen,int type){
this.open = isOpen;
if(type >2){
type = new Random().nextInt(3);
}
this.type = type;
}
public IADConfig(){
}
public boolean isOpen() {
return open;
}
public void setOpen(boolean open) {
this.open = open;
}
public int getType() {
return type;
}
public void setType(int type) {
if(type >2){
type = new Random().nextInt(2);
}
this.type = type;
}
@Override
public String toString() {
return "open="+open+" type="+type;
}
}