@ Nullable @ ReturnsMutableCopy @ SafeVarargs public static < ELEMENTTYPE > ELEMENTTYPE [ ] getAllExcept ( @ Nullable final ELEMENTTYPE [ ] aArray , @ Nullable final ELEMENTTYPE ... aElementsToRemove ) { if ( isEmpty ( aArray ) || isEmpty ( aElementsToRemove ) ) return aArray ; final ELEMENTTYPE [ ] tmp = getCopy ( aArray ) ; int nDst = 0 ; for ( int nSrc = 0 ; nSrc < tmp . length ; ++ nSrc ) if ( ! contains ( aElementsToRemove , tmp [ nSrc ] ) ) tmp [ nDst ++ ] = tmp [ nSrc ] ; return getCopy ( tmp , 0 , nDst ) ; }
Get an array that contains all elements except for the passed elements .