Record Class ProgressRunEvent

java.lang.Object
java.lang.Record
io.karatelabs.core.ProgressRunEvent
All Implemented Interfaces:
RunEvent

public record ProgressRunEvent(Suite suite, int completed, int total, long timeStamp) extends Record implements RunEvent
Progress event (PROGRESS).
  • Constructor Summary

    Constructors
    Constructor
    Description
    ProgressRunEvent(Suite suite, int completed, int total, long timeStamp)
    Creates an instance of a ProgressRunEvent record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    int
    Returns the value of the completed record component.
    final boolean
    Indicates whether some other object is "equal to" this one.
    long
    Returns the timestamp when this event occurred (epoch milliseconds).
    Returns the event type.
    final int
    Returns a hash code value for this object.
    of(Suite suite, int completed, int total)
     
    Returns the value of the suite record component.
    long
    Returns the value of the timeStamp record component.
    Serializes this event to a map for JSONL output.
    final String
    Returns a string representation of this record class.
    int
    Returns the value of the total record component.

    Methods inherited from class java.lang.Object

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

    • ProgressRunEvent

      public ProgressRunEvent(Suite suite, int completed, int total, long timeStamp)
      Creates an instance of a ProgressRunEvent record class.
      Parameters:
      suite - the value for the suite record component
      completed - the value for the completed record component
      total - the value for the total record component
      timeStamp - the value for the timeStamp record component
  • Method Details

    • of

      public static ProgressRunEvent of(Suite suite, int completed, int total)
    • getType

      public RunEventType getType()
      Description copied from interface: RunEvent
      Returns the event type.
      Specified by:
      getType in interface RunEvent
    • getTimeStamp

      public long getTimeStamp()
      Description copied from interface: RunEvent
      Returns the timestamp when this event occurred (epoch milliseconds).
      Specified by:
      getTimeStamp in interface RunEvent
    • toJson

      public Map<String,Object> toJson()
      Description copied from interface: RunEvent
      Serializes this event to a map for JSONL output.
      Specified by:
      toJson in interface RunEvent
    • 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 '=='.
      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.
    • suite

      public Suite suite()
      Returns the value of the suite record component.
      Returns:
      the value of the suite record component
    • completed

      public int completed()
      Returns the value of the completed record component.
      Returns:
      the value of the completed record component
    • total

      public int total()
      Returns the value of the total record component.
      Returns:
      the value of the total record component
    • timeStamp

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