Record Class CJ1Page<T>
java.lang.Object
java.lang.Record
com.io7m.cardant.protocol.inventory.json.internal.CJ1Page<T>
- All Implemented Interfaces:
CJ1ValueType
@JsonClassDescription("A page of results.")
public record CJ1Page<T>(List<T> items, CJ1UnsignedInt pageIndex, CJ1UnsignedInt pageCount, CJ1UnsignedLong pageFirstOffset)
extends Record
implements CJ1ValueType
-
Constructor Summary
ConstructorsConstructorDescriptionCJ1Page(List<T> items, CJ1UnsignedInt pageIndex, CJ1UnsignedInt pageCount, CJ1UnsignedLong pageFirstOffset) Creates an instance of aCJ1Pagerecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.items()Returns the value of theitemsrecord component.Returns the value of thepageCountrecord component.Returns the value of thepageFirstOffsetrecord component.Returns the value of thepageIndexrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
CJ1Page
public CJ1Page(@JsonPropertyDescription("The results.") List<T> items, @JsonPropertyDescription("The page number.") CJ1UnsignedInt pageIndex, @JsonPropertyDescription("The total number of pages.") CJ1UnsignedInt pageCount, @JsonPropertyDescription("The offset of the first result in the page.") CJ1UnsignedLong pageFirstOffset) Creates an instance of aCJ1Pagerecord class.- Parameters:
items- the value for theitemsrecord componentpageIndex- the value for thepageIndexrecord componentpageCount- the value for thepageCountrecord componentpageFirstOffset- the value for thepageFirstOffsetrecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 withObjects::equals(Object,Object). -
items
-
pageIndex
Returns the value of thepageIndexrecord component.- Returns:
- the value of the
pageIndexrecord component
-
pageCount
Returns the value of thepageCountrecord component.- Returns:
- the value of the
pageCountrecord component
-
pageFirstOffset
@JsonPropertyDescription("The offset of the first result in the page.") public CJ1UnsignedLong pageFirstOffset()Returns the value of thepageFirstOffsetrecord component.- Returns:
- the value of the
pageFirstOffsetrecord component
-