public static < T > boolean intersectsAll ( T [ ] a1 , T [ ] a2 ) { for ( T anA1 : a1 ) { if ( ! contains ( a2 , anA1 ) ) { return false ; } } for ( T anA2 : a2 ) { if ( ! contains ( a1 , anA2 ) ) { return false ; } } return true ; }
Determines if all values in a1 appear in a2 and that all values in a2 appear in a2 .