Record Class ProgressView.ProgressState

java.lang.Object
java.lang.Record
org.springframework.shell.component.view.control.ProgressView.ProgressState
Record Components:
tickStart - the tick start value, zero or positive
tickEnd - the tick end value, positive and more than tick start
tickValue - the current tick value, within inclusive bounds of tick start/end
running - the running state
startTime - the running start time
updateTime - the last running update time
Enclosing class:
ProgressView

public static record ProgressView.ProgressState(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime) extends Record
Encapsulates a current running state of a ProgressView.
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProgressState(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime)
    Creates an instance of a ProgressState record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    of(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime)
     
    boolean
    Returns the value of the running record component.
    long
    Returns the value of the startTime record component.
    int
    Returns the value of the tickEnd record component.
    int
    Returns the value of the tickStart record component.
    int
    Returns the value of the tickValue record component.
    final String
    Returns a string representation of this record class.
    long
    Returns the value of the updateTime record component.

    Methods inherited from class java.lang.Object

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

    • ProgressState

      public ProgressState(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime)
      Creates an instance of a ProgressState record class.
      Parameters:
      tickStart - the value for the tickStart record component
      tickEnd - the value for the tickEnd record component
      tickValue - the value for the tickValue record component
      running - the value for the running record component
      startTime - the value for the startTime record component
      updateTime - the value for the updateTime record component
  • Method Details

    • of

      public static ProgressView.ProgressState of(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime)
    • 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.
    • tickStart

      public int tickStart()
      Returns the value of the tickStart record component.
      Returns:
      the value of the tickStart record component
    • tickEnd

      public int tickEnd()
      Returns the value of the tickEnd record component.
      Returns:
      the value of the tickEnd record component
    • tickValue

      public int tickValue()
      Returns the value of the tickValue record component.
      Returns:
      the value of the tickValue record component
    • running

      public boolean running()
      Returns the value of the running record component.
      Returns:
      the value of the running record component
    • startTime

      public long startTime()
      Returns the value of the startTime record component.
      Returns:
      the value of the startTime record component
    • updateTime

      public long updateTime()
      Returns the value of the updateTime record component.
      Returns:
      the value of the updateTime record component