Record Class Paging

java.lang.Object
java.lang.Record
se.diabol.jenkins.pipeline.model.Paging
Record Components:
page - the current page, starting at 1
pageSize - pipelines per page
total - number of pipelines there are

@ExportedBean(defaultVisibility=100) public record Paging(int page, int pageSize, int total) extends Record
Where a component's pipelines are in the list of all of them.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Paging(int page, int pageSize, int total)
    Creates an instance of a Paging record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    int
    Index of the first pipeline of the page.
    int
    Returns the value of the page record component.
    int
     
    int
    Returns the value of the pageSize record component.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the total record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • Paging

      public Paging(int page, int pageSize, int total)
      Creates an instance of a Paging record class.
      Parameters:
      page - the value for the page record component
      pageSize - the value for the pageSize record component
      total - the value for the total record component
  • Method Details

    • pages

      @Exported public int pages()
    • offset

      public int offset()
      Index of the first pipeline of the page.
    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • page

      @Exported public int page()
      Returns the value of the page record component.
      Returns:
      the value of the page record component
    • pageSize

      @Exported public int pageSize()
      Returns the value of the pageSize record component.
      Returns:
      the value of the pageSize record component
    • total

      @Exported public int total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component