Skip to content

Commit 350554e

Browse files
committed
typos
1 parent d9e2fc8 commit 350554e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/main/java/ood/design/PairSocks.java

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,12 @@ public List<List<Sock>> pairSocks(List<Sock> socks,List<Rule> rules){
1717
Map<String,Sock> map = buildMap(socks);
1818
Map<String,String> ruleMap = buildRuleMap(rules);
1919

20-
for(Sock s : socks){
21-
String pairsWith = ruleMap.get(s.getKey());
20+
for(Sock currentPair : socks){
21+
String pairsWith = ruleMap.get(currentPair.getKey());
2222
if(pairsWith!= null && map.containsKey(pairsWith)){
23-
result.add(List.of(s,map.get(pairsWith)));
23+
result.add(List.of(currentPair,map.get(pairsWith)));
2424
map.remove(pairsWith);
25-
map.remove(s.getKey());
25+
map.remove(currentPair.getKey());
2626
}
2727
}
2828
return result;

0 commit comments

Comments
 (0)