Record Class ImageQuery
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.image.ImageQuery
- Record Components:
original- The original query string submitted by the user.altered- The altered version of the query after processing.spellcheckOff- Indicates if spellcheck is disabled.showStrictWarning- Indicates if a strict warning is shown.
public record ImageQuery(String original, String altered, Boolean spellcheckOff, Boolean showStrictWarning)
extends Record
Represents an image query in search requests. This class provides structured data about image
queries in the Brave Search API results.
The image query object contains information about the original query submitted by the user, as well as any alterations made to the query during processing. It also includes flags indicating whether spellcheck is disabled and whether a strict warning should be shown.
-
Constructor Summary
ConstructorsConstructorDescriptionImageQuery(String original, String altered, Boolean spellcheckOff, Boolean showStrictWarning) Creates an instance of aImageQueryrecord class. -
Method Summary
Modifier and TypeMethodDescriptionaltered()Returns the value of thealteredrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.original()Returns the value of theoriginalrecord component.Returns the value of theshowStrictWarningrecord component.Returns the value of thespellcheckOffrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ImageQuery
public ImageQuery(String original, String altered, Boolean spellcheckOff, Boolean showStrictWarning) Creates an instance of aImageQueryrecord class.- Parameters:
original- the value for theoriginalrecord componentaltered- the value for thealteredrecord componentspellcheckOff- the value for thespellcheckOffrecord componentshowStrictWarning- the value for theshowStrictWarningrecord 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 withObjects::equals(Object,Object). -
original
Returns the value of theoriginalrecord component.- Returns:
- the value of the
originalrecord component
-
altered
Returns the value of thealteredrecord component.- Returns:
- the value of the
alteredrecord component
-
spellcheckOff
Returns the value of thespellcheckOffrecord component.- Returns:
- the value of the
spellcheckOffrecord component
-
showStrictWarning
Returns the value of theshowStrictWarningrecord component.- Returns:
- the value of the
showStrictWarningrecord component
-