-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathSkillPOJO.java
More file actions
32 lines (26 loc) · 750 Bytes
/
Copy pathSkillPOJO.java
File metadata and controls
32 lines (26 loc) · 750 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
/*
* Authors: Jerry Li & Victor Jiang
* Date: June 13, 2025
* Description: This class helps stores a skill name and levels
*/
import java.util.*;
public class SkillPOJO {
// Skill name
public String name;
// Different skill levels list
public List<SkillLevel> levels;
// Constructor
public SkillPOJO(String name, List<SkillLevel> levels) {
this.name = name;
// Create a defensive copy so callers cannot modify the underlying list
this.levels = Collections.unmodifiableList(new ArrayList<>(levels));
}
// Returns skill name
public String getName() {
return name;
}
// Returns list of skill levels
public List<SkillLevel> getLevels() {
return levels;
}
}