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 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 a Flip record class.
      Parameters:
      oldLeft - the value for the oldLeft record component
      oldRight - the value for the oldRight record component
      newLeft - the value for the newLeft record component
      newRight - the value for the newRight record component
      forward - the value for the forward record component
      start - the value for the start record component
      from - the value for the from record component
      to - the value for the to record component
  • Method Details

    • staticLeft

      public FoliosReader.Spot staticLeft()
      The spread whose left page lies to the left while the leaf turns, and whose right page lies to the right.
    • staticRight

      public FoliosReader.Spot staticRight()
    • face

      public FoliosReader.Spot face()
      The spread the leaf's face (a right page) belongs to, and its back's (a left page).
    • back

      public FoliosReader.Spot back()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with the compare method from their corresponding wrapper classes.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • oldLeft

      public @Nullable FoliosPageElement.Laid oldLeft()
      Returns the value of the oldLeft record component.
      Returns:
      the value of the oldLeft record component
    • oldRight

      public @Nullable FoliosPageElement.Laid oldRight()
      Returns the value of the oldRight record component.
      Returns:
      the value of the oldRight record component
    • newLeft

      public @Nullable FoliosPageElement.Laid newLeft()
      Returns the value of the newLeft record component.
      Returns:
      the value of the newLeft record component
    • newRight

      public @Nullable FoliosPageElement.Laid newRight()
      Returns the value of the newRight record component.
      Returns:
      the value of the newRight record component
    • forward

      public boolean forward()
      Returns the value of the forward record component.
      Returns:
      the value of the forward record component
    • start

      public long start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • from

      public FoliosReader.Spot from()
      Returns the value of the from record component.
      Returns:
      the value of the from record component
    • to

      public FoliosReader.Spot to()
      Returns the value of the to record component.
      Returns:
      the value of the to record component