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