Record Class SearchOptions
java.lang.Object
java.lang.Record
org.hansken.plugin.extraction.api.SearchOptions
- Record Components:
scope- theSearchScopeindicating where the search should be performed.start- the starting offset of the search results.sort- the list ofSearchSortOptiondefining how the results should be sorted.
public record SearchOptions(SearchScope scope, int start, List<SearchSortOption> sort)
extends Record
Represents search options including the search scope, the start offset of the results, and sorting preferences.
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final SearchOptionsA defaultSearchOptionsinstance with. -
Constructor Summary
ConstructorsConstructorDescriptionSearchOptions(SearchScope scope, int start, List<SearchSortOption> sort) Creates an instance of aSearchOptionsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchOptions.Builderbuilder()Creates a newSearchOptions.Builderinstance for constructing aSearchOptionsobject.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.scope()Returns the value of thescoperecord component.sort()Returns the value of thesortrecord component.intstart()Returns the value of thestartrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
DEFAULT
A defaultSearchOptionsinstance with.SearchScope.IMAGEas the scope0as the start offset- list of
SearchSortOptioncontaining just the uid in ascending order
-
-
Constructor Details
-
Method Details
-
builder
Creates a newSearchOptions.Builderinstance for constructing aSearchOptionsobject.- Returns:
- a new
Builder.
-
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 '=='. -
scope
Returns the value of thescoperecord component.- Returns:
- the value of the
scoperecord component
-
start
public int start()Returns the value of thestartrecord component.- Returns:
- the value of the
startrecord component
-
sort
Returns the value of thesortrecord component.- Returns:
- the value of the
sortrecord component
-