Skip to content

Commit 69dbb75

Browse files
committed
Polishing.
Remove superfluous declarations, fix toString description. See #2824
1 parent 63fecdd commit 69dbb75

File tree

2 files changed

+8
-8
lines changed

2 files changed

+8
-8
lines changed

src/main/java/org/springframework/data/domain/ScrollPosition.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ public interface ScrollPosition {
3838
*
3939
* @return will never be {@literal null}.
4040
*/
41-
public static KeysetScrollPosition keyset() {
41+
static KeysetScrollPosition keyset() {
4242
return KeysetScrollPosition.initial();
4343
}
4444

@@ -47,7 +47,7 @@ public static KeysetScrollPosition keyset() {
4747
*
4848
* @return will never be {@literal null}.
4949
*/
50-
public static OffsetScrollPosition offset() {
50+
static OffsetScrollPosition offset() {
5151
return OffsetScrollPosition.initial();
5252
}
5353

@@ -57,7 +57,7 @@ public static OffsetScrollPosition offset() {
5757
* @param offset
5858
* @return a new {@link OffsetScrollPosition} with the given {@code offset}.
5959
*/
60-
public static OffsetScrollPosition offset(long offset) {
60+
static OffsetScrollPosition offset(long offset) {
6161
return OffsetScrollPosition.of(offset);
6262
}
6363

@@ -67,7 +67,7 @@ public static OffsetScrollPosition offset(long offset) {
6767
* @param keys must not be {@literal null}.
6868
* @return will never be {@literal null}.
6969
*/
70-
public static KeysetScrollPosition forward(Map<String, ?> keys) {
70+
static KeysetScrollPosition forward(Map<String, ?> keys) {
7171
return of(keys, Direction.FORWARD);
7272
}
7373

@@ -77,7 +77,7 @@ public static KeysetScrollPosition forward(Map<String, ?> keys) {
7777
* @param keys must not be {@literal null}.
7878
* @return will never be {@literal null}.
7979
*/
80-
public static KeysetScrollPosition backward(Map<String, ?> keys) {
80+
static KeysetScrollPosition backward(Map<String, ?> keys) {
8181
return of(keys, Direction.BACKWARD);
8282
}
8383

@@ -88,14 +88,14 @@ public static KeysetScrollPosition backward(Map<String, ?> keys) {
8888
* @param direction must not be {@literal null}.
8989
* @return will never be {@literal null}.
9090
*/
91-
public static KeysetScrollPosition of(Map<String, ?> keys, Direction direction) {
91+
static KeysetScrollPosition of(Map<String, ?> keys, Direction direction) {
9292
return KeysetScrollPosition.of(keys, direction);
9393
}
9494

9595
/**
9696
* Keyset scrolling direction.
9797
*/
98-
public enum Direction {
98+
enum Direction {
9999

100100
/**
101101
* Forward (default) direction to scroll from the beginning of the results to their end.

src/main/java/org/springframework/data/domain/WindowImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,6 @@ public int hashCode() {
114114

115115
@Override
116116
public String toString() {
117-
return "Scroll " + items;
117+
return "Window " + items;
118118
}
119119
}

0 commit comments

Comments
 (0)