Record Class Batch.RequestCounts
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.Batch.RequestCounts
- Enclosing class:
- Batch
-
Constructor Summary
ConstructorsConstructorDescriptionRequestCounts
(int total, int completed, int failed) Creates an instance of aRequestCounts
record class. -
Method Summary
Modifier and TypeMethodDescriptionint
Returns the value of thecompleted
record component.final boolean
Indicates whether some other object is "equal to" this one.int
failed()
Returns the value of thefailed
record component.final int
hashCode()
Returns a hash code value for this object.final String
toString()
Returns a string representation of this record class.int
total()
Returns the value of thetotal
record component.
-
Constructor Details
-
RequestCounts
public RequestCounts(int total, int completed, int failed) Creates an instance of aRequestCounts
record class.- Parameters:
total
- the value for thetotal
record componentcompleted
- the value for thecompleted
record componentfailed
- the value for thefailed
record component
-
-
Method Details
-
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 '=='. -
total
public int total()Returns the value of thetotal
record component.- Returns:
- the value of the
total
record component
-
completed
public int completed()Returns the value of thecompleted
record component.- Returns:
- the value of the
completed
record component
-
failed
public int failed()Returns the value of thefailed
record component.- Returns:
- the value of the
failed
record component
-