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
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSortBy
(Expression expr, SortBy.Direction dir) SortBy
(Expression expr, SortBy.Direction direction, SortBy next) -
Method Summary
Modifier and TypeMethodDescriptionBuilds a new SortBy clause where asNext is appended to the end of thisSortBy
chain.protected boolean
static SortBy
concatenate
(List<SortBy> clauses) static SortBy
concatenate
(SortBy... clauses) Convenience version ofconcatenate(List)
boolean
The direction in which to sort.getExpr()
Expression to extract value to sort by.getNext()
A subordinate, sort orderint
hashCode()
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
-
-
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
SortBy
chain. -
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
-