Record Class SearchOptions

java.lang.Object
java.lang.Record
org.hansken.plugin.extraction.api.SearchOptions
Record Components:
scope - the SearchScope indicating where the search should be performed.
start - the starting offset of the search results.
sort - the list of SearchSortOption 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.
  • Field Details

  • Constructor Details

    • SearchOptions

      public SearchOptions(SearchScope scope, int start, List<SearchSortOption> sort)
      Creates an instance of a SearchOptions record class.
      Parameters:
      scope - the value for the scope record component
      start - the value for the start record component
      sort - the value for the sort record component
  • Method Details

    • builder

      public static SearchOptions.Builder builder()
      Creates a new SearchOptions.Builder instance for constructing a SearchOptions object.
      Returns:
      a new Builder.
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object); primitive components are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • scope

      public SearchScope scope()
      Returns the value of the scope record component.
      Returns:
      the value of the scope record component
    • start

      public int start()
      Returns the value of the start record component.
      Returns:
      the value of the start record component
    • sort

      public List<SearchSortOption> sort()
      Returns the value of the sort record component.
      Returns:
      the value of the sort record component