@ SafeVarargs public static DataSet join ( DataSet ... dataSets ) { if ( dataSets == null || dataSets . length == 0 ) { throw new InvalidOperationException ( "No source data sets given for joining." ) ; } DataSet r = copyOf ( dataSets [ 0 ] ) ; for ( int i = 1 ; i < dataSets . length ; i ++ ) { DataSet d = dataSets [ i ] ; if ( d . getSource ( ) != r . getSource ( ) ) { throw new InvalidOperationException ( "Data source mismatch." ) ; } r . getRows ( ) . addAll ( d . getRows ( ) ) ; } return r ; }
Create data set that results from joining several data sets .