Package nz.org.riskscape.engine.sort
Class TupleComparator
java.lang.Object
nz.org.riskscape.engine.sort.TupleComparator
Abstract base class for sorting.
-
Nested Class Summary
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic nz.org.riskscape.problem.ResultOrProblems<Comparator<nz.org.riskscape.engine.Tuple>>
createComparator
(nz.org.riskscape.engine.types.Struct targetType, nz.org.riskscape.engine.sort.SortBy sortBy, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) Build a tuple comparator forTuple
s ofStruct
type.
-
Field Details
-
NONE
-
-
Constructor Details
-
TupleComparator
public TupleComparator()
-
-
Method Details
-
createComparator
public static nz.org.riskscape.problem.ResultOrProblems<Comparator<nz.org.riskscape.engine.Tuple>> createComparator(nz.org.riskscape.engine.types.Struct targetType, nz.org.riskscape.engine.sort.SortBy sortBy, nz.org.riskscape.engine.rl.ExpressionRealizer expressionRealizer) Build a tuple comparator for
Tuple
s ofStruct
type.- Parameters:
targetType
- type of struct that will be comparedsortBy
- to sort tuples in order of precedenceexpressionRealizer
- to realize expressions with- Returns:
- ResultOrProblems indicating success or otherwise, with any problems encountered.
-