Record Class StateIO

java.lang.Object
java.lang.Record
com.github.tonivade.purefun.effect.StateIO

record StateIO(boolean isCancelled, boolean isCancellingNow, boolean isStartingNow) extends Record
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    (package private) static final StateIO
     
    (package private) static final StateIO
     
    private final boolean
    The field for the isCancelled record component.
    private final boolean
    The field for the isCancellingNow record component.
    private final boolean
    The field for the isStartingNow record component.
  • Constructor Summary

    Constructors
    Constructor
    Description
    StateIO(boolean isCancelled, boolean isCancellingNow, boolean isStartingNow)
    Creates an instance of a StateIO record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) StateIO
     
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    (package private) boolean
     
    boolean
    Returns the value of the isCancelled record component.
    boolean
    Returns the value of the isCancellingNow record component.
    (package private) boolean
     
    boolean
    Returns the value of the isStartingNow record component.
    (package private) StateIO
     
    (package private) StateIO
     
    final String
    Returns a string representation of this record class.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Field Details

    • isCancelled

      private final boolean isCancelled
      The field for the isCancelled record component.
    • isCancellingNow

      private final boolean isCancellingNow
      The field for the isCancellingNow record component.
    • isStartingNow

      private final boolean isStartingNow
      The field for the isStartingNow record component.
    • INITIAL

      static final StateIO INITIAL
    • CANCELLED

      static final StateIO CANCELLED
  • Constructor Details

    • StateIO

      StateIO(boolean isCancelled, boolean isCancellingNow, boolean isStartingNow)
      Creates an instance of a StateIO record class.
      Parameters:
      isCancelled - the value for the isCancelled record component
      isCancellingNow - the value for the isCancellingNow record component
      isStartingNow - the value for the isStartingNow record component
  • Method Details

    • cancellingNow

      StateIO cancellingNow()
    • startingNow

      StateIO startingNow()
    • notStartingNow

      StateIO notStartingNow()
    • isCancelable

      boolean isCancelable()
    • isRunnable

      boolean isRunnable()
    • 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. All components in this record class are compared with '=='.
      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.
    • isCancelled

      public boolean isCancelled()
      Returns the value of the isCancelled record component.
      Returns:
      the value of the isCancelled record component
    • isCancellingNow

      public boolean isCancellingNow()
      Returns the value of the isCancellingNow record component.
      Returns:
      the value of the isCancellingNow record component
    • isStartingNow

      public boolean isStartingNow()
      Returns the value of the isStartingNow record component.
      Returns:
      the value of the isStartingNow record component