Record Class Search
java.lang.Object
java.lang.Record
net.ygbstudio.jbrave.core.domain.dto.result.search.Search
- Record Components:
type- The type of the search.results- A list ofSearchResultobjects representing the search results.familyFriendly- A boolean indicating whether the search is family-friendly.
public record Search(String type, List<SearchResult> results, Boolean familyFriendly)
extends Record
Represents search information in search results. This record provides structured data about
searches in the Brave Search API results.
-
Constructor Summary
ConstructorsConstructorDescriptionSearch(String type, List<SearchResult> results, Boolean familyFriendly) Creates an instance of aSearchrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.Returns the value of thefamilyFriendlyrecord component.final inthashCode()Returns a hash code value for this object.results()Returns the value of theresultsrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.
-
Constructor Details
-
Search
Creates an instance of aSearchrecord class.- Parameters:
type- the value for thetyperecord componentresults- the value for theresultsrecord componentfamilyFriendly- the value for thefamilyFriendlyrecord 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). -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
results
Returns the value of theresultsrecord component.- Returns:
- the value of the
resultsrecord component
-
familyFriendly
Returns the value of thefamilyFriendlyrecord component.- Returns:
- the value of the
familyFriendlyrecord component
-