Record Class SelectionSorterAdapter<Solution_,T>
java.lang.Object
java.lang.Record
ai.timefold.solver.core.impl.domain.valuerange.sort.SelectionSorterAdapter<Solution_,T>
- All Implemented Interfaces:
ValueRangeSorter<T>
@NullMarked
public record SelectionSorterAdapter<Solution_,T> (Solution_ solution, SelectionSorter<Solution_,T> innerSelectionSorter)
extends Record
implements ValueRangeSorter<T>
-
Constructor Summary
ConstructorsConstructorDescriptionSelectionSorterAdapter(Solution_ solution, SelectionSorter<Solution_, T> innerSelectionSorter) Creates an instance of aSelectionSorterAdapterrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.SelectionSorter<?,T> final inthashCode()Returns a hash code value for this object.Returns the value of theinnerSelectionSorterrecord component.static <Solution_,T>
ValueRangeSorter<T>of(Solution_ solution, SelectionSorter<Solution_, T> selectionSorter) solution()Returns the value of thesolutionrecord component.voidPerforms an in-place sorting operation on the given selection list.Creates a copy of the provided set and sort the data.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
SelectionSorterAdapter
public SelectionSorterAdapter(Solution_ solution, SelectionSorter<Solution_, T> innerSelectionSorter) Creates an instance of aSelectionSorterAdapterrecord class.- Parameters:
solution- the value for thesolutionrecord componentinnerSelectionSorter- the value for theinnerSelectionSorterrecord component
-
-
Method Details
-
of
public static <Solution_,T> ValueRangeSorter<T> of(Solution_ solution, SelectionSorter<Solution_, T> selectionSorter) -
sort
Description copied from interface:ValueRangeSorterPerforms an in-place sorting operation on the given selection list.- Specified by:
sortin interfaceValueRangeSorter<Solution_>- Parameters:
selectionList- never null, aListof values that will be sorted.
-
sort
Description copied from interface:ValueRangeSorterCreates a copy of the provided set and sort the data.- Specified by:
sortin interfaceValueRangeSorter<Solution_>- Parameters:
selectionSet- never null, aSetof values that will be used as input for sorting.
-
getInnerSorter
- Specified by:
getInnerSorterin interfaceValueRangeSorter<Solution_>- Returns:
- the inner sorter class that will be used to sort the data.
-
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). -
solution
Returns the value of thesolutionrecord component.- Returns:
- the value of the
solutionrecord component
-
innerSelectionSorter
Returns the value of theinnerSelectionSorterrecord component.- Returns:
- the value of the
innerSelectionSorterrecord component
-