Skip to content

Commit 10220ae

Browse files
committed
Class rename
Signed-off-by: Bertrand Moreau <[email protected]>
1 parent d5bbb4e commit 10220ae

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

src/main/java/org/springframework/data/util/PageCollector.java src/main/java/org/springframework/data/util/PageCollectors.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
import org.springframework.data.domain.PageImpl;
2121
import org.springframework.data.domain.Pageable;
2222

23-
public final class PageCollector<T> {
23+
public final class PageCollectors<T> {
2424

2525
private static final Set<Characteristics> characteristics = Collections.emptySet();
2626

src/test/java/org/springframework/data/util/PageCollectorsToFilteredPageTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ void init() {
3232
@Test
3333
void fullPage() {
3434
final Pageable pageable = Pageable.ofSize(size);
35-
final Page<Integer> page = ints.stream().collect(PageCollector.toFilteredPage(pageable, i -> i > 0));
35+
final Page<Integer> page = ints.stream().collect(PageCollectors.toFilteredPage(pageable, i -> i > 0));
3636

3737
assertEquals(size, page.getSize());
3838
assertTrue(page.getContent().size() <= size);
@@ -45,7 +45,7 @@ void fullPage() {
4545
void emptyPage() {
4646
final Pageable pageable = Pageable.ofSize(size);
4747
final Page<Integer> page = Collections.<Integer>emptyList().stream()
48-
.collect(PageCollector.toFilteredPage(pageable, i -> i > 0));
48+
.collect(PageCollectors.toFilteredPage(pageable, i -> i > 0));
4949

5050
assertEquals(size, page.getSize());
5151
assertTrue(page.getContent().isEmpty());
@@ -54,7 +54,7 @@ void emptyPage() {
5454
@Test
5555
void secondPage() {
5656
final Pageable pageable = Pageable.ofSize(size / 4).withPage(2);
57-
final Page<Integer> page = ints.stream().collect(PageCollector.toFilteredPage(pageable, i -> i < 0));
57+
final Page<Integer> page = ints.stream().collect(PageCollectors.toFilteredPage(pageable, i -> i < 0));
5858

5959
assertEquals(size / 4, page.getSize());
6060
assertTrue(page.getContent().size() <= size);
@@ -70,7 +70,7 @@ void checkData() {
7070

7171
final int size = datas.size();
7272
final Pageable pageable = Pageable.ofSize(size / 2).withPage(0);
73-
final Page<String> page = datas.stream().collect(PageCollector.toFilteredPage(pageable, t -> t.contains("i")));
73+
final Page<String> page = datas.stream().collect(PageCollectors.toFilteredPage(pageable, t -> t.contains("i")));
7474

7575
assertEquals(size / 2, page.getSize());
7676
assertEquals(size / 2, page.getContent().size());

src/test/java/org/springframework/data/util/PageCollectorsToFilteredSortedPageTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ void init() {
3333
void fullPage() {
3434
final Pageable pageable = Pageable.ofSize(size);
3535
final Page<Integer> page = ints.stream()
36-
.collect(PageCollector.toFilteredSortedPage(pageable, i -> i > 0, Integer::compare));
36+
.collect(PageCollectors.toFilteredSortedPage(pageable, i -> i > 0, Integer::compare));
3737

3838
assertEquals(size, page.getSize());
3939
assertTrue(page.getContent().size() <= size);
@@ -52,7 +52,7 @@ void fullPage() {
5252
void emptyPage() {
5353
final Pageable pageable = Pageable.ofSize(size);
5454
final Page<Integer> page = Collections.<Integer>emptyList().stream()
55-
.collect(PageCollector.toFilteredSortedPage(pageable, i -> i > 0, Integer::compare));
55+
.collect(PageCollectors.toFilteredSortedPage(pageable, i -> i > 0, Integer::compare));
5656

5757
assertEquals(size, page.getSize());
5858
assertTrue(page.getContent().isEmpty());
@@ -62,7 +62,7 @@ void emptyPage() {
6262
void secondPage() {
6363
final Pageable pageable = Pageable.ofSize(size / 4).withPage(2);
6464
final Page<Integer> page = ints.stream()
65-
.collect(PageCollector.toFilteredSortedPage(pageable, i -> i < 0, Integer::compare));
65+
.collect(PageCollectors.toFilteredSortedPage(pageable, i -> i < 0, Integer::compare));
6666

6767
assertEquals(size / 4, page.getSize());
6868
assertTrue(page.getContent().size() <= size);
@@ -85,7 +85,7 @@ void checkData() {
8585
final int size = datas.size();
8686
final Pageable pageable = Pageable.ofSize(size / 2).withPage(0);
8787
final Page<String> page = datas.stream()
88-
.collect(PageCollector.toFilteredSortedPage(pageable, t -> t.contains("i"), String::compareTo));
88+
.collect(PageCollectors.toFilteredSortedPage(pageable, t -> t.contains("i"), String::compareTo));
8989

9090
assertEquals(size / 2, page.getSize());
9191
assertEquals(size / 2, page.getContent().size());

src/test/java/org/springframework/data/util/PageCollectorsToPageTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ void init() {
2929
@Test
3030
void fullPage() {
3131
final Pageable pageable = Pageable.ofSize(size);
32-
final Page<Integer> page = ints.stream().collect(PageCollector.toPage(pageable));
32+
final Page<Integer> page = ints.stream().collect(PageCollectors.toPage(pageable));
3333

3434
assertEquals(size, page.getSize());
3535
assertEquals(size, page.getContent().size());
@@ -38,7 +38,7 @@ void fullPage() {
3838
@Test
3939
void emptyPage() {
4040
final Pageable pageable = Pageable.ofSize(size);
41-
final Page<Object> page = Collections.emptyList().stream().collect(PageCollector.toPage(pageable));
41+
final Page<Object> page = Collections.emptyList().stream().collect(PageCollectors.toPage(pageable));
4242

4343
assertEquals(size, page.getSize());
4444
assertEquals(0, page.getContent().size());
@@ -47,7 +47,7 @@ void emptyPage() {
4747
@Test
4848
void secondPage() {
4949
final Pageable pageable = Pageable.ofSize(size / 4).withPage(2);
50-
final Page<Integer> page = ints.stream().collect(PageCollector.toPage(pageable));
50+
final Page<Integer> page = ints.stream().collect(PageCollectors.toPage(pageable));
5151

5252
assertEquals(size / 4, page.getSize());
5353
assertEquals(size / 4, page.getContent().size());
@@ -60,7 +60,7 @@ void checkData() {
6060

6161
final int size = datas.size();
6262
final Pageable pageable = Pageable.ofSize(size / 5).withPage(2);
63-
final Page<String> page = datas.stream().collect(PageCollector.toPage(pageable));
63+
final Page<String> page = datas.stream().collect(PageCollectors.toPage(pageable));
6464

6565
assertEquals(size / 4, page.getSize());
6666
assertEquals(size / 4, page.getContent().size());

src/test/java/org/springframework/data/util/PageCollectorsToSortedPageTest.java

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void init() {
3131
@Test
3232
void fullPage() {
3333
final Pageable pageable = Pageable.ofSize(size);
34-
final Page<Integer> page = ints.stream().collect(PageCollector.toSortedPage(pageable, Integer::compare));
34+
final Page<Integer> page = ints.stream().collect(PageCollectors.toSortedPage(pageable, Integer::compare));
3535

3636
assertEquals(size, page.getSize());
3737
assertEquals(size, page.getContent().size());
@@ -46,7 +46,7 @@ void fullPage() {
4646
void emptyPage() {
4747
final Pageable pageable = Pageable.ofSize(size);
4848
final Page<Integer> page = Collections.<Integer>emptyList().stream()
49-
.collect(PageCollector.toSortedPage(pageable, Integer::compare));
49+
.collect(PageCollectors.toSortedPage(pageable, Integer::compare));
5050

5151
assertEquals(size, page.getSize());
5252
assertTrue(page.getContent().isEmpty());
@@ -55,7 +55,7 @@ void emptyPage() {
5555
@Test
5656
void secondPage() {
5757
final Pageable pageable = Pageable.ofSize(size / 4).withPage(2);
58-
final Page<Integer> page = ints.stream().collect(PageCollector.toSortedPage(pageable, Integer::compare));
58+
final Page<Integer> page = ints.stream().collect(PageCollectors.toSortedPage(pageable, Integer::compare));
5959

6060
assertEquals(size / 4, page.getSize());
6161
assertEquals(size / 4, page.getContent().size());
@@ -72,7 +72,7 @@ void checkData() {
7272

7373
final int size = datas.size();
7474
final Pageable pageable = Pageable.ofSize(size / 2).withPage(1);
75-
final Page<String> page = datas.stream().collect(PageCollector.toSortedPage(pageable, String::compareTo));
75+
final Page<String> page = datas.stream().collect(PageCollectors.toSortedPage(pageable, String::compareTo));
7676

7777
assertEquals(size / 2, page.getSize());
7878
assertEquals(size / 2, page.getContent().size());

0 commit comments

Comments
 (0)