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
ConstructorDescriptionProgressState
(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime) Creates an instance of aProgressState
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.static ProgressView.ProgressState
of
(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime) boolean
running()
Returns the value of therunning
record component.long
Returns the value of thestartTime
record component.int
tickEnd()
Returns the value of thetickEnd
record component.int
Returns the value of thetickStart
record component.int
Returns the value of thetickValue
record component.final String
toString()
Returns a string representation of this record class.long
Returns the value of theupdateTime
record component.
-
Constructor Details
-
ProgressState
public ProgressState(int tickStart, int tickEnd, int tickValue, boolean running, long startTime, long updateTime) Creates an instance of aProgressState
record class.- Parameters:
tickStart
- the value for thetickStart
record componenttickEnd
- the value for thetickEnd
record componenttickValue
- the value for thetickValue
record componentrunning
- the value for therunning
record componentstartTime
- the value for thestartTime
record componentupdateTime
- the value for theupdateTime
record 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 thetickStart
record component.- Returns:
- the value of the
tickStart
record component
-
tickEnd
public int tickEnd()Returns the value of thetickEnd
record component.- Returns:
- the value of the
tickEnd
record component
-
tickValue
public int tickValue()Returns the value of thetickValue
record component.- Returns:
- the value of the
tickValue
record component
-
running
public boolean running()Returns the value of therunning
record component.- Returns:
- the value of the
running
record component
-
startTime
public long startTime()Returns the value of thestartTime
record component.- Returns:
- the value of the
startTime
record component
-
updateTime
public long updateTime()Returns the value of theupdateTime
record component.- Returns:
- the value of the
updateTime
record component
-