Record Class Query
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.Query
- Record Components:
original- The original query string submitted by the user.altered- The altered version of the query after processing.cleaned- The cleaned version of the query.spellcheckOff- Indicates if spellcheck is disabled.showStrictWarning- Indicates if a strict warning should be shown.
public record Query(String original, String altered, String cleaned, Boolean spellcheckOff, Boolean showStrictWarning)
extends Record
Represents a query in search requests. This class provides structured data about queries in the
Brave Search API results.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaltered()Returns the value of thealteredrecord component.cleaned()Returns the value of thecleanedrecord 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
-
Query
public Query(String original, String altered, String cleaned, Boolean spellcheckOff, Boolean showStrictWarning) Creates an instance of aQueryrecord class.- Parameters:
original- the value for theoriginalrecord componentaltered- the value for thealteredrecord componentcleaned- the value for thecleanedrecord 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
-
cleaned
Returns the value of thecleanedrecord component.- Returns:
- the value of the
cleanedrecord 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
-