本文整理了Java中org.springframework.data.domain.Pageable.previousOrFirst()
方法的一些代码示例,展示了Pageable.previousOrFirst()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Pageable.previousOrFirst()
方法的具体详情如下:
包路径:org.springframework.data.domain.Pageable
类名称:Pageable
方法名:previousOrFirst
[英]Returns the previous Pageable or the first Pageable if the current one already is the first one.
[中]返回上一页或第一页(如果当前页已经是第一页)。
代码示例来源:origin: spring-projects/spring-data-couchbase
public Pageable previousOrFirst() {
return delegate.previousOrFirst();
}
代码示例来源:origin: org.springframework.data/spring-data-couchbase
public Pageable previousOrFirst() {
return delegate.previousOrFirst();
}
代码示例来源:origin: org.springframework.data/spring-data-gemfire
/**
* @inheritDoc
*/
@Override
public int getNumber() {
AtomicInteger number = new AtomicInteger(1);
Optional.ofNullable(previousPageable()).ifPresent(previousPageable -> {
Pageable currentPageable;
do {
number.incrementAndGet();
currentPageable = previousPageable;
previousPageable = previousPageable.previousOrFirst();
}
while (currentPageable != previousPageable);
});
return number.get();
}
代码示例来源:origin: org.springframework.data/spring-data-geode
/**
* @inheritDoc
*/
@Override
public int getNumber() {
AtomicInteger number = new AtomicInteger(1);
Optional.ofNullable(previousPageable()).ifPresent(previousPageable -> {
Pageable currentPageable;
do {
number.incrementAndGet();
currentPageable = previousPageable;
previousPageable = previousPageable.previousOrFirst();
}
while (currentPageable != previousPageable);
});
return number.get();
}
代码示例来源:origin: apache/servicemix-bundles
public Pageable previousPageable() {
return hasPrevious() ? pageable.previousOrFirst() : Pageable.unpaged();
}
内容来源于网络,如有侵权,请联系作者删除!