Skip to content

Commit

Permalink
actually do this
Browse files Browse the repository at this point in the history
  • Loading branch information
NeumimTo committed Aug 20, 2019
1 parent 6f1a50b commit 9846d3f
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -313,4 +313,8 @@ public String toString() {
", type=" + type +
'}';
}

public void setExperienceSources(Set<String> expU) {
this.experienceSourceSet = expU;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,7 @@
import java.nio.file.Path;
import java.nio.file.Paths;
import java.util.*;
import java.util.stream.Collectors;

import static cz.neumimto.rpg.api.logging.Log.error;
import static cz.neumimto.rpg.api.logging.Log.info;
Expand Down Expand Up @@ -69,14 +70,8 @@ public Set<ClassDefinition> parseClassFiles() throws ObjectMappingException {
if (result.getLevelProgression() != null) {
result.getLevelProgression().setLevelMargins(result.getLevelProgression().initCurve());
}
Iterator<String> iterator = result.getExperienceSource().iterator();

while (iterator.hasNext()) {
String next = iterator.next();
result.getExperienceSource().add(next.toUpperCase());
iterator.remove();
}

Set<String> expU = result.getExperienceSource().stream().map(String::toUpperCase).collect(Collectors.toSet());
result.setExperienceSources(expU);

set.add(result);
} catch (Exception e) {
Expand Down

0 comments on commit 9846d3f

Please sign in to comment.