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 TypeMethodDescriptionvoid
void
int
capacity()
Returns the value of thecapacity
record component.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.iterator()
int
Returns the value of thepageIndex
record component.Returns the value of thepageItems
record component.void
final String
toString()
Returns a string representation of this record class.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface java.lang.Iterable
forEach, spliterator
-
Constructor Details
-
TextPage
Creates an instance of aTextPage
record class.- Parameters:
pageIndex
- the value for thepageIndex
record componentcapacity
- the value for thecapacity
record componentpageItems
- the value for thepageItems
record 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 thepageIndex
record component.- Returns:
- the value of the
pageIndex
record component
-
capacity
public int capacity()Returns the value of thecapacity
record component.- Returns:
- the value of the
capacity
record component
-
pageItems
Returns the value of thepageItems
record component.- Returns:
- the value of the
pageItems
record component
-