Skip to content

Commit

Permalink
fix: 로직 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
Soundbar91 committed Nov 27, 2024
1 parent 2bb9bc0 commit a794707
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,14 @@ public static List<ClassInfo> of(String classTime, String classPlace) {
for (String str : split) {
int num = Integer.parseInt(str);
if (!currentTimes.isEmpty() && currentTimes.get(currentTimes.size() - 1) + 1 != num) {
classInfos.add(new ClassInfo(new ArrayList<>(currentTimes), ""));
classInfos.add(new ClassInfo(new ArrayList<>(currentTimes), null));
currentTimes.clear();
}
else {
currentTimes.add(num);
}
currentTimes.add(num);
}

if (!currentTimes.isEmpty()) {
classInfos.add(new ClassInfo(new ArrayList<>(currentTimes), ""));
classInfos.add(new ClassInfo(new ArrayList<>(currentTimes), null));
}

return classInfos;
Expand Down

0 comments on commit a794707

Please sign in to comment.