-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathCategory.java
More file actions
48 lines (37 loc) · 848 Bytes
/
Category.java
File metadata and controls
48 lines (37 loc) · 848 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
44
45
46
47
48
import java.util.ArrayList;
public class Category {
private String name;
private String comment;
private ArrayList<Question> questions;
private boolean hasLink;
public Category (String s1, String s2) {
name = s1;
comment = s2;
questions = new ArrayList<Question>();
hasLink = false;
}
public String getComment() {
return comment;
}
public boolean hasComment() {
return comment != "";
}
public void addQuestion(Question q) {
questions.add(q);
}
public String getName() {
return name;
}
public ArrayList<Question> getQuestions() {
return questions;
}
public void cleanUp() {
name = name.replace("&", "and");
name = name.replace("<i>", "");
name = name.replace("</i>", "");
name = name.replace(""", "\"");
if (name.contains("href")) {
hasLink = true;
}
}
}