congrats Icon
New! Announcing our next generation AI code completions
Read here
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

  • Creating JSON documents from java classes using gson
  • setRequestProperty (URLConnection)
  • findViewById (Activity)
  • getContentResolver (Context)
  • FileWriter (java.io)
    A specialized Writer that writes to a file in the file system. All write requests made by calling me
  • InputStream (java.io)
    A readable source of bytes.Most clients will use input streams that read data from the file system (
  • KeyStore (java.security)
    KeyStore is responsible for maintaining cryptographic keys and their owners. The type of the syste
  • SortedSet (java.util)
    SortedSet is a Set which iterates over its elements in a sorted order. The order is determined eithe
  • Handler (java.util.logging)
    A Handler object accepts a logging request and exports the desired messages to a target, for example
  • BoxLayout (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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