Record Class GuideReader.Flip
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.GuideReader.Flip
- Enclosing class:
GuideReader
public static record GuideReader.Flip(@Nullable GuidePage.Laid oldLeft, @Nullable GuidePage.Laid oldRight, @Nullable GuidePage.Laid newLeft, @Nullable GuidePage.Laid newRight, boolean forward, long start, GuideReader.Spot from, GuideReader.Spot to)
extends Record
Leaves in the air: what was open and what is opening (their pages and spreads), and which way they turn.
-
Constructor Summary
ConstructorsConstructorDescriptionFlip(@Nullable GuidePage.Laid oldLeft, @Nullable GuidePage.Laid oldRight, @Nullable GuidePage.Laid newLeft, @Nullable GuidePage.Laid newRight, boolean forward, long start, GuideReader.Spot from, GuideReader.Spot to) Creates an instance of aFliprecord class. -
Method Summary
Modifier and TypeMethodDescriptionback()final booleanIndicates whether some other object is "equal to" this one.face()The spread the leaf's face (a right page) belongs to, and its back's (a left page).booleanforward()Returns the value of theforwardrecord component.from()Returns the value of thefromrecord component.final inthashCode()Returns a hash code value for this object.@Nullable GuidePage.LaidnewLeft()Returns the value of thenewLeftrecord component.@Nullable GuidePage.LaidnewRight()Returns the value of thenewRightrecord component.@Nullable GuidePage.LaidoldLeft()Returns the value of theoldLeftrecord component.@Nullable GuidePage.LaidoldRight()Returns the value of theoldRightrecord component.longstart()Returns the value of thestartrecord component.The spread whose left page lies to the left while the leaf turns, and whose right page lies to the right.to()Returns the value of thetorecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Flip
public Flip(@Nullable GuidePage.Laid oldLeft, @Nullable GuidePage.Laid oldRight, @Nullable GuidePage.Laid newLeft, @Nullable GuidePage.Laid newRight, boolean forward, long start, GuideReader.Spot from, GuideReader.Spot to) Creates an instance of aFliprecord class.- Parameters:
oldLeft- the value for theoldLeftrecord componentoldRight- the value for theoldRightrecord componentnewLeft- the value for thenewLeftrecord componentnewRight- the value for thenewRightrecord componentforward- the value for theforwardrecord componentstart- the value for thestartrecord componentfrom- the value for thefromrecord componentto- the value for thetorecord component
-
-
Method Details
-
staticLeft
The spread whose left page lies to the left while the leaf turns, and whose right page lies to the right. -
staticRight
-
face
The spread the leaf's face (a right page) belongs to, and its back's (a left page). -
back
-
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 '=='. -
oldLeft
Returns the value of theoldLeftrecord component.- Returns:
- the value of the
oldLeftrecord component
-
oldRight
Returns the value of theoldRightrecord component.- Returns:
- the value of the
oldRightrecord component
-
newLeft
Returns the value of thenewLeftrecord component.- Returns:
- the value of the
newLeftrecord component
-
newRight
Returns the value of thenewRightrecord component.- Returns:
- the value of the
newRightrecord component
-
forward
public boolean forward()Returns the value of theforwardrecord component.- Returns:
- the value of the
forwardrecord component
-
start
public long start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
from
Returns the value of thefromrecord component.- Returns:
- the value of the
fromrecord component
-
to
Returns the value of thetorecord component.- Returns:
- the value of the
torecord component
-