Options
All
  • Public
  • Public/Protected
  • All
Menu

Page type that can be serialized to json as either an {@ArrayPage} or {@IndexedPage}.

In order to achieve this, all elements in the content array must have an id property.

Then, upon serialization, if the indexed value is true, the content is grouped by id to obtain the map of {id: content item} and written as an IndexedPage, else it is written as an ArrayPage

param

The content to be returned

param

The total number of elements in the data set

param

The Pageable containing the paging information

Type parameters

  • I

  • T: object

Hierarchy

  • Page
    • IndexablePage

Index

Constructors

constructor

Properties

content

content: Array<T>

first

first: boolean

True if this is the first page

indexed

indexed: boolean = false

last

last: boolean

True if this is the last page in the available data set

number

number: number

The number of the current page

numberOfElements

numberOfElements: number = 0

Number of elements in the current page

size

size: number

Size of the page (based on requested value)

sort

sort: Sort | undefined

Sort of this page

totalElements

totalElements: number

Total number of elements available

totalPages

totalPages: number

Total number of pages available

Methods

map

  • Returns a new IndexablePage created by running each element of content through iteratee

    Type parameters

    • R: object

    Parameters

    • iteratee: function

      Method to transform content elements

        • (t: T, i: number): R
        • Parameters

          • t: T
          • i: number

          Returns R

    Returns IndexablePage<I, R>

    Transformed IndexablePage

toJSON

Legend

  • Module
  • Object literal
  • Variable
  • Function
  • Function with type parameter
  • Index signature
  • Type alias
  • Enumeration
  • Enumeration member
  • Property
  • Method
  • Interface
  • Interface with type parameter
  • Constructor
  • Property
  • Method
  • Index signature
  • Class
  • Class with type parameter
  • Constructor
  • Property
  • Method
  • Accessor
  • Index signature
  • Inherited constructor
  • Inherited property
  • Inherited method
  • Inherited accessor
  • Protected property
  • Protected method
  • Protected accessor
  • Private property
  • Private method
  • Private accessor
  • Static property
  • Static method

Generated using TypeDoc