File tree Expand file tree Collapse file tree 13 files changed +923
-0
lines changed
spring-data-commons-2.5.1/org/springframework/data
springframework-5.3.8/org/springframework Expand file tree Collapse file tree 13 files changed +923
-0
lines changed Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2008-2021 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package org .springframework .data .domain ;
17+
18+ import java .util .Collections ;
19+ import java .util .function .Function ;
20+
21+ public interface Page <T > extends Slice <T > {
22+ static <T > Page <T > empty () {
23+ return null ;
24+ }
25+
26+ static <T > Page <T > empty (Pageable pageable ) {
27+ return null ;
28+ }
29+
30+ int getTotalPages ();
31+
32+ long getTotalElements ();
33+
34+ <U > Page <U > map (Function <? super T , ? extends U > converter );
35+
36+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2008-2021 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package org .springframework .data .domain ;
17+
18+ import java .util .Optional ;
19+
20+
21+ public interface Pageable {
22+ static Pageable unpaged () {
23+ return null ;
24+ }
25+
26+ static Pageable ofSize (int pageSize ) {
27+ return null ;
28+ }
29+
30+ default boolean isPaged () {
31+ return false ;
32+ }
33+
34+ default boolean isUnpaged () {
35+ return false ;
36+ }
37+
38+ int getPageNumber ();
39+
40+ int getPageSize ();
41+
42+ long getOffset ();
43+
44+ Sort getSort ();
45+
46+ default Sort getSortOr (Sort sort ) {
47+ return null ;
48+ }
49+
50+ Pageable next ();
51+
52+ Pageable previousOrFirst ();
53+
54+ Pageable first ();
55+
56+ Pageable withPage (int pageNumber );
57+
58+ boolean hasPrevious ();
59+
60+ default Optional <Pageable > toOptional () {
61+ return null ;
62+ }
63+
64+ }
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright 2014-2021 the original author or authors.
3+ *
4+ * Licensed under the Apache License, Version 2.0 (the "License");
5+ * you may not use this file except in compliance with the License.
6+ * You may obtain a copy of the License at
7+ *
8+ * https://www.apache.org/licenses/LICENSE-2.0
9+ *
10+ * Unless required by applicable law or agreed to in writing, software
11+ * distributed under the License is distributed on an "AS IS" BASIS,
12+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+ * See the License for the specific language governing permissions and
14+ * limitations under the License.
15+ */
16+ package org .springframework .data .domain ;
17+
18+ import java .util .List ;
19+ import java .util .function .Function ;
20+
21+ import org .springframework .data .util .Streamable ;
22+
23+ public interface Slice <T > extends Streamable <T > {
24+ int getNumber ();
25+
26+ int getSize ();
27+
28+ int getNumberOfElements ();
29+
30+ List <T > getContent ();
31+
32+ boolean hasContent ();
33+
34+ Sort getSort ();
35+
36+ boolean isFirst ();
37+
38+ boolean isLast ();
39+
40+ boolean hasNext ();
41+
42+ boolean hasPrevious ();
43+
44+ default Pageable getPageable () {
45+ return null ;
46+ }
47+
48+ Pageable nextPageable ();
49+
50+ Pageable previousPageable ();
51+
52+ <U > Slice <U > map (Function <? super T , ? extends U > converter );
53+
54+ default Pageable nextOrLastPageable () {
55+ return null ;
56+ }
57+
58+ default Pageable previousOrFirstPageable () {
59+ return null ;
60+ }
61+
62+ }
You can’t perform that action at this time.
0 commit comments