public List < T > getBucket ( List < T > storage ) { if ( storage == null ) storage = new ArrayList < T > ( ) ; else storage . clear ( ) ; for ( int i = 0 ; i < bins . length ; i ++ ) { storage . add ( a . get ( bins [ i ] ) ) ; } return storage ; }
Extracts the entire bucket . Will add elements to the provided list or create a new one