Package nz.org.riskscape.engine.sort
Class SortBy
java.lang.Object
nz.org.riskscape.engine.sort.SortBy
Defines an sort by, consisting of an Expression to obtain a comparable value and SortBy.Direction.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionSortBy(Expression expr, SortBy.Direction dir) SortBy(Expression expr, SortBy.Direction direction, SortBy next) Creates a newSortByinstance. -
Method Summary
Modifier and TypeMethodDescriptionBuilds a new SortBy clause where asNext is appended to the end of thisSortBychain.protected booleanstatic SortByconcatenate(List<SortBy> clauses) static SortByconcatenate(SortBy... clauses) Convenience version ofconcatenate(List)booleanThe direction in which to sort.getExpr()Expression to extract value to sort by.getNext()A subordinate, sort orderinthashCode()toString()validate(Struct tupleType, ExpressionRealizer expressionRealizer) Validate that tupleType would be able to be sorted by this SortBy.
-
Field Details
-
NONE
-
-
Constructor Details
-
SortBy
-
SortBy
Creates a new
SortByinstance.- Parameters:
expr- Expression to extract value to sort by.direction- The direction in which to sort.next- A subordinate, sort order
-
-
Method Details
-
concatenate
Convenience version of
concatenate(List) -
concatenate
-
validate
Validate that tupleType would be able to be sorted by this SortBy.
- Parameters:
tupleType-expressionRealizer- to realize expressions with- Returns:
- problems encountered, if any
-
andThen
Builds a new SortBy clause where asNext is appended to the end of this
SortBychain. -
toString
-
equals
-
canEqual
-
hashCode
public int hashCode() -
getExpr
Expression to extract value to sort by.
-
getDirection
The direction in which to sort.
-
getNext
A subordinate, sort order
-