Record Class SearchResultEmpty<T>

java.lang.Object
java.lang.Record
ru.slie.luna.db.SearchResultEmpty<T>
All Implemented Interfaces:
Iterator<T>, SearchResult<T>

public record SearchResultEmpty<T>(SearchParams searchParams) extends Record implements SearchResult<T>
  • Constructor Details

    • SearchResultEmpty

      public SearchResultEmpty(SearchParams searchParams)
      Creates an instance of a SearchResultEmpty record class.
      Parameters:
      searchParams - the value for the searchParams record component
  • Method Details

    • getTotal

      public long getTotal()
      Specified by:
      getTotal in interface SearchResult<T>
    • getResults

      public List<T> getResults()
      Specified by:
      getResults in interface SearchResult<T>
    • next

      public T next()
      Specified by:
      next in interface Iterator<T>
    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<T>
    • getPage

      public int getPage()
      Specified by:
      getPage in interface SearchResult<T>
    • getLimit

      public int getLimit()
      Specified by:
      getLimit in interface SearchResult<T>
    • 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. All components in this record class are compared with Objects::equals(Object,Object).
      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.
    • searchParams

      public SearchParams searchParams()
      Returns the value of the searchParams record component.
      Specified by:
      searchParams in interface SearchResult<T>
      Returns:
      the value of the searchParams record component