Package com.atlassian.jira.search
Record Class DefaultValueLoaderFieldSort<T>
java.lang.Object
java.lang.Record
com.atlassian.jira.search.DefaultValueLoaderFieldSort<T>
- All Implemented Interfaces:
FieldSort
,ValueLoaderFieldSort<T>
public record DefaultValueLoaderFieldSort<T>(FieldValueLoader<T> valueLoader, FieldSort.Order order)
extends Record
implements ValueLoaderFieldSort<T>
Default implementation of a field sort that that loads the field values into memory and then sorts them with a Java comparator.
This is highly inefficient and therefore not recommended. Consider using
NaturalFieldSort
instead.- Since:
- 10.4
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.atlassian.jira.search.FieldSort
FieldSort.Order
-
Constructor Summary
ConstructorsConstructorDescriptionDefaultValueLoaderFieldSort
(FieldValueLoader<T> valueLoader, FieldSort.Order order) Creates an instance of aDefaultValueLoaderFieldSort
record class. -
Method Summary
Modifier and TypeMethodDescriptionfinal boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.order()
Returns the value of theorder
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thevalueLoader
record component.Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
Methods inherited from interface com.atlassian.jira.search.ValueLoaderFieldSort
field
-
Constructor Details
-
DefaultValueLoaderFieldSort
Creates an instance of aDefaultValueLoaderFieldSort
record class.- Parameters:
valueLoader
- the value for thevalueLoader
record componentorder
- the value for theorder
record 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)
. -
valueLoader
Returns the value of thevalueLoader
record component.- Specified by:
valueLoader
in interfaceValueLoaderFieldSort<T>
- Returns:
- the value of the
valueLoader
record component
-
order
Returns the value of theorder
record component.
-