public static List < OrderingResult > getOrderingResults ( Result r ) { if ( r instanceof OrderingResult ) { List < OrderingResult > ors = new ArrayList <> ( 1 ) ; ors . add ( ( OrderingResult ) r ) ; return ors ; } if ( r instanceof HierarchicalResult ) { return filterResults ( ( ( HierarchicalResult ) r ) . getHierarchy ( ) , r , OrderingResult . class ) ; } return Collections . emptyList ( ) ; }
Collect all ordering results from a Result