Skip to content

Commit b67b7f0

Browse files
author
bytekeeper
committed
#13 - Set<> -> List<>
1 parent 9c24f4f commit b67b7f0

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

src/main/java/bwapi/UnitType.java

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -304,12 +304,12 @@ public TechType cloakingTech() {
304304
}
305305
}
306306

307-
public Set<TechType> abilities() {
308-
return Arrays.stream(UnitTypeContainer.unitTechs[id]).collect(Collectors.toSet());
307+
public List<TechType> abilities() {
308+
return Arrays.asList(UnitTypeContainer.unitTechs[id]);
309309
}
310310

311-
public Set<UpgradeType> upgrades() {
312-
return Arrays.stream(UnitTypeContainer.upgrades[id]).collect(Collectors.toSet());
311+
public List<UpgradeType> upgrades() {
312+
return Arrays.asList(UnitTypeContainer.upgrades[id]);
313313
}
314314

315315
public UpgradeType armorUpgrade() {
@@ -643,16 +643,16 @@ public boolean canBuildAddon() {
643643
this == Terran_Science_Facility;
644644
}
645645

646-
public Set<UnitType> buildsWhat() {
647-
return Arrays.stream(UnitTypeContainer.buildsWhat[id]).collect(Collectors.toSet());
646+
public List<UnitType> buildsWhat() {
647+
return Arrays.asList(UnitTypeContainer.buildsWhat[id]);
648648
}
649649

650-
public Set<TechType> researchesWhat() {
651-
return Arrays.stream(UnitTypeContainer.researchesWhat[id]).collect(Collectors.toSet());
650+
public List<TechType> researchesWhat() {
651+
return Arrays.asList(UnitTypeContainer.researchesWhat[id]);
652652
}
653653

654-
public Set<UpgradeType> upgradesWhat() {
655-
return Arrays.stream(UnitTypeContainer.upgradesWhat[id]).collect(Collectors.toSet());
654+
public List<UpgradeType> upgradesWhat() {
655+
return Arrays.asList(UnitTypeContainer.upgradesWhat[id]);
656656
}
657657

658658
public boolean isSuccessorOf(final UnitType type) {

0 commit comments

Comments
 (0)