Package uz.khurozov.jokeapi.dto
Record Class Flags
java.lang.Object
java.lang.Record
uz.khurozov.jokeapi.dto.Flags
public record Flags(boolean nsfw, boolean religious, boolean political, boolean racist, boolean sexist, boolean explicit)
extends Record
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.booleanexplicit()Returns the value of theexplicitrecord component.final inthashCode()Returns a hash code value for this object.booleannsfw()Returns the value of thensfwrecord component.booleanReturns the value of thepoliticalrecord component.booleanracist()Returns the value of theracistrecord component.booleanReturns the value of thereligiousrecord component.booleansexist()Returns the value of thesexistrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Flags
public Flags() -
Flags
public Flags(boolean nsfw, boolean religious, boolean political, boolean racist, boolean sexist, boolean explicit) Creates an instance of aFlagsrecord class.- Parameters:
nsfw- the value for thensfwrecord componentreligious- the value for thereligiousrecord componentpolitical- the value for thepoliticalrecord componentracist- the value for theracistrecord componentsexist- the value for thesexistrecord componentexplicit- the value for theexplicitrecord 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 '=='. -
nsfw
public boolean nsfw()Returns the value of thensfwrecord component.- Returns:
- the value of the
nsfwrecord component
-
religious
public boolean religious()Returns the value of thereligiousrecord component.- Returns:
- the value of the
religiousrecord component
-
political
public boolean political()Returns the value of thepoliticalrecord component.- Returns:
- the value of the
politicalrecord component
-
racist
public boolean racist()Returns the value of theracistrecord component.- Returns:
- the value of the
racistrecord component
-
sexist
public boolean sexist()Returns the value of thesexistrecord component.- Returns:
- the value of the
sexistrecord component
-
explicit
public boolean explicit()Returns the value of theexplicitrecord component.- Returns:
- the value of the
explicitrecord component
-