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 positivetickEnd- the tick end value, positive and more than tick starttickValue- the current tick value, within inclusive bounds of tick start/endrunning- the running statestartTime- the running start timeupdateTime- 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
ConstructorsConstructorDescriptionProgressState(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime) Creates an instance of aProgressStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.static ProgressView.ProgressStateof(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime) booleanrunning()Returns the value of therunningrecord component.longReturns the value of thestartTimerecord component.inttickEnd()Returns the value of thetickEndrecord component.intReturns the value of thetickStartrecord component.intReturns the value of thetickValuerecord component.final StringtoString()Returns a string representation of this record class.longReturns the value of theupdateTimerecord component.
-
Constructor Details
-
ProgressState
public ProgressState(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime) Creates an instance of aProgressStaterecord class.- Parameters:
tickStart- the value for thetickStartrecord componenttickEnd- the value for thetickEndrecord componenttickValue- the value for thetickValuerecord componentrunning- the value for therunningrecord componentstartTime- the value for thestartTimerecord componentupdateTime- the value for theupdateTimerecord component
-
-
Method Details
-
of
public static ProgressView.ProgressState of(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime) -
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. All components in this record class are compared with '=='. -
tickStart
public int tickStart()Returns the value of thetickStartrecord component.- Returns:
- the value of the
tickStartrecord component
-
tickEnd
public int tickEnd()Returns the value of thetickEndrecord component.- Returns:
- the value of the
tickEndrecord component
-
tickValue
public int tickValue()Returns the value of thetickValuerecord component.- Returns:
- the value of the
tickValuerecord component
-
running
public boolean running()Returns the value of therunningrecord component.- Returns:
- the value of the
runningrecord component
-
startTime
public long startTime()Returns the value of thestartTimerecord component.- Returns:
- the value of the
startTimerecord component
-
updateTime
public long updateTime()Returns the value of theupdateTimerecord component.- Returns:
- the value of the
updateTimerecord component
-