Record Class FoliosReader.Flip
java.lang.Object
java.lang.Record
net.ixdarklord.folios.internal.client.FoliosReader.Flip
- Enclosing class:
FoliosReader
public static record FoliosReader.Flip(@Nullable FoliosPageElement.Laid oldLeft, @Nullable FoliosPageElement.Laid oldRight, @Nullable FoliosPageElement.Laid newLeft, @Nullable FoliosPageElement.Laid newRight, boolean forward, long start, FoliosReader.Spot from, FoliosReader.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 FoliosPageElement.Laid oldLeft, @Nullable FoliosPageElement.Laid oldRight, @Nullable FoliosPageElement.Laid newLeft, @Nullable FoliosPageElement.Laid newRight, boolean forward, long start, FoliosReader.Spot from, FoliosReader.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 FoliosPageElement.LaidnewLeft()Returns the value of thenewLeftrecord component.@Nullable FoliosPageElement.LaidnewRight()Returns the value of thenewRightrecord component.@Nullable FoliosPageElement.LaidoldLeft()Returns the value of theoldLeftrecord component.@Nullable FoliosPageElement.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 FoliosPageElement.Laid oldLeft, @Nullable FoliosPageElement.Laid oldRight, @Nullable FoliosPageElement.Laid newLeft, @Nullable FoliosPageElement.Laid newRight, boolean forward, long start, FoliosReader.Spot from, FoliosReader.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
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
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
-