Skip to content

Commit 6002f73

Browse files
committed
use Collections.swap()
1 parent 4603965 commit 6002f73

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

mug/src/test/java/com/google/mu/util/stream/PermutationTest.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
package com.google.mu.util.stream;
22

33
import static com.google.common.truth.Truth8.assertThat;
4-
import static java.util.Collections.swap;
54

65
import java.util.ArrayList;
76
import java.util.Collection;
7+
import java.util.Collections;
88
import java.util.List;
99
import java.util.Set;
1010
import java.util.stream.IntStream;
@@ -51,9 +51,9 @@ void next(List<T> buffer, int i) {
5151
forEachLazily(
5252
IntStream.range(i + 1, buffer.size()),
5353
j -> {
54-
swap(buffer, i, j);
54+
Collections.swap(buffer, i, j);
5555
next(buffer, i + 1);
56-
lazily(() -> swap(buffer, i, j));
56+
lazily(() -> Collections.swap(buffer, i, j));
5757
});
5858
}
5959
}

0 commit comments

Comments
 (0)