Record Class TextPage<S,T extends TextConvertible<S>>
java.lang.Object
java.lang.Record
io.github.mqzn.commands.utilities.text.TextPage<S,T>
- All Implemented Interfaces:
Iterable<T>
public record TextPage<S,T extends TextConvertible<S>> (int pageIndex, int capacity, List<T extends TextConvertible<S>> pageItems)
extends Record
implements Iterable<T>
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidintcapacity()Returns the value of thecapacityrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.iterator()intReturns the value of thepageIndexrecord component.Returns the value of thepageItemsrecord component.voidfinal StringtoString()Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TextPage
Creates an instance of aTextPagerecord class.- Parameters:
pageIndex- the value for thepageIndexrecord componentcapacity- the value for thecapacityrecord componentpageItems- the value for thepageItemsrecord component
-
-
Method Details
-
add
-
remove
-
addAll
-
iterator
-
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. -
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. -
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
pageIndex
public int pageIndex()Returns the value of thepageIndexrecord component.- Returns:
- the value of the
pageIndexrecord component
-
capacity
public int capacity()Returns the value of thecapacityrecord component.- Returns:
- the value of the
capacityrecord component
-
pageItems
Returns the value of thepageItemsrecord component.- Returns:
- the value of the
pageItemsrecord component
-