congrats Icon
New! Announcing Tabnine Chat Beta
Learn More
Tabnine Logo
Pageable.hasPrevious
Code IndexAdd Tabnine to your IDE (free)

How to use
hasPrevious
method
in
org.springframework.data.domain.Pageable

Best Java code snippets using org.springframework.data.domain.Pageable.hasPrevious (Showing top 3 results out of 315)

origin: spring-projects/spring-data-couchbase

public boolean hasPrevious() {
  return delegate.hasPrevious();
}
origin: org.springframework.data/spring-data-couchbase

public boolean hasPrevious() {
  return delegate.hasPrevious();
}
origin: hatunet/spring-data-mybatis

/**
 * Calculate total mount.
 * @return if return -1 means can not judge ,need count from database.
 */
protected <X> long calculateTotal(Pageable pager, List<X> result) {
  if (pager.hasPrevious()) {
    if (CollectionUtils.isEmpty(result)) {
      return -1;
    }
    if (result.size() == pager.getPageSize()) {
      return -1;
    }
    return (pager.getPageNumber() - 1) * pager.getPageSize() + result.size();
  }
  if (result.size() < pager.getPageSize()) {
    return result.size();
  }
  return -1;
}
org.springframework.data.domainPageablehasPrevious

Javadoc

Returns whether there's a previous Pageable we can access from the current one. Will return false in case the current Pageable already refers to the first page.

Popular methods of Pageable

  • getPageSize
    Returns the number of items to be returned.
  • getSort
    Returns the sorting parameters.
  • getOffset
  • getPageNumber
    Returns the page to be returned.
  • isPaged
  • unpaged
  • isUnpaged
  • previousOrFirst
  • toOptional
  • next
  • first
  • getSortOr
    Returns the current Sort or the given one if the current one is unsorted.
  • first,
  • getSortOr

Popular in Java

  • Making http requests using okhttp
  • putExtra (Intent)
  • onCreateOptionsMenu (Activity)
  • getContentResolver (Context)
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • Kernel (java.awt.image)
  • Thread (java.lang)
    A thread is a thread of execution in a program. The Java Virtual Machine allows an application to ha
  • Proxy (java.net)
    This class represents proxy server settings. A created instance of Proxy stores a type and an addres
  • NumberFormat (java.text)
    The abstract base class for all number formats. This class provides the interface for formatting and
  • Arrays (java.util)
    This class contains various methods for manipulating arrays (such as sorting and searching). This cl
  • Top plugins for Android Studio
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now