Record Class Moderation.Result
java.lang.Object
java.lang.Record
io.github.stefanbratanov.jvm.openai.Moderation.Result
- Enclosing class:
- Moderation
public static record Moderation.Result(boolean flagged, Moderation.Result.Categories categories, Moderation.Result.CategoryScores categoryScores)
extends Record
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final recordstatic final record -
Constructor Summary
ConstructorsConstructorDescriptionResult(boolean flagged, Moderation.Result.Categories categories, Moderation.Result.CategoryScores categoryScores) Creates an instance of aResultrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thecategoriesrecord component.Returns the value of thecategoryScoresrecord component.final booleanIndicates whether some other object is "equal to" this one.booleanflagged()Returns the value of theflaggedrecord component.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Result
public Result(boolean flagged, Moderation.Result.Categories categories, Moderation.Result.CategoryScores categoryScores) Creates an instance of aResultrecord class.- Parameters:
flagged- the value for theflaggedrecord componentcategories- the value for thecategoriesrecord componentcategoryScores- the value for thecategoryScoresrecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
flagged
public boolean flagged()Returns the value of theflaggedrecord component.- Returns:
- the value of the
flaggedrecord component
-
categories
Returns the value of thecategoriesrecord component.- Returns:
- the value of the
categoriesrecord component
-
categoryScores
Returns the value of thecategoryScoresrecord component.- Returns:
- the value of the
categoryScoresrecord component
-