Record Class SearchOptions
java.lang.Object
java.lang.Record
org.hansken.plugin.extraction.api.SearchOptions
- Record Components:
scope
- theSearchScope
indicating where the search should be performed.start
- the starting offset of the search results.sort
- the list ofSearchSortOption
defining 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 SearchOptions
A defaultSearchOptions
instance with. -
Constructor Summary
ConstructorsConstructorDescriptionSearchOptions
(SearchScope scope, int start, List<SearchSortOption> sort) Creates an instance of aSearchOptions
record class. -
Method Summary
Modifier and TypeMethodDescriptionstatic SearchOptions.Builder
builder()
Creates a newSearchOptions.Builder
instance for constructing aSearchOptions
object.final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.scope()
Returns the value of thescope
record component.sort()
Returns the value of thesort
record component.int
start()
Returns the value of thestart
record component.final String
toString()
Returns a string representation of this record class.
-
Field Details
-
DEFAULT
A defaultSearchOptions
instance with.SearchScope.IMAGE
as the scope0
as the start offset- list of
SearchSortOption
containing just the uid in ascending order
-
-
Constructor Details
-
Method Details
-
builder
Creates a newSearchOptions.Builder
instance for constructing aSearchOptions
object.- 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 thescope
record component.- Returns:
- the value of the
scope
record component
-
start
public int start()Returns the value of thestart
record component.- Returns:
- the value of the
start
record component
-
sort
Returns the value of thesort
record component.- Returns:
- the value of the
sort
record component
-