Class TupleComparator

java.lang.Object
nz.org.riskscape.engine.sort.TupleComparator

public class TupleComparator extends Object

Abstract base class for sorting.

  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
     
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final Comparator<nz.org.riskscape.engine.Tuple>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    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 Tuples of Struct type.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • NONE

      public static final Comparator<nz.org.riskscape.engine.Tuple> 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 Tuples of Struct type.

      Parameters:
      targetType - type of struct that will be compared
      sortBy - to sort tuples in order of precedence
      expressionRealizer - to realize expressions with
      Returns:
      ResultOrProblems indicating success or otherwise, with any problems encountered.