Class UnpagedPageImpl<T>

  • Type Parameters:
    T - The type of the list's elements
    All Implemented Interfaces:
    java.lang.Iterable<T>, java.util.function.Supplier<java.util.stream.Stream<T>>, org.springframework.data.domain.Page<T>, org.springframework.data.domain.Slice<T>, org.springframework.data.util.Streamable<T>

    public class UnpagedPageImpl<T>
    extends java.lang.Object
    implements org.springframework.data.domain.Page<T>
    Page implementation that uses only the methods from the Iterable interface thus the lazy list from the AWS SDK used as result set can be properly used
    • Constructor Summary

      Constructors 
      Constructor Description
      UnpagedPageImpl​(java.util.List<T> content, long total)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)  
      java.util.List<T> getContent()  
      int getNumber()  
      int getNumberOfElements()  
      int getSize()  
      org.springframework.data.domain.Sort getSort()  
      long getTotalElements()  
      int getTotalPages()  
      boolean hasContent()  
      int hashCode()  
      boolean hasNext()  
      boolean hasPrevious()  
      boolean isFirst()  
      boolean isLast()  
      java.util.Iterator<T> iterator()  
      <U> UnpagedPageImpl<U> map​(java.util.function.Function<? super T,​? extends U> converter)  
      org.springframework.data.domain.Pageable nextPageable()  
      org.springframework.data.domain.Pageable previousPageable()  
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
      • Methods inherited from interface java.lang.Iterable

        forEach, spliterator
      • Methods inherited from interface org.springframework.data.domain.Slice

        getPageable, nextOrLastPageable, previousOrFirstPageable
      • Methods inherited from interface org.springframework.data.util.Streamable

        and, and, and, and, filter, flatMap, get, isEmpty, stream, toList, toSet
    • Constructor Detail

      • UnpagedPageImpl

        public UnpagedPageImpl​(@NonNull
                               java.util.List<T> content,
                               long total)
    • Method Detail

      • getNumber

        public int getNumber()
        Specified by:
        getNumber in interface org.springframework.data.domain.Slice<T>
      • getSize

        public int getSize()
        Specified by:
        getSize in interface org.springframework.data.domain.Slice<T>
      • getNumberOfElements

        public int getNumberOfElements()
        Specified by:
        getNumberOfElements in interface org.springframework.data.domain.Slice<T>
      • getSort

        public org.springframework.data.domain.Sort getSort()
        Specified by:
        getSort in interface org.springframework.data.domain.Slice<T>
      • isFirst

        public boolean isFirst()
        Specified by:
        isFirst in interface org.springframework.data.domain.Slice<T>
      • isLast

        public boolean isLast()
        Specified by:
        isLast in interface org.springframework.data.domain.Slice<T>
      • hasNext

        public boolean hasNext()
        Specified by:
        hasNext in interface org.springframework.data.domain.Slice<T>
      • hasPrevious

        public boolean hasPrevious()
        Specified by:
        hasPrevious in interface org.springframework.data.domain.Slice<T>
      • nextPageable

        @Nullable
        public org.springframework.data.domain.Pageable nextPageable()
        Specified by:
        nextPageable in interface org.springframework.data.domain.Slice<T>
      • previousPageable

        @Nullable
        public org.springframework.data.domain.Pageable previousPageable()
        Specified by:
        previousPageable in interface org.springframework.data.domain.Slice<T>
      • iterator

        public java.util.Iterator<T> iterator()
        Specified by:
        iterator in interface java.lang.Iterable<T>
      • getTotalPages

        public int getTotalPages()
        Specified by:
        getTotalPages in interface org.springframework.data.domain.Page<T>
      • getTotalElements

        public long getTotalElements()
        Specified by:
        getTotalElements in interface org.springframework.data.domain.Page<T>
      • map

        public <U> UnpagedPageImpl<U> map​(java.util.function.Function<? super T,​? extends U> converter)
        Specified by:
        map in interface org.springframework.data.domain.Page<T>
        Specified by:
        map in interface org.springframework.data.domain.Slice<T>
        Specified by:
        map in interface org.springframework.data.util.Streamable<T>
      • getContent

        public java.util.List<T> getContent()
        Specified by:
        getContent in interface org.springframework.data.domain.Slice<T>
      • hasContent

        public boolean hasContent()
        Specified by:
        hasContent in interface org.springframework.data.domain.Slice<T>
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object